mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	Don't use the load/store instruction as the source pointer, use the pointer
being stored/loaded through! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21806 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -1329,6 +1329,8 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, | |||||||
| } | } | ||||||
|  |  | ||||||
| SDOperand SelectionDAG::getSrcValue(const Value *V, int Offset) { | 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)]; |   SDNode *&N = ValueNodes[std::make_pair(V, Offset)]; | ||||||
|   if (N) return SDOperand(N, 0); |   if (N) return SDOperand(N, 0); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -624,7 +624,7 @@ void SelectionDAGLowering::visitLoad(LoadInst &I) { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   SDOperand L = DAG.getLoad(TLI.getValueType(I.getType()), Root, Ptr, |   SDOperand L = DAG.getLoad(TLI.getValueType(I.getType()), Root, Ptr, | ||||||
|                             DAG.getSrcValue(&I)); |                             DAG.getSrcValue(I.getOperand(0))); | ||||||
|   setValue(&I, L); |   setValue(&I, L); | ||||||
|  |  | ||||||
|   if (I.isVolatile()) |   if (I.isVolatile()) | ||||||
| @@ -640,7 +640,7 @@ void SelectionDAGLowering::visitStore(StoreInst &I) { | |||||||
|   SDOperand Ptr = getValue(I.getOperand(1)); |   SDOperand Ptr = getValue(I.getOperand(1)); | ||||||
|   //  DAG.setRoot(DAG.getNode(ISD::STORE, MVT::Other, getRoot(), Src, Ptr)); |   //  DAG.setRoot(DAG.getNode(ISD::STORE, MVT::Other, getRoot(), Src, Ptr)); | ||||||
|   DAG.setRoot(DAG.getNode(ISD::STORE, MVT::Other, getRoot(), Src, Ptr, |   DAG.setRoot(DAG.getNode(ISD::STORE, MVT::Other, getRoot(), Src, Ptr, | ||||||
|                           DAG.getSrcValue(&I))); |                           DAG.getSrcValue(I.getOperand(1)))); | ||||||
| } | } | ||||||
|  |  | ||||||
| void SelectionDAGLowering::visitCall(CallInst &I) { | void SelectionDAGLowering::visitCall(CallInst &I) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user