Use instruction itinerary to determine what instructions are 'cheap'.
[oota-llvm.git] / include / llvm / Instruction.h
index 13331e60ed2faca7192194b70edbca7eaf5226c5..88f5ce1b2622ec176ed771422a0efec9ec3bdca1 100644 (file)
@@ -32,7 +32,7 @@ class Instruction : public User, public ilist_node<Instruction> {
   Instruction(const Instruction &);        // Do not implement
 
   BasicBlock *Parent;
-  NewDebugLoc DbgLoc;                      // 'dbg' Metadata cache.
+  DebugLoc DbgLoc;                         // 'dbg' Metadata cache.
   
   enum {
     /// HasMetadataBit - This is a bit stored in the SubClassData field which
@@ -170,21 +170,11 @@ public:
   void setMetadata(unsigned KindID, MDNode *Node);
   void setMetadata(const char *Kind, MDNode *Node);
 
-  /// setDbgMetadata - This is just an optimized helper function that is
-  /// equivalent to setMetadata("dbg", Node);
-  void setDbgMetadata(MDNode *Node);
-  
-  /// getDbgMetadata - This is just an optimized helper function that is
-  /// equivalent to calling getMetadata("dbg").
-  MDNode *getDbgMetadata() const {
-    return DbgLoc.getAsMDNode(getContext());
-  }
-
   /// setDebugLoc - Set the debug location information for this instruction.
-  void setDebugLoc(const NewDebugLoc &Loc) { DbgLoc = Loc; }
+  void setDebugLoc(const DebugLoc &Loc) { DbgLoc = Loc; }
   
   /// getDebugLoc - Return the debug location for this node as a DebugLoc.
-  const NewDebugLoc &getDebugLoc() const { return DbgLoc; }
+  const DebugLoc &getDebugLoc() const { return DbgLoc; }
   
 private:
   /// hasMetadataHashEntry - Return true if we have an entry in the on-the-side
@@ -199,7 +189,7 @@ private:
   void getAllMetadataImpl(SmallVectorImpl<std::pair<unsigned,MDNode*> > &)const;
   void getAllMetadataOtherThanDebugLocImpl(SmallVectorImpl<std::pair<unsigned,
                                            MDNode*> > &) const;
-  void removeAllMetadata();
+  void clearMetadataHashEntries();
 public:
   //===--------------------------------------------------------------------===//
   // Predicates and helper methods.