[PATCH] D60162: [ThinLTO] Add module flags for TargetLibraryInfoImpl and use in LTO backends

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 13:49:34 PDT 2019


steven_wu added inline comments.


================
Comment at: llvm/lib/LTO/LTOBackend.cpp:221
 
+static TargetLibraryInfoImpl *createTLII(Module &Mod, TargetMachine *TM) {
+  TargetLibraryInfoImpl *TLII =
----------------
tejohnson wrote:
> tejohnson wrote:
> > steven_wu wrote:
> > > Should this be done not just for LTOBackend but for regular compilation as well? LegacyCodegenerator and llc can all be benefit from a matching TargetLibraryInfo?
> > Yeah, probably. I think the best way to have this utilized everywhere is to move the below code into the TargetLibraryInfoImpl itself - by having it also take the Module as a parameter). Probably as a required parameter, to ensure it is used consistently. WDYT? 
> I meant, "into the TargetLibraryInfoImpl constructor"
SGTM


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60162





More information about the llvm-commits mailing list