[PATCH] D94783: [LTO] Remove options to disable inlining and GVNLoadPRE.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 15 09:42:46 PST 2021


fhahn added inline comments.


================
Comment at: llvm/lib/LTO/LTOCodeGenerator.cpp:579
   PassManagerBuilder PMB;
-  PMB.DisableGVNLoadPRE = DisableGVNLoadPRE;
-  PMB.LoopVectorize = !DisableVectorization;
-  PMB.SLPVectorize = !DisableVectorization;
-  if (!DisableInline)
-    PMB.Inliner = createFunctionInliningPass();
+  PMB.LoopVectorize = OptLevel > 1;
+  PMB.SLPVectorize = OptLevel > 1;
----------------
tejohnson wrote:
> Both ThinLTOCodeGenerator.cpp and LTOBackend.cpp set these to true unconditionally. Should we be consistent here?
Ah right, I was originally looking at the code in the gold-plugin, which sets it based on the opt-level. But you are right, the option is ignored in `LTOBackend.cpp` when using the legacy pass manager. I'll update the code here to also set it unconditionally.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94783



More information about the llvm-commits mailing list