[PATCH] D150375: [FuncSpec] Replace LoopInfo with BlockFrequencyInfo.

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 10:37:45 PDT 2023


aeubanks added a comment.

In D150375#4376283 <https://reviews.llvm.org/D150375#4376283>, @bjope wrote:

> So to summarize what I think is going on (more or less by just looking at the code, I haven't been running it in a debugger):
>
> 1. When setting up the DomTreeUpdater the use of  `FAM.getCachedResult<PostDominatorTreeAnalysis>(F)` might result in not finding any cached PDT. So the DomTreeUpdater will not update PDT.
> 2. Later as a side-effect of using BlockFrequencyAnalysis, a PDT is created and calculated.
> 3. Optimizations are done, without updating the now existing PDT.
> 4. The pass says that PDT is preserved. But it has not been updated.

sounds likely to me

writing a StandardInstrumentations instrumentation that checks if cached analyses like (Post)DomTree, MSAA, etc are still valid after a function pass would be cool and would probably catch this more easily (assuming `PDT.verify()` would complain here)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150375



More information about the llvm-commits mailing list