[PATCH] D18617: Call TargetMachine::addEarlyAsPossiblePasses from BackendUtil.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 27 12:18:44 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL267764: Call TargetMachine::addEarlyAsPossiblePasses from BackendUtil. (authored by jlebar).

Changed prior to commit:
  http://reviews.llvm.org/D18617?vs=53415&id=55290#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D18617

Files:
  cfe/trunk/lib/CodeGen/BackendUtil.cpp

Index: cfe/trunk/lib/CodeGen/BackendUtil.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp
@@ -354,6 +354,14 @@
     return;
   }
 
+  // Add target-specific passes that need to run as early as possible.
+  if (TM)
+    PMBuilder.addExtension(
+        PassManagerBuilder::EP_EarlyAsPossible,
+        [&](const PassManagerBuilder &, legacy::PassManagerBase &PM) {
+          TM->addEarlyAsPossiblePasses(PM);
+        });
+
   PMBuilder.addExtension(PassManagerBuilder::EP_EarlyAsPossible,
                          addAddDiscriminatorsPass);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18617.55290.patch
Type: text/x-patch
Size: 652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160427/d24e2325/attachment.bin>


More information about the cfe-commits mailing list