[llvm] [Backend] Add clearSubtargetMap API for TargetMachine. (PR #112383)
Nikolay Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 16:38:49 PDT 2024
npanchen wrote:
> I mean the lazy construction of subtargets is an issue.
I don't think lazy construction itself is an issue here: regardless if it's lazy or not, multiple instance of a target machine is going to keep subtargets alive, thus memory footprint is going to stay high for longer than needed.
> You would have to pre-populate the map with any subtargets that are needed in the module (i.e. loop through every function and query the subtarget for each)
That's absolutely fine with a suggestion I made. However, I don't want to derail conversation about that patch. Does it look fine approach to be taken ?
https://github.com/llvm/llvm-project/pull/112383
More information about the llvm-commits
mailing list