The top bit is used to determine whether it's a MachineConstantPoolValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30324 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2006-09-14 07:30:48 +00:00
parent c7695eb504
commit baf4500b3a

View File

@ -1150,7 +1150,7 @@ class ConstantPoolSDNode : public SDNode {
Constant *ConstVal;
MachineConstantPoolValue *MachineCPVal;
} Val;
int Offset;
int Offset; // It's a MachineConstantPoolValue if top bit is set.
unsigned Alignment;
protected:
friend class SelectionDAG;
@ -1200,7 +1200,9 @@ public:
return Val.MachineCPVal;
}
int getOffset() const { return Offset; }
int getOffset() const {
return Offset & ~(1 << (sizeof(unsigned)*8-1));
}
// Return the alignment of this constant pool object, which is either 0 (for
// default alignment) or log2 of the desired value.