diff options
author | Dale Johannesen <dalej@apple.com> | 2009-02-03 22:26:09 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-02-03 22:26:09 +0000 |
commit | 0f502f6f44f2756f5cb7b17d8f1d8eae000d51b4 (patch) | |
tree | c3dc70dda6a5b5f0ac49277b227585b446061b70 /include | |
parent | 383d7ed9158576aef5cde872548225a17e3c0155 (diff) | |
download | llvm-0f502f6f44f2756f5cb7b17d8f1d8eae000d51b4.tar.gz llvm-0f502f6f44f2756f5cb7b17d8f1d8eae000d51b4.tar.bz2 llvm-0f502f6f44f2756f5cb7b17d8f1d8eae000d51b4.tar.xz |
Add some DL propagation to places that didn't
have it yet. More coming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63673 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAG.h | 52 | ||||
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 6 |
2 files changed, 55 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 5f226e83d5..433896ed2e 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -325,6 +325,10 @@ public: return getNode(ISD::CopyToReg, MVT::Other, Chain, getRegister(Reg, N.getValueType()), N); } + SDValue getCopyToReg(SDValue Chain, DebugLoc dl, unsigned Reg, SDValue N) { + return getNode(ISD::CopyToReg, dl, MVT::Other, Chain, + getRegister(Reg, N.getValueType()), N); + } // This version of the getCopyToReg method takes an extra operand, which // indicates that there is potentially an incoming flag value (if Flag is not @@ -335,6 +339,12 @@ public: SDValue Ops[] = { Chain, getRegister(Reg, N.getValueType()), N, Flag }; return getNode(ISD::CopyToReg, VTs, 2, Ops, Flag.getNode() ? 4 : 3); } + SDValue getCopyToReg(SDValue Chain, DebugLoc dl, unsigned Reg, SDValue N, + SDValue Flag) { + const MVT *VTs = getNodeValueTypes(MVT::Other, MVT::Flag); + SDValue Ops[] = { Chain, getRegister(Reg, N.getValueType()), N, Flag }; + return getNode(ISD::CopyToReg, dl, VTs, 2, Ops, Flag.getNode() ? 4 : 3); + } // Similar to last getCopyToReg() except parameter Reg is a SDValue SDValue getCopyToReg(SDValue Chain, SDValue Reg, SDValue N, @@ -343,12 +353,23 @@ public: SDValue Ops[] = { Chain, Reg, N, Flag }; return getNode(ISD::CopyToReg, VTs, 2, Ops, Flag.getNode() ? 4 : 3); } + SDValue getCopyToReg(SDValue Chain, DebugLoc dl, SDValue Reg, SDValue N, + SDValue Flag) { + const MVT *VTs = getNodeValueTypes(MVT::Other, MVT::Flag); + SDValue Ops[] = { Chain, Reg, N, Flag }; + return getNode(ISD::CopyToReg, dl, VTs, 2, Ops, Flag.getNode() ? 4 : 3); + } SDValue getCopyFromReg(SDValue Chain, unsigned Reg, MVT VT) { const MVT *VTs = getNodeValueTypes(VT, MVT::Other); SDValue Ops[] = { Chain, getRegister(Reg, VT) }; return getNode(ISD::CopyFromReg, VTs, 2, Ops, 2); } + SDValue getCopyFromReg(SDValue Chain, DebugLoc dl, unsigned Reg, MVT VT) { + const MVT *VTs = getNodeValueTypes(VT, MVT::Other); + SDValue Ops[] = { Chain, getRegister(Reg, VT) }; + return getNode(ISD::CopyFromReg, dl, VTs, 2, Ops, 2); + } // This version of the getCopyFromReg method takes an extra operand, which // indicates that there is potentially an incoming flag value (if Flag is not @@ -359,6 +380,12 @@ public: SDValue Ops[] = { Chain, getRegister(Reg, VT), Flag }; return getNode(ISD::CopyFromReg, VTs, 3, Ops, Flag.getNode() ? 3 : 2); } + SDValue getCopyFromReg(SDValue Chain, DebugLoc dl, unsigned Reg, MVT VT, + SDValue Flag) { + const MVT *VTs = getNodeValueTypes(VT, MVT::Other, MVT::Flag); + SDValue Ops[] = { Chain, getRegister(Reg, VT), Flag }; + return getNode(ISD::CopyFromReg, dl, VTs, 3, Ops, Flag.getNode() ? 3 : 2); + } SDValue getCondCode(ISD::CondCode Cond); @@ -366,6 +393,9 @@ public: /// disappear in the future and most targets don't support it. SDValue getConvertRndSat(MVT VT, SDValue Val, SDValue DTy, SDValue STy, SDValue Rnd, SDValue Sat, ISD::CvtCode Code); + SDValue getConvertRndSat(MVT VT, DebugLoc dl, SDValue Val, SDValue DTy, + SDValue STy, + SDValue Rnd, SDValue Sat, ISD::CvtCode Code); /// getZeroExtendInReg - Return the expression required to zero extend the Op /// value assuming it was the smaller SrcTy value. @@ -466,15 +496,35 @@ public: SDValue getMemcpy(SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool AlwaysInline, const Value *DstSV, uint64_t DstSVOff, + const Value *SrcSV, uint64_t SrcSVOff) { + return getMemcpy(Chain, DebugLoc::getUnknownLoc(), Dst, Src, Size, Align, + AlwaysInline, DstSV, DstSVOff, SrcSV, SrcSVOff); + } + SDValue getMemcpy(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, + SDValue Size, unsigned Align, bool AlwaysInline, + const Value *DstSV, uint64_t DstSVOff, const Value *SrcSV, uint64_t SrcSVOff); SDValue getMemmove(SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, const Value *DstSV, uint64_t DstOSVff, + const Value *SrcSV, uint64_t SrcSVOff) { + return getMemmove(Chain, DebugLoc::getUnknownLoc(), Dst, Src, Size, Align, + DstSV, DstOSVff, SrcSV, SrcSVOff); + } + SDValue getMemmove(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, + SDValue Size, unsigned Align, + const Value *DstSV, uint64_t DstOSVff, const Value *SrcSV, uint64_t SrcSVOff); SDValue getMemset(SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, + const Value *DstSV, uint64_t DstSVOff) { + return getMemset(Chain, DebugLoc::getUnknownLoc(), Dst, Src, Size, Align, + DstSV, DstSVOff); + } + SDValue getMemset(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, + SDValue Size, unsigned Align, const Value *DstSV, uint64_t DstSVOff); /// getSetCC - Helper function to make it easier to build SetCC's if you just @@ -521,6 +571,8 @@ public: /// and a source value as input. SDValue getVAArg(MVT VT, SDValue Chain, SDValue Ptr, SDValue SV); + SDValue getVAArg(MVT VT, DebugLoc dl, SDValue Chain, SDValue Ptr, + SDValue SV); /// getAtomic - Gets a node for an atomic op, produces result and chain and /// takes 3 operands diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 6639db1e00..1004508fbe 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -1101,7 +1101,7 @@ public: /// for another call). If the target chooses to decline an AlwaysInline /// request here, legalize will resort to using simple loads and stores. virtual SDValue - EmitTargetCodeForMemcpy(SelectionDAG &DAG, + EmitTargetCodeForMemcpy(SelectionDAG &DAG, DebugLoc dl, SDValue Chain, SDValue Op1, SDValue Op2, SDValue Op3, unsigned Align, @@ -1118,7 +1118,7 @@ public: /// SDValue if the target declines to use custom code and a different /// lowering strategy should be used. virtual SDValue - EmitTargetCodeForMemmove(SelectionDAG &DAG, + EmitTargetCodeForMemmove(SelectionDAG &DAG, DebugLoc dl, SDValue Chain, SDValue Op1, SDValue Op2, SDValue Op3, unsigned Align, @@ -1134,7 +1134,7 @@ public: /// SDValue if the target declines to use custom code and a different /// lowering strategy should be used. virtual SDValue - EmitTargetCodeForMemset(SelectionDAG &DAG, + EmitTargetCodeForMemset(SelectionDAG &DAG, DebugLoc dl, SDValue Chain, SDValue Op1, SDValue Op2, SDValue Op3, unsigned Align, |