summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-09-12 21:00:35 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-09-12 21:00:35 +0000
commit45fe3bc72cbbfdca3ee2a8bf649982871b0bcba4 (patch)
tree427117d8c72a875fb11870f734dec69781383fbc /llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp
parent3228e750be1a13cd37fe00ae7c4a746b19ed7230 (diff)
downloadbcm5719-llvm-45fe3bc72cbbfdca3ee2a8bf649982871b0bcba4.tar.gz
bcm5719-llvm-45fe3bc72cbbfdca3ee2a8bf649982871b0bcba4.zip
Added support for machine specific constantpool values. These are useful for
representing expressions that can only be resolved at link time, etc. llvm-svn: 30278
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp
index 7cec545f5d3..498e9efc81b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp
@@ -12,6 +12,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/CodeGen/SelectionDAG.h"
+#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/Support/MathExtras.h"
using namespace llvm;
@@ -70,7 +71,11 @@ SelectionDAGCSEMap::NodeID::NodeID(SDNode *N) {
case ISD::TargetConstantPool:
AddInteger(cast<ConstantPoolSDNode>(N)->getAlignment());
AddInteger(cast<ConstantPoolSDNode>(N)->getOffset());
- AddPointer(cast<ConstantPoolSDNode>(N)->get());
+ if (cast<ConstantPoolSDNode>(N)->isMachineConstantPoolEntry())
+ cast<ConstantPoolSDNode>(N)->getMachineCPVal()->
+ AddSelectionDAGCSEId(this);
+ else
+ AddPointer(cast<ConstantPoolSDNode>(N)->getConstVal());
break;
}
}
OpenPOWER on IntegriCloud