Skip to content

Commit 02efef0

Browse files
committed
Reverting revision 281960 due to test failures.
llvm-svn: 281961
1 parent d3686e5 commit 02efef0

File tree

2 files changed

+2
-120
lines changed

2 files changed

+2
-120
lines changed

llvm/lib/Transforms/Scalar/SROA.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2482,10 +2482,8 @@ class llvm::sroa::AllocaSliceRewriter
24822482
}
24832483
V = convertValue(DL, IRB, V, NewAllocaTy);
24842484
StoreInst *Store = IRB.CreateAlignedStore(V, &NewAI, NewAI.getAlignment());
2485-
auto LoopParMD =
2486-
makeArrayRef((unsigned)LLVMContext::MD_mem_parallel_loop_access);
2487-
Store->copyMetadata(SI, LoopParMD);
24882485
Pass.DeadInsts.insert(&SI);
2486+
(void)Store;
24892487
DEBUG(dbgs() << " to: " << *Store << "\n");
24902488
return true;
24912489
}
@@ -2547,9 +2545,6 @@ class llvm::sroa::AllocaSliceRewriter
25472545
NewSI = IRB.CreateAlignedStore(V, NewPtr, getSliceAlign(V->getType()),
25482546
SI.isVolatile());
25492547
}
2550-
auto LoopParMD =
2551-
makeArrayRef((unsigned)LLVMContext::MD_mem_parallel_loop_access);
2552-
NewSI->copyMetadata(SI, LoopParMD);
25532548
if (SI.isVolatile())
25542549
NewSI->setAtomic(SI.getOrdering(), SI.getSynchScope());
25552550
Pass.DeadInsts.insert(&SI);
@@ -3565,8 +3560,6 @@ bool SROA::presplitLoadsAndStores(AllocaInst &AI, AllocaSlices &AS) {
35653560

35663561
uint64_t PartOffset = 0, PartSize = Offsets.Splits.front();
35673562
int Idx = 0, Size = Offsets.Splits.size();
3568-
auto LoopParMD =
3569-
makeArrayRef((unsigned)LLVMContext::MD_mem_parallel_loop_access);
35703563
for (;;) {
35713564
auto *PartTy = Type::getIntNTy(Ty->getContext(), PartSize * 8);
35723565
auto *PartPtrTy = PartTy->getPointerTo(LI->getPointerAddressSpace());
@@ -3576,7 +3569,6 @@ bool SROA::presplitLoadsAndStores(AllocaInst &AI, AllocaSlices &AS) {
35763569
PartPtrTy, BasePtr->getName() + "."),
35773570
getAdjustedAlignment(LI, PartOffset, DL), /*IsVolatile*/ false,
35783571
LI->getName());
3579-
PLoad->copyMetadata(*LI, LoopParMD);
35803572

35813573
// Append this load onto the list of split loads so we can find it later
35823574
// to rewrite the stores.
@@ -3629,7 +3621,7 @@ bool SROA::presplitLoadsAndStores(AllocaInst &AI, AllocaSlices &AS) {
36293621
APInt(DL.getPointerSizeInBits(), PartOffset),
36303622
PartPtrTy, StoreBasePtr->getName() + "."),
36313623
getAdjustedAlignment(SI, PartOffset, DL), /*IsVolatile*/ false);
3632-
PStore->copyMetadata(*LI, LoopParMD);
3624+
(void)PStore;
36333625
DEBUG(dbgs() << " +" << PartOffset << ":" << *PStore << "\n");
36343626
}
36353627

llvm/test/Transforms/SROA/mem-par-metadata-sroa.ll

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)