We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ccfb90 commit fd031ebCopy full SHA for fd031eb
IGC/Compiler/GenTTI.cpp
@@ -383,14 +383,15 @@ namespace llvm {
383
if (L->getNumBlocks() != 1) {
384
if (IGC_IS_FLAG_ENABLED(EnableAdvRuntimeUnroll) && IGCLLVM::isInnermost(L)) {
385
auto countNonPHI = [](BasicBlock* BB) {
386
- unsigned Total = BB->size();
+ // Count the number of instructions in the basic block without dbg instructions
387
+ unsigned InstCountInBB = BB->sizeWithoutDebug();
388
unsigned PHIs = 0;
389
for (auto BI = BB->begin(), BE = BB->end(); BI != BE; ++BI) {
390
if (!isa<PHINode>(&*BI))
391
break;
392
++PHIs;
393
}
- return Total - PHIs;
394
+ return InstCountInBB - PHIs;
395
};
396
auto hasLoad = [](BasicBlock* BB) {
397
for (auto BI = BB->begin(), BE = BB->end(); BI != BE; ++BI)
0 commit comments