[PATCH] D28336: Replace addEarlyAsPossiblePasses callback with adjustPassManager

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 17:02:16 PST 2017


jlebar added a subscriber: chandlerc.
jlebar added a comment.

This seems like a reasonable thing to do to me, but I'd like @chandlerc to sign off on it.

Note that it still doesn't quite get you module-level early-as-possible passes, because you have to use the EarlyModule extension point.  But at least we don't have to add a new interface to the TM to let it muck with that extension point...

> If approved the similar change to clang's BackendUtil.cpp will be created.

If you want use can use the monorepo to land these two patches as a single unit, http://llvm.org/docs/GettingStarted.html#for-developers-to-work-with-a-git-monorepo



================
Comment at: include/llvm/Target/TargetMachine.h:218
 
-  /// Add target-specific function passes that should be run as early as
-  /// possible in the optimization pipeline.  Most TargetMachines have no such
-  /// passes.
-  virtual void addEarlyAsPossiblePasses(PassManagerBase &) {}
+  /// Allow target to take custom steps on Pass Manager.
+  virtual void adjustPassManager(PassManagerBuilder &) {}
----------------
Perhaps something like

> Allow the target to modify the pass manager, e.g. by calling PassManagerBuilder::addExtension.


Repository:
  rL LLVM

https://reviews.llvm.org/D28336





More information about the llvm-commits mailing list