diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-28 06:24:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-28 06:24:50 +0000 |
commit | 3cffa471d95042045c6180d39340ec597bbc7747 (patch) | |
tree | 7c5ae837e24e5221d5cce8313cec6ba82e2e90f7 /llvm/lib/CodeGen/SelectionDAG | |
parent | 4f89ccb1dfc8cd1b21db5571308bfda676068090 (diff) | |
download | bcm5719-llvm-3cffa471d95042045c6180d39340ec597bbc7747.tar.gz bcm5719-llvm-3cffa471d95042045c6180d39340ec597bbc7747.zip |
Really fix the bootstrap failure.
llvm-svn: 52854
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 717ad34f408..002821d0a6d 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2578,8 +2578,7 @@ static SDOperand getMemBasePlusOffset(SDOperand Base, unsigned Offset, /// isMemSrcFromString - Returns true if memcpy source is a string constant. /// -static bool isMemSrcFromString(SDOperand Src, std::string &Str, - uint64_t &SrcOff) { +static bool isMemSrcFromString(SDOperand Src, std::string &Str) { unsigned SrcDelta = 0; GlobalAddressSDNode *G = NULL; if (Src.getOpcode() == ISD::GlobalAddress) @@ -2594,10 +2593,8 @@ static bool isMemSrcFromString(SDOperand Src, std::string &Str, return false; GlobalVariable *GV = dyn_cast<GlobalVariable>(G->getGlobal()); - if (GV && GetConstantStringInfo(GV, Str, SrcDelta, false)) { - SrcOff += SrcDelta; + if (GV && GetConstantStringInfo(GV, Str, SrcDelta, false)) return true; - } return false; } @@ -2614,8 +2611,7 @@ bool MeetsMaxMemopRequirement(std::vector<MVT> &MemOps, bool AllowUnalign = TLI.allowsUnalignedMemoryAccesses(); std::string Str; - uint64_t SrcOff = 0; - bool isSrcStr = isMemSrcFromString(Src, Str, SrcOff); + bool isSrcStr = isMemSrcFromString(Src, Str); bool isSrcConst = isa<ConstantSDNode>(Src); MVT VT= TLI.getOptimalMemOpType(Size, Align, isSrcConst, isSrcStr); if (VT != MVT::iAny) { @@ -2710,11 +2706,11 @@ static SDOperand getMemcpyLoadsAndStores(SelectionDAG &DAG, return SDOperand(); std::string Str; - uint64_t SrcOff = 0, DstOff = 0; - bool CopyFromStr = isMemSrcFromString(Src, Str, SrcOff); + bool CopyFromStr = isMemSrcFromString(Src, Str); SmallVector<SDOperand, 8> OutChains; unsigned NumMemOps = MemOps.size(); + uint64_t SrcOff = 0, DstOff = 0; for (unsigned i = 0; i < NumMemOps; i++) { MVT VT = MemOps[i]; unsigned VTSize = VT.getSizeInBits() / 8; |