diff options
| author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2003-09-16 05:55:15 +0000 |
|---|---|---|
| committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2003-09-16 05:55:15 +0000 |
| commit | 8579a9a38cd77f2296b9875dd655d09dfca4dd26 (patch) | |
| tree | 332caa685768493f52f02260cd01a52bd0ee8670 /llvm/lib/CodeGen | |
| parent | 67fdd43bff99b84b9e0825b8954efa5a158aeaf9 (diff) | |
| download | bcm5719-llvm-8579a9a38cd77f2296b9875dd655d09dfca4dd26.tar.gz bcm5719-llvm-8579a9a38cd77f2296b9875dd655d09dfca4dd26.zip | |
Add flag to control whether or not delay slots are filled during
instruction scheduling (this is off by default).
llvm-svn: 8553
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp index 00a6a557f2b..392ae04d689 100644 --- a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp +++ b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp @@ -17,6 +17,9 @@ SchedDebugLevel_t SchedDebugLevel; +static cl::opt<bool> EnableFillingDelaySlots("sched-fill-delay-slots", + cl::desc("Fill branch delay slots during local scheduling")); + static cl::opt<SchedDebugLevel_t, true> SDL_opt("dsched", cl::Hidden, cl::location(SchedDebugLevel), cl::desc("enable instruction scheduling debugging information"), @@ -1255,7 +1258,8 @@ ChooseInstructionsForDelaySlots(SchedulingManager& S, MachineBasicBlock &MBB, std::vector<SchedGraphNode*> delayNodeVec; const MachineInstr* brInstr = NULL; - if (termInstr->getOpcode() != Instruction::Ret) + if (EnableFillingDelaySlots && + termInstr->getOpcode() != Instruction::Ret) { // To find instructions that need delay slots without searching the full // machine code, we assume that the only delayed instructions are CALLs @@ -1285,6 +1289,8 @@ ChooseInstructionsForDelaySlots(SchedulingManager& S, MachineBasicBlock &MBB, // Also mark delay slots for other delayed instructions to hold NOPs. // Simply passing in an empty delayNodeVec will have this effect. + // If brInstr is not handled above (EnableFillingDelaySlots == false), + // brInstr will be NULL so this will handle the branch instrs. as well. // delayNodeVec.clear(); for (unsigned i=0; i < MBB.size(); ++i) |

