aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsDelaySlotFiller.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-08-24 20:40:15 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-08-24 20:40:15 +0000
commit16865d06128c266b5505cc21f5d086d18173408c (patch)
treeaf72fa7d11469231e5f5c11356f0710a49fd0f42 /lib/Target/Mips/MipsDelaySlotFiller.cpp
parent45d8dbc92d365e9c0a08ceb0bc7a9014e6064bdb (diff)
Disable Mips' delay slot filler when optimization level is O0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162589 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsDelaySlotFiller.cpp')
-rw-r--r--lib/Target/Mips/MipsDelaySlotFiller.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsDelaySlotFiller.cpp b/lib/Target/Mips/MipsDelaySlotFiller.cpp
index 8fe3ba6171..e3c8ed75cf 100644
--- a/lib/Target/Mips/MipsDelaySlotFiller.cpp
+++ b/lib/Target/Mips/MipsDelaySlotFiller.cpp
@@ -115,7 +115,9 @@ runOnMachineBasicBlock(MachineBasicBlock &MBB) {
InstrIter D;
- if (!DisableDelaySlotFiller && findDelayInstr(MBB, I, D)) {
+ // Delay slot filling is disabled at -O0.
+ if (!DisableDelaySlotFiller && (TM.getOptLevel() != CodeGenOpt::None) &&
+ findDelayInstr(MBB, I, D)) {
MBB.splice(llvm::next(I), &MBB, D);
++UsefulSlots;
} else