[PATCH] D130955: [InstrProf] Clear `ReferencedNames` as well (NFC).

Michele Scandale via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 20:46:37 PDT 2022


michele.scandale added a comment.

In D130955#3696607 <https://reviews.llvm.org/D130955#3696607>, @davidxl wrote:

> Do you have a test case showing the problem?

There is no simple test case that shows the issue. As I mentioned https://reviews.llvm.org/D130952#3693697 and in the comments of D130954 <https://reviews.llvm.org/D130954>, this is something I discovered while investigating issues with running the same pass manager on different modules -- in light of the issue with `ModuleInlinerWrapperPass` I did a local run of the llvm LIT test with a modified version of `opt` where I used the same pass manager to process the input module twice. In this particular case the missing `clear` was causing crashes in the instrprofiling tests as there are stale references to `GlobalVariable` objects in a module that is long gone.

Based on the discussion in D130954 <https://reviews.llvm.org/D130954>, it seems that currently there is no intention to support the use case I was experimenting with, therefore this change is not required.
>From the initial performance analysis rebuilding the pass manager is much cheaper with the new pass manager than the legacy one, and for now I can use such alternative approach for my use case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130955



More information about the llvm-commits mailing list