[PATCH] D97414: [ThinLTO][NewPM] Clean up dead code under -O0

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 14:49:35 PST 2021


tejohnson added inline comments.


================
Comment at: llvm/lib/Passes/PassBuilder.cpp:1542
 
-  if (Level == OptimizationLevel::O0)
+  if (Level == OptimizationLevel::O0) {
+    // Drop available_externally and unreferenced globals. This is necessary
----------------
Looking at the old PM, we also call:
MPM.add(createLowerTypeTestsPass(nullptr, nullptr, true));

to drop any leftover type tests. Thinking that should probably get added here too (it's normally done below in the ModuleSimplificationPipeline, but of course that doesn't get reached for O0).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97414



More information about the llvm-commits mailing list