File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -3056,11 +3056,18 @@ bool EarlyOutPatterns::processBlock(BasicBlock* BB)
30563056 DirectOutputPatternEnable = (IGC_GET_FLAG_VALUE (EarlyOutPatternSelectPS) & 0x10 ) != 0 ;
30573057 }
30583058
3059+ Instruction* nextII = nullptr ;
30593060 while (BBSplit)
30603061 {
30613062 BBSplit = false ;
3062- for (auto & II : *BB )
3063+ for (auto iter = BB-> begin ();iter != BB-> end () ;iter++ )
30633064 {
3065+ if (nextII && iter != nextII->getIterator ())
3066+ {
3067+ iter = nextII->getIterator ();
3068+ }
3069+ Instruction& II = *iter;
3070+ nextII = II.getNextNode ();
30643071 SmallVector<Instruction*, 4 > Values;
30653072 bool OptCandidate = false ;
30663073 Instruction* Root = &II;
@@ -3135,9 +3142,9 @@ bool EarlyOutPatterns::processBlock(BasicBlock* BB)
31353142
31363143 if (OptCandidate)
31373144 {
3138- BB = tryFoldAndSplit (Values, Root,
3145+ BasicBlock* BB1 = tryFoldAndSplit (Values, Root,
31393146 FoldThreshold, FoldThresholdMultiChannel, RatioNeeded);
3140- BBSplit = (BB != nullptr );
3147+ BBSplit = (BB1 != nullptr );
31413148
31423149 if (BBSplit)
31433150 break ;
You can’t perform that action at this time.
0 commit comments