summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/Passes.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-01-17 00:58:38 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-01-17 00:58:38 +0000
commit02c6325a4592fefebc837b677eaf87dc532ecb7c (patch)
treea5e447051368b3abd09d3a806a30b1b415b61275 /include/llvm/CodeGen/Passes.h
parentc147b678206db510336ee95c3b55dc9c0ff19595 (diff)
downloadllvm-02c6325a4592fefebc837b677eaf87dc532ecb7c.tar.gz
llvm-02c6325a4592fefebc837b677eaf87dc532ecb7c.tar.bz2
llvm-02c6325a4592fefebc837b677eaf87dc532ecb7c.tar.xz
Provide a place for targets to insert ILP optimization passes.
Move the early if-conversion pass into this group. ILP optimizations usually need to find the right balance between register pressure and ILP using the MachineTraceMetrics analysis to identify critical paths and estimate other costs. Such passes should run together so they can share dominator tree and loop info analyses. Besides if-conversion, future passes to run here here could include expression height reduction and ARM's MLxExpansion pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/Passes.h')
-rw-r--r--include/llvm/CodeGen/Passes.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h
index 1746fd4c14..5f710e68fe 100644
--- a/include/llvm/CodeGen/Passes.h
+++ b/include/llvm/CodeGen/Passes.h
@@ -181,6 +181,16 @@ protected:
/// instructions in SSA form.
virtual void addMachineSSAOptimization();
+ /// Add passes that optimize instruction level parallelism for out-of-order
+ /// targets. These passes are run while the machine code is still in SSA
+ /// form, so they can use MachineTraceMetrics to control their heuristics.
+ ///
+ /// All passes added here should preserve the MachineDominatorTree,
+ /// MachineLoopInfo, and MachineTraceMetrics analyses.
+ virtual bool addILPOpts() {
+ return false;
+ }
+
/// addPreRegAlloc - This method may be implemented by targets that want to
/// run passes immediately before register allocation. This should return
/// true if -print-machineinstrs should print after these passes.