Skip to content

Commit d82d5e3

Browse files
paigealesys_zuul
authored andcommitted
Revert of commit 51f5fdc
Change-Id: Icf1835b52f0e18683a75b5d379d9fe4ae1edf790
1 parent b4ff3ec commit d82d5e3

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

IGC/Compiler/GenTTI.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,6 @@ namespace llvm {
222222
}
223223
return Total - PHIs;
224224
};
225-
auto countIntegerOperations = [](BasicBlock* BB) {
226-
unsigned Int_Instructions = 0;
227-
for (auto BI = BB->begin(), BE = BB->end(); BI != BE; ++BI) {
228-
if (isa<IntegerType>((&*BI)->getType()))
229-
++Int_Instructions;
230-
}
231-
return Int_Instructions;
232-
};
233225
auto hasLoad = [](BasicBlock* BB) {
234226
for (auto BI = BB->begin(), BE = BB->end(); BI != BE; ++BI)
235227
if (isa<LoadInst>(&*BI))
@@ -251,13 +243,11 @@ namespace llvm {
251243
};
252244
// For innermost loop, allow certain patterns.
253245
unsigned Count = 0;
254-
unsigned Int_Count = 0;
255246
bool HasCall = false;
256247
bool HasStore = false;
257248
bool MayHasLoadInHeaderOnly = true;
258249
for (auto BI = L->block_begin(), BE = L->block_end(); BI != BE; ++BI) {
259250
Count += countNonPHI(*BI);
260-
Int_Count += countIntegerOperations(*BI);
261251
HasCall |= hasCall(*BI);
262252
HasStore |= hasStore(*BI);
263253
if (L->getHeader() != *BI)
@@ -273,15 +263,6 @@ namespace llvm {
273263
// The following is only available and required from LLVM 3.7+.
274264
UP.AllowExpensiveTripCount = true;
275265
}
276-
//Controls stack size growth being too big to compile. When we get into SCEV
277-
//and start processing the i32 instructions we can get too deep in the call stack
278-
//that we cause a stack overflow during compilation.
279-
unsigned Total_Potential_Inst = TripCount * Int_Count;
280-
if (Total_Potential_Inst > 2700)
281-
{
282-
UP.Threshold = 2000;
283-
UP.PartialThreshold = 2000;
284-
}
285266
}
286267
return;
287268
}

0 commit comments

Comments
 (0)