summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-06-29 15:57:19 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-06-29 15:57:19 +0000
commit8192568fbc75e548ea121be0fcb9ee1d2d6e61f9 (patch)
treeee969b4a3ded0199fcecc3dfb513640fe8235bbd /llvm/lib/CodeGen
parent4642afdcc139c7a0882730957ac76c62a6f6389d (diff)
downloadbcm5719-llvm-8192568fbc75e548ea121be0fcb9ee1d2d6e61f9.tar.gz
bcm5719-llvm-8192568fbc75e548ea121be0fcb9ee1d2d6e61f9.zip
tracking the instructions causing loads and stores provides more information than just the pointer being loaded or stored
llvm-svn: 22311
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 8a34a59a15e..8614e3ec4b6 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1394,8 +1394,6 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
}
SDOperand SelectionDAG::getSrcValue(const Value *V, int Offset) {
- assert((!V || isa<PointerType>(V->getType())) &&
- "SrcValue is not a pointer?");
SDNode *&N = ValueNodes[std::make_pair(V, Offset)];
if (N) return SDOperand(N, 0);
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index fa6d6d4d14c..68150545150 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -644,7 +644,7 @@ void SelectionDAGLowering::visitLoad(LoadInst &I) {
}
SDOperand L = DAG.getLoad(TLI.getValueType(I.getType()), Root, Ptr,
- DAG.getSrcValue(I.getOperand(0)));
+ DAG.getSrcValue(&I));
setValue(&I, L);
if (I.isVolatile())
@@ -659,7 +659,7 @@ void SelectionDAGLowering::visitStore(StoreInst &I) {
SDOperand Src = getValue(SrcV);
SDOperand Ptr = getValue(I.getOperand(1));
DAG.setRoot(DAG.getNode(ISD::STORE, MVT::Other, getRoot(), Src, Ptr,
- DAG.getSrcValue(I.getOperand(1))));
+ DAG.getSrcValue(&I)));
}
void SelectionDAGLowering::visitCall(CallInst &I) {
OpenPOWER on IntegriCloud