summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2004-11-18 18:38:01 +0000
committerTanya Lattner <tonic@nondot.org>2004-11-18 18:38:01 +0000
commit21590db8fdedc636700b8c662172f909be13abda (patch)
tree35f75940fcbcbfa82ebf58e9e2f7ecb607d01757 /llvm/lib
parentde5626cd40821b19a5f35ed3c0f440ceecf7aeca (diff)
downloadbcm5719-llvm-21590db8fdedc636700b8c662172f909be13abda.tar.gz
bcm5719-llvm-21590db8fdedc636700b8c662172f909be13abda.zip
Adding option to llc for ModuloScheduling. By default it is turned off.
llvm-svn: 17959
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp
index 3e0e8b931cc..f5e19512ba4 100644
--- a/llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp
+++ b/llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp
@@ -66,6 +66,9 @@ namespace {
cl::opt<bool> DisableStrip("disable-strip",
cl::desc("Do not strip the LLVM bytecode in executable"));
+
+ cl::opt<bool> EnableModSched("enable-ModSched", cl::desc("Enable modulo scheduling pass instead of local scheduling"));
+
// Register the target.
RegisterTarget<SparcV9TargetMachine> X("sparcv9", " SPARC V9");
}
@@ -192,9 +195,17 @@ SparcV9TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out
PM.add(createSparcV9BurgInstSelector(*this));
- if (!DisableSched)
- PM.add(createInstructionSchedulingWithSSAPass(*this));
+ if(PrintMachineCode)
+ PM.add(createMachineFunctionPrinterPass(&std::cerr, "Before modulo scheduling:\n"));
+ //Use ModuloScheduling if enabled, otherwise use local scheduling if not disabled.
+ if(EnableModSched)
+ PM.add(createModuloSchedulingPass(*this));
+ else {
+ if (!DisableSched)
+ PM.add(createInstructionSchedulingWithSSAPass(*this));
+ }
+
if (PrintMachineCode)
PM.add(createMachineFunctionPrinterPass(&std::cerr, "Before reg alloc:\n"));
OpenPOWER on IntegriCloud