diff options
| author | Gabor Greif <ggreif@gmail.com> | 2010-06-28 16:43:57 +0000 |
|---|---|---|
| committer | Gabor Greif <ggreif@gmail.com> | 2010-06-28 16:43:57 +0000 |
| commit | 18c5bae727f9c4f4af4b50c3c850bec4d9beb8ba (patch) | |
| tree | 76b1cf8f1fdbd92f450ab5aef840665bf5b1ba9f /llvm/lib | |
| parent | cd09869dfce704fc8bd0d3662b32c1b185122161 (diff) | |
| download | bcm5719-llvm-18c5bae727f9c4f4af4b50c3c850bec4d9beb8ba.tar.gz bcm5719-llvm-18c5bae727f9c4f4af4b50c3c850bec4d9beb8ba.zip | |
employ CallInst::ArgOffset (for now)
llvm-svn: 107015
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp index d539f2bbf0a..50c6931f223 100644 --- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -969,7 +969,7 @@ void SROA::isSafeForScalarRepl(Instruction *I, AllocaInst *AI, uint64_t Offset, ConstantInt *Length = dyn_cast<ConstantInt>(MI->getLength()); if (Length) isSafeMemAccess(AI, Offset, Length->getZExtValue(), 0, - UI.getOperandNo() == 1, Info); + UI.getOperandNo() == CallInst::ArgOffset, Info); else MarkUnsafe(Info); } else if (LoadInst *LI = dyn_cast<LoadInst>(User)) { @@ -1799,7 +1799,7 @@ static bool isOnlyCopiedFromConstantGlobal(Value *V, MemTransferInst *&TheCopy, if (isOffset) return false; // If the memintrinsic isn't using the alloca as the dest, reject it. - if (UI.getOperandNo() != 1) return false; + if (UI.getOperandNo() != CallInst::ArgOffset) return false; // If the source of the memcpy/move is not a constant global, reject it. if (!PointsToConstantGlobal(MI->getSource())) |

