[PATCH] D18614: Add TargetMachine::addEarlyAsPossiblePasses.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 10:58:05 PDT 2016


jlebar added a comment.

In http://reviews.llvm.org/D18614#414054, @rnk wrote:

> Shouldn't this patch also modify the pass pipeline to call this hook at some point?


AFAICT, it needs to be done outside of llvm proper, see http://reviews.llvm.org/D18617.


================
Comment at: include/llvm/Target/TargetMachine.h:220-221
@@ -219,1 +219,4 @@
 
+  /// Add target-specific function passes that should be run as early as
+  /// possible -- before most machine-independent IR passes.  Most
+  /// TargetMachines have no such passes.
----------------
rnk wrote:
> Maybe this should say "before all mid-level optimization passes". I initially assumed you wanted this to run before IR-level codegen passes (CodeGenPrepare, LSR, etc), but that's what we have today.
I actually do want to run before IR-level codegen passes, see D18617.  I agree that the comment isn't clear, I will change it.


http://reviews.llvm.org/D18614





More information about the llvm-commits mailing list