[llvm] [Backend] Add clearSubtargetMap API for TargetMachine. (PR #112383)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 19 19:24:55 PDT 2024


arsenm wrote:

> If by "explicit initialization" you refer to calling `getSubtargetImpl`, this won't be sufficient, unfortunately. Having something like `TargetMachine::setSubtarget(shared_ptr<TargetSubtargetInfo>)` might help.

I mean the lazy construction of subtargets is an issue. 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) 


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


More information about the llvm-commits mailing list