[PATCH] D106448: [llvm][Inline] Add a module level inliner

Liqiang Tao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 22 05:36:54 PDT 2021


taolq added inline comments.


================
Comment at: llvm/lib/Passes/PassBuilder.cpp:113
 #include "llvm/Transforms/IPO/MergeFunctions.h"
+#include "llvm/Transforms/IPO/ModuleInliner.h"
 #include "llvm/Transforms/IPO/OpenMPOpt.h"
----------------
kazu wrote:
> You should be able to remove this line if you are not otherwise changing `PassBuilder.cpp` at all.
I changed `PassRegistry.def`, here is a compilation error without this line in that file.


================
Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:683-684
 
+  if (EnableModuleInliner)
+    IP.EnableDeferral = false;
+
----------------
kazu wrote:
> Why do you need to do this?  Performance reasons?  Correctness?
For performance and simplicity.
Deferral logic is necessary for bottom-up inlining, while unnecessary in priority-based inlining. So I decided to disable this logic.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106448



More information about the llvm-commits mailing list