[PATCH] D150210: [CodeGenPrepare] Fix for using outdated/corrupt LoopInfo

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 10 10:25:33 PDT 2023


chill planned changes to this revision.
chill added inline comments.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:602
     MadeChange = false;
-    DT.reset();
+    resetDT();
 
----------------
efriedma wrote:
> chill wrote:
> > efriedma wrote:
> > > InitialLI is pointless if you're going to immediately throw it away.
> > It's used in the construction of `BranchProbabilityInfo` and `BlockGFrequenceInfo`.
> I guess, but you don't need to store it in the class for that.
> 
> Is the BPI also broken by CFG modifications?
> I guess, but you don't need to store it in the class for that.
Ah, indeed.

> Is the BPI also broken by CFG modifications?
Looks like it, yes.



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150210/new/

https://reviews.llvm.org/D150210



More information about the llvm-commits mailing list