[llvm-commits] [llvm] r52854 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Chris Lattner
sabre at nondot.org
Fri Jun 27 23:24:51 PDT 2008
Author: lattner
Date: Sat Jun 28 01:24:50 2008
New Revision: 52854
URL: http://llvm.org/viewvc/llvm-project?rev=52854&view=rev
Log:
Really fix the bootstrap failure.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=52854&r1=52853&r2=52854&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Jun 28 01:24:50 2008
@@ -2578,8 +2578,7 @@
/// 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 @@
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 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 @@
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;
More information about the llvm-commits
mailing list