Delete LoopPass::runOnFunctionBody. It was never used or implemented.
[oota-llvm.git] / include / llvm / Instruction.h
index 856531c90685f8a82698fc0856ba2888c5be2ece..7d946e85a6d006b325b6f6dea25752bf7950f009 100644 (file)
@@ -40,14 +40,6 @@ public:
   // Out of line virtual method, so the vtable, etc has a home.
   ~Instruction();
   
-  /// mayWriteToMemory - Return true if this instruction may modify memory.
-  ///
-  bool mayWriteToMemory() const;
-
-  /// mayReadFromMemory - Return true if this instruction may read memory.
-  ///
-  bool mayReadFromMemory() const;
-  
   /// clone() - Create a copy of 'this' instruction that is identical in all
   /// ways except the following:
   ///   * The instruction has no parent
@@ -144,8 +136,7 @@ public:
     return getOpcode() == Shl || getOpcode() == LShr;
   }
 
-  /// isLogicalShift - Return true if this is a logical shift left or a logical
-  /// shift right.
+  /// isArithmeticShift - Return true if this is an arithmetic shift right.
   inline bool isArithmeticShift() const {
     return getOpcode() == AShr;
   }
@@ -182,6 +173,24 @@ public:
   }
   static bool isTrapping(unsigned op);
 
+  /// mayWriteToMemory - Return true if this instruction may modify memory.
+  ///
+  bool mayWriteToMemory() const;
+
+  /// mayReadFromMemory - Return true if this instruction may read memory.
+  ///
+  bool mayReadFromMemory() const;
+
+  /// mayThrow - Return true if this instruction may throw an exception.
+  ///
+  bool mayThrow() const;
+
+  /// mayHaveSideEffects - Return true if the instruction may have side effects.
+  ///
+  bool mayHaveSideEffects() const {
+    return mayWriteToMemory() || mayThrow();
+  }
+
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const Instruction *) { return true; }
   static inline bool classof(const Value *V) {