[PATCH] D21737: [PATCH] [CodeGen] Insert TargetLibraryInfoWrapperPass before anything else.

Mehdi AMINI via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 14 21:49:57 PST 2016


mehdi_amini accepted this revision.
mehdi_amini added a comment.
This revision is now accepted and ready to land.

LGTM. Thanks!



================
Comment at: lib/CodeGen/BackendUtil.cpp:422
   // Set up the per-function pass manager.
+  FPM.add(new TargetLibraryInfoWrapperPass(*TLII));
   if (CodeGenOpts.VerifyModule)
----------------
koriakin wrote:
> mehdi_amini wrote:
> > This seems unnecessary?
> This ensures FPM passes get the right TLI as well - since I'm removing the PMBuilder.LIbraryInfo assignment, they would otherwise get the default-constructed ones.  Or should I keep the assignment instead, and only special-case MPM?
Oh right, I was looking at the existing code and I missed that you were removing the LibraryInfo initialization.


Repository:
  rL LLVM

https://reviews.llvm.org/D21737





More information about the cfe-commits mailing list