[llvm] r202140 - [SROA] Use the original load name with the SROA-prefixed IRB rather than

Chandler Carruth chandlerc at gmail.com
Tue Feb 25 03:21:49 PST 2014


Author: chandlerc
Date: Tue Feb 25 05:21:48 2014
New Revision: 202140

URL: http://llvm.org/viewvc/llvm-project?rev=202140&view=rev
Log:
[SROA] Use the original load name with the SROA-prefixed IRB rather than
just "load". This helps avoid pointless de-duping with order-sensitive
numbers as we already have unique names from the original load. It also
makes the resulting IR quite a bit easier to read.

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=202140&r1=202139&r2=202140&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SROA.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SROA.cpp Tue Feb 25 05:21:48 2014
@@ -2164,13 +2164,13 @@ private:
     } else if (NewBeginOffset == NewAllocaBeginOffset &&
                canConvertValue(DL, NewAllocaTy, LI.getType())) {
       V = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(),
-                                LI.isVolatile(), "load");
+                                LI.isVolatile(), LI.getName());
     } else {
       Type *LTy = TargetTy->getPointerTo();
       V = IRB.CreateAlignedLoad(
           getAdjustedAllocaPtr(IRB, NewBeginOffset, LTy),
           getOffsetTypeAlign(TargetTy, NewBeginOffset - NewAllocaBeginOffset),
-          LI.isVolatile(), "load");
+          LI.isVolatile(), LI.getName());
       IsPtrAdjusted = true;
     }
     V = convertValue(DL, IRB, V, TargetTy);





More information about the llvm-commits mailing list