[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineConstantPool.h

Evan Cheng evan.cheng at apple.com
Thu Sep 14 00:32:46 PDT 2006



Changes in directory llvm/include/llvm/CodeGen:

MachineConstantPool.h updated: 1.19 -> 1.20
---
Log message:

Add MachineConstantPoolEntry getOffset() accessor.

---
Diffs of the changes:  (+6 -2)

 MachineConstantPool.h |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/CodeGen/MachineConstantPool.h
diff -u llvm/include/llvm/CodeGen/MachineConstantPool.h:1.19 llvm/include/llvm/CodeGen/MachineConstantPool.h:1.20
--- llvm/include/llvm/CodeGen/MachineConstantPool.h:1.19	Thu Sep 14 00:48:39 2006
+++ llvm/include/llvm/CodeGen/MachineConstantPool.h	Thu Sep 14 02:32:32 2006
@@ -67,8 +67,8 @@
     MachineConstantPoolValue *MachineCPVal;
   } Val;
 
-  /// The offset of the constant from the start of the pool. It's really
-  /// 31-bit only. The top bit is set when Val is a MachineConstantPoolValue.
+  /// The offset of the constant from the start of the pool. The top bit is set
+  /// when Val is a MachineConstantPoolValue.
   unsigned Offset;
 
   MachineConstantPoolEntry(Constant *V, unsigned O)
@@ -87,6 +87,10 @@
     return (int)Offset < 0;
   }
 
+  int getOffset() const { 
+    return Offset & ~(1 << (sizeof(unsigned)*8-1));
+  }
+
   const Type *getType() const;
 };
   






More information about the llvm-commits mailing list