diff options
| author | David Goodwin <david_goodwin@apple.com> | 2009-09-30 00:10:16 +0000 |
|---|---|---|
| committer | David Goodwin <david_goodwin@apple.com> | 2009-09-30 00:10:16 +0000 |
| commit | 17199b56b0ac70028412f51d4586fb796877eb11 (patch) | |
| tree | 8cc448b589468296516a87c5d73281c66c102518 /llvm/lib/CodeGen/PostRASchedulerList.cpp | |
| parent | aa0beea9a1bf6912f04a572c76503b524f96fee4 (diff) | |
| download | bcm5719-llvm-17199b56b0ac70028412f51d4586fb796877eb11.tar.gz bcm5719-llvm-17199b56b0ac70028412f51d4586fb796877eb11.zip | |
Remove -post-RA-schedule flag and add a TargetSubtarget method to enable post-register-allocation scheduling. By default it is off. For ARM, enable/disable with -mattr=+/-postrasched. Enable by default for cortex-a8.
llvm-svn: 83122
Diffstat (limited to 'llvm/lib/CodeGen/PostRASchedulerList.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/PostRASchedulerList.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/PostRASchedulerList.cpp b/llvm/lib/CodeGen/PostRASchedulerList.cpp index 9d75b25b82c..42954eac4f6 100644 --- a/llvm/lib/CodeGen/PostRASchedulerList.cpp +++ b/llvm/lib/CodeGen/PostRASchedulerList.cpp @@ -34,6 +34,7 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetRegisterInfo.h" +#include "llvm/Target/TargetSubtarget.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" @@ -209,6 +210,11 @@ static bool isSchedulingBoundary(const MachineInstr *MI, } bool PostRAScheduler::runOnMachineFunction(MachineFunction &Fn) { + // Check that post-RA scheduling is enabled for this function + const TargetSubtarget &ST = Fn.getTarget().getSubtarget<TargetSubtarget>(); + if (!ST.enablePostRAScheduler()) + return true; + DEBUG(errs() << "PostRAScheduler\n"); const MachineLoopInfo &MLI = getAnalysis<MachineLoopInfo>(); |

