diff options
author | Justin Lebar <jlebar@google.com> | 2016-07-15 18:27:10 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-07-15 18:27:10 +0000 |
commit | 9c375817ac1766e537a857f33933f5ab7d7d2cdf (patch) | |
tree | 9327d759b73c37be2b04c67cb0c6be3692f6ccf4 /llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp | |
parent | 0af80cd6f0b0ae4770f76f9af3442651dd06fcc2 (diff) | |
download | bcm5719-llvm-9c375817ac1766e537a857f33933f5ab7d7d2cdf.tar.gz bcm5719-llvm-9c375817ac1766e537a857f33933f5ab7d7d2cdf.zip |
[SelectionDAG] Get rid of bool parameters in SelectionDAG::getLoad, getStore, and friends.
Summary:
Instead, we take a single flags arg (a bitset).
Also add a default 0 alignment, and change the order of arguments so the
alignment comes before the flags.
This greatly simplifies many callsites, and fixes a bug in
AMDGPUISelLowering, wherein the order of the args to getLoad was
inverted. It also greatly simplifies the process of adding another flag
to getLoad.
Reviewers: chandlerc, tstellarAMD
Subscribers: jholewinski, arsenm, jyknight, dsanders, nemanjai, llvm-commits
Differential Revision: http://reviews.llvm.org/D22249
llvm-svn: 275592
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp b/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp index 0363c665946..65748250404 100644 --- a/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp +++ b/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp @@ -68,10 +68,9 @@ static SDValue memsetStore(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, uint64_t StoreVal = ByteVal; for (unsigned I = 1; I < Size; ++I) StoreVal |= ByteVal << (I * 8); - return DAG.getStore(Chain, DL, - DAG.getConstant(StoreVal, DL, - MVT::getIntegerVT(Size * 8)), - Dst, DstPtrInfo, false, false, Align); + return DAG.getStore( + Chain, DL, DAG.getConstant(StoreVal, DL, MVT::getIntegerVT(Size * 8)), + Dst, DstPtrInfo, Align); } SDValue SystemZSelectionDAGInfo::EmitTargetCodeForMemset( @@ -112,15 +111,14 @@ SDValue SystemZSelectionDAGInfo::EmitTargetCodeForMemset( } else { // Handle one and two bytes using STC. if (Bytes <= 2) { - SDValue Chain1 = DAG.getStore(Chain, DL, Byte, Dst, DstPtrInfo, - false, false, Align); + SDValue Chain1 = DAG.getStore(Chain, DL, Byte, Dst, DstPtrInfo, Align); if (Bytes == 1) return Chain1; SDValue Dst2 = DAG.getNode(ISD::ADD, DL, PtrVT, Dst, DAG.getConstant(1, DL, PtrVT)); - SDValue Chain2 = DAG.getStore(Chain, DL, Byte, Dst2, - DstPtrInfo.getWithOffset(1), - false, false, 1); + SDValue Chain2 = + DAG.getStore(Chain, DL, Byte, Dst2, DstPtrInfo.getWithOffset(1), + /* Alignment = */ 1); return DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Chain1, Chain2); } } @@ -134,8 +132,7 @@ SDValue SystemZSelectionDAGInfo::EmitTargetCodeForMemset( // Copy the byte to the first location and then use MVC to copy // it to the rest. - Chain = DAG.getStore(Chain, DL, Byte, Dst, DstPtrInfo, - false, false, Align); + Chain = DAG.getStore(Chain, DL, Byte, Dst, DstPtrInfo, Align); SDValue DstPlus1 = DAG.getNode(ISD::ADD, DL, PtrVT, Dst, DAG.getConstant(1, DL, PtrVT)); return emitMemMem(DAG, DL, SystemZISD::MVC, SystemZISD::MVC_LOOP, |