Skip to content

Commit ed86e74

Browse files
committed
Revert "[SROA] Limit the number of allowed slices when trying to split allocas"
This reverts commit e13e808. This causes performance regressions on GPU targets, see #69785. Revert the change for now.
1 parent b002b38 commit ed86e74

File tree

2 files changed

+0
-185
lines changed

2 files changed

+0
-185
lines changed

llvm/lib/Transforms/Scalar/SROA.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,6 @@ static cl::opt<bool> SROAStrictInbounds("sroa-strict-inbounds", cl::init(false),
121121
/// Disable running mem2reg during SROA in order to test or debug SROA.
122122
static cl::opt<bool> SROASkipMem2Reg("sroa-skip-mem2reg", cl::init(false),
123123
cl::Hidden);
124-
125-
/// The maximum number of alloca slices allowed when splitting.
126-
static cl::opt<int>
127-
SROAMaxAllocaSlices("sroa-max-alloca-slices", cl::init(1024),
128-
cl::desc("Maximum number of alloca slices allowed "
129-
"after which splitting is not attempted"),
130-
cl::Hidden);
131-
132124
namespace {
133125

134126
/// Calculate the fragment of a variable to use when slicing a store
@@ -4953,9 +4945,6 @@ SROAPass::runOnAlloca(AllocaInst &AI) {
49534945
if (AS.isEscaped())
49544946
return {Changed, CFGChanged};
49554947

4956-
if (std::distance(AS.begin(), AS.end()) > SROAMaxAllocaSlices)
4957-
return {Changed, CFGChanged};
4958-
49594948
// Delete all the dead users of this alloca before splitting and rewriting it.
49604949
for (Instruction *DeadUser : AS.getDeadUsers()) {
49614950
// Free up everything used by this instruction.

llvm/test/Transforms/SROA/huge-size.ll

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

0 commit comments

Comments
 (0)