[llvm] [MemProf] Add option to match summary and definition strictly (PR #83665)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 13:23:25 PDT 2024


teresajohnson wrote:

> > > FYI I tried an internal target and I'm getting a failure in applyImport with this change. Let me see if I can identify the reason and will get back to you.
> > 
> > 
> > The error I am getting is the assert: llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp:3383 in bool llvm::MemProfContextDisambiguation::applyImport(Module &): SrcModuleMD && "enable-import-metadata is needed to emit thinlto_src_module"
> > I am passing -enable-memprof-context-disambiguation, however, so I would have thought your change to FunctionImport.cpp should force enable the addition of this metadata. When I explicitly add -enable-import-metadata the assert goes away, so that change isn't having the intended effect. I noticed your test still passes both of these flags, maybe try removing -enable-import-metadata to see if you can reproduce.
> 
> Thanks. The reason looks like I omit to emit `thinlto_src_module` to alias. Fix in [caf73e5](https://github.com/llvm/llvm-project/commit/caf73e50205b33325065513e8cdbef477716fdc9). Can you try again?

Confirming that fixed my issue.

https://github.com/llvm/llvm-project/pull/83665


More information about the llvm-commits mailing list