Added hook hasReservedCallFrame(). It returns true if the call frame is
[oota-llvm.git] / include / llvm / Instructions.h
index 61d0efafe5f49f245a053d437dfb68865af9dbb2..146d1f50a645d0aede3f2ff7e934766f01a0e15a 100644 (file)
@@ -255,8 +255,7 @@ public:
   /// getAlignment - Return the alignment of the access that is being performed
   ///
   unsigned getAlignment() const {
-    signed Log2AlignVal = ((SubclassData>>1)-1);
-    return ((Log2AlignVal < 0) ? 0 : 1<<Log2AlignVal);
+    return (1 << (SubclassData>>1)) >> 1;
   }
   
   void setAlignment(unsigned Align);
@@ -331,8 +330,7 @@ public:
   /// getAlignment - Return the alignment of the access that is being performed
   ///
   unsigned getAlignment() const {
-    signed Log2AlignVal = ((SubclassData>>1)-1);
-    return ((Log2AlignVal < 0) ? 0 : 1<<Log2AlignVal);
+    return (1 << (SubclassData>>1)) >> 1;
   }
   
   void setAlignment(unsigned Align);
@@ -443,6 +441,12 @@ public:
   /// zeros.  If so, the result pointer and the first operand have the same
   /// value, just potentially different types.
   bool hasAllZeroIndices() const;
+  
+  /// hasAllConstantIndices - Return true if all of the indices of this GEP are
+  /// constant integers.  If so, the result pointer and the first operand have
+  /// a constant offset between them.
+  bool hasAllConstantIndices() const;
+  
 
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const GetElementPtrInst *) { return true; }