aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-09-14 07:30:48 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-09-14 07:30:48 +0000
commitbaf4500b3ab128c78932e36f96086c0487c8c7d1 (patch)
treef37e8af509754936aad8fbe7c7a027eef7b699ce /include
parentc7695eb5047d7a9ad75e46f178f6e7f066a94283 (diff)
downloadexternal_llvm-baf4500b3ab128c78932e36f96086c0487c8c7d1.zip
external_llvm-baf4500b3ab128c78932e36f96086c0487c8c7d1.tar.gz
external_llvm-baf4500b3ab128c78932e36f96086c0487c8c7d1.tar.bz2
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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 53ba38f..b830dc3 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -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.