mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
tracking the instructions causing loads and stores provides more information than just the pointer being loaded or stored
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22311 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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);
|
||||
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user