[PATCH] D76866: Enable new passmanager plugin support for LTO.

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 07:29:50 PDT 2020


serge-sans-paille added inline comments.


================
Comment at: llvm/examples/Bye/Bye.cpp:48
 static llvm::RegisterStandardPasses RegisterBye(
-    llvm::PassManagerBuilder::EP_EarlyAsPossible,
+    llvm::PassManagerBuilder::EP_VectorizerStart,
     [](const llvm::PassManagerBuilder &Builder,
----------------
Why did you change the extension point? Not that it's particularly important for that pass, just being curious.


================
Comment at: llvm/lib/LTO/LTOBackend.cpp:280
+  }
+
   LoopAnalysisManager LAM;
----------------
That's the exact same lines as above. Maybe it's worth putting that in a function?


================
Comment at: llvm/test/Feature/load_extension.ll:1
+; REQUIRES: x86-registered-target
 ; RUN: opt %s %loadbye -goodbye -wave-goodbye -disable-output 2>&1 | FileCheck %s
----------------
efriedma wrote:
> efriedma wrote:
> > serge-sans-paille wrote:
> > > why?
> > Can't run LTO without specifying a target.
> > 
> > Maybe there's some way to get around that if we don't actually generate code; I can experiment a bit.
> Looked at this more.  There isn't any easy solution here, but I guess there are a few options:
> 
> 1. Add a special mode to LTO where it doesn't require a target machine, and just spits out IR.
> 2. Force the LLVM default target triple.  But it's not clear we can reliably generate an object file with that.
> 3. Force the LLVM default target triple, and add a mode to LTO where it doesn't run codegen.
ok, make sense if that's a LTO requirement. I don't think it significantly decreases the coverage of the test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76866





More information about the llvm-commits mailing list