diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-10-09 20:57:25 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-10-09 20:57:25 +0000 |
commit | 466685d41a9ea4905b9486fea38e83802e46f196 (patch) | |
tree | 5cce15f398aa815a729d1e74d62617d58a267bb8 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 24446e253a17720f6462288255ab5ebd13b8491f (diff) |
Reflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 6d0f782220..e17105c0f0 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -460,7 +460,7 @@ public: void setCurrentBasicBlock(MachineBasicBlock *MBB) { CurMBB = MBB; } SDOperand getLoadFrom(const Type *Ty, SDOperand Ptr, - SDOperand SrcValue, SDOperand Root, + const Value *SV, SDOperand Root, bool isVolatile); SDOperand getIntPtrConstant(uint64_t Val) { @@ -859,7 +859,7 @@ void SelectionDAGLowering::visitJumpTable(SelectionDAGISel::JumpTable &JT) { SDOperand TAB = DAG.getJumpTable(JT.JTI,PTy); SDOperand ADD = DAG.getNode(ISD::ADD, PTy, IDX, TAB); SDOperand LD = DAG.getLoad(isPIC ? MVT::i32 : PTy, Copy.getValue(1), ADD, - DAG.getSrcValue(0)); + NULL, 0); if (isPIC) { // For Pic, the sequence is: // BRIND(load(Jumptable + index) + RelocBase) @@ -1360,19 +1360,20 @@ void SelectionDAGLowering::visitLoad(LoadInst &I) { Root = DAG.getRoot(); } - setValue(&I, getLoadFrom(I.getType(), Ptr, DAG.getSrcValue(I.getOperand(0)), + setValue(&I, getLoadFrom(I.getType(), Ptr, I.getOperand(0), Root, I.isVolatile())); } SDOperand SelectionDAGLowering::getLoadFrom(const Type *Ty, SDOperand Ptr, - SDOperand SrcValue, SDOperand Root, + const Value *SV, SDOperand Root, bool isVolatile) { SDOperand L; if (const PackedType *PTy = dyn_cast<PackedType>(Ty)) { MVT::ValueType PVT = TLI.getValueType(PTy->getElementType()); - L = DAG.getVecLoad(PTy->getNumElements(), PVT, Root, Ptr, SrcValue); + L = DAG.getVecLoad(PTy->getNumElements(), PVT, Root, Ptr, + DAG.getSrcValue(SV)); } else { - L = DAG.getLoad(TLI.getValueType(Ty), Root, Ptr, SrcValue); + L = DAG.getLoad(TLI.getValueType(Ty), Root, Ptr, SV, isVolatile); } if (isVolatile) @@ -2909,7 +2910,7 @@ void SelectionDAGLowering::visitMemIntrinsic(CallInst &I, unsigned Op) { } else { Value = DAG.getLoad(VT, getRoot(), getMemBasePlusOffset(Op2, SrcOff, DAG, TLI), - DAG.getSrcValue(I.getOperand(2), SrcOff)); + I.getOperand(2), SrcOff); Chain = Value.getValue(1); Store = DAG.getStore(Chain, Value, |