Skip to content

Commit

Permalink
[SROA] Use the original load name with the SROA-prefixed IRB rather than
Browse files Browse the repository at this point in the history
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202140 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chandlerc committed Feb 25, 2014
1 parent f5701e4 commit a2ff581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Transforms/Scalar/SROA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2164,13 +2164,13 @@ class AllocaSliceRewriter : public InstVisitor<AllocaSliceRewriter, bool> {
} 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);
Expand Down

0 comments on commit a2ff581

Please sign in to comment.