aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-10-16 21:06:15 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-10-16 21:06:15 +0000
commitfa16354e0370fe884830286923352268b036737d (patch)
tree51f5245dad4140831499d493abbec59c6b823ee4 /include/llvm
parentbf57b52ba424bbaaa6e2d25dd4df731deb59f959 (diff)
downloadexternal_llvm-fa16354e0370fe884830286923352268b036737d.zip
external_llvm-fa16354e0370fe884830286923352268b036737d.tar.gz
external_llvm-fa16354e0370fe884830286923352268b036737d.tar.bz2
Change createPostRAScheduler so it can be turned off at llc -O1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/CodeGen/Passes.h7
-rw-r--r--include/llvm/Target/TargetSubtarget.h11
2 files changed, 12 insertions, 6 deletions
diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h
index 1e7115e..d0d6103 100644
--- a/include/llvm/CodeGen/Passes.h
+++ b/include/llvm/CodeGen/Passes.h
@@ -15,13 +15,13 @@
#ifndef LLVM_CODEGEN_PASSES_H
#define LLVM_CODEGEN_PASSES_H
+#include "llvm/Target/TargetMachine.h"
#include <string>
namespace llvm {
class FunctionPass;
class PassInfo;
- class TargetMachine;
class TargetLowering;
class RegisterCoalescer;
class raw_ostream;
@@ -119,8 +119,9 @@ namespace llvm {
///
FunctionPass *createLowerSubregsPass();
- /// createPostRAScheduler - under development.
- FunctionPass *createPostRAScheduler();
+ /// createPostRAScheduler - This pass performs post register allocation
+ /// scheduling.
+ FunctionPass *createPostRAScheduler(CodeGenOpt::Level OptLevel);
/// BranchFolding Pass - This pass performs machine code CFG based
/// optimizations to delete branches to branches, eliminate branches to
diff --git a/include/llvm/Target/TargetSubtarget.h b/include/llvm/Target/TargetSubtarget.h
index ac094f6..5edb86f 100644
--- a/include/llvm/Target/TargetSubtarget.h
+++ b/include/llvm/Target/TargetSubtarget.h
@@ -14,6 +14,8 @@
#ifndef LLVM_TARGET_TARGETSUBTARGET_H
#define LLVM_TARGET_TARGETSUBTARGET_H
+#include "llvm/Target/TargetMachine.h"
+
namespace llvm {
class SDep;
@@ -39,9 +41,12 @@ public:
/// should be attempted.
virtual unsigned getSpecialAddressLatency() const { return 0; }
- // enablePostRAScheduler - Return true to enable
- // post-register-allocation scheduling.
- virtual bool enablePostRAScheduler() const { return false; }
+ // enablePostRAScheduler - If the target can benefit from post-regalloc
+ // scheduling and the specified optimization level meets the requirement
+ // return true to enable post-register-allocation scheduling.
+ virtual bool enablePostRAScheduler(CodeGenOpt::Level OptLevel) const {
+ return false;
+ }
// adjustSchedDependency - Perform target specific adjustments to
// the latency of a schedule dependency.