[llvm] r202136 - [SROA] Rather than copying the logic for building a name prefix into the
Chandler Carruth
chandlerc at gmail.com
Tue Feb 25 03:12:04 PST 2014
Author: chandlerc
Date: Tue Feb 25 05:12:04 2014
New Revision: 202136
URL: http://llvm.org/viewvc/llvm-project?rev=202136&view=rev
Log:
[SROA] Rather than copying the logic for building a name prefix into the
PHI-pointer builder, just copy the builder and clobber the obvious
fields.
Modified:
llvm/trunk/lib/Transforms/Scalar/SROA.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/SROA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SROA.cpp?rev=202136&r1=202135&r2=202136&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SROA.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SROA.cpp Tue Feb 25 05:12:04 2014
@@ -2649,9 +2649,9 @@ private:
// as local as possible to the PHI. To do that, we re-use the location of
// the old pointer, which necessarily must be in the right position to
// dominate the PHI.
- IRBuilderTy PtrBuilder(OldPtr);
- PtrBuilder.SetNamePrefix(Twine(NewAI.getName()) + "." + Twine(BeginOffset) +
- ".");
+ IRBuilderTy PtrBuilder(IRB);
+ PtrBuilder.SetInsertPoint(OldPtr);
+ PtrBuilder.SetCurrentDebugLocation(OldPtr->getDebugLoc());
Value *NewPtr =
getAdjustedAllocaPtr(PtrBuilder, BeginOffset, OldPtr->getType());
More information about the llvm-commits
mailing list