summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Dewhurst <chris.dewhurst@lero.ie>2016-05-23 11:52:28 +0000
committerChris Dewhurst <chris.dewhurst@lero.ie>2016-05-23 11:52:28 +0000
commit6bc3e13133fc291e2ca373512fc3e443e1cb8b59 (patch)
tree5230baf2be48cf3672572512e9c9a8accab0a5c0 /llvm/lib
parent4f7cac3674d5f06e2acf2694db86e0a37de6f47c (diff)
downloadbcm5719-llvm-6bc3e13133fc291e2ca373512fc3e443e1cb8b59.tar.gz
bcm5719-llvm-6bc3e13133fc291e2ca373512fc3e443e1cb8b59.zip
[Sparc] LEON erratum fix - Delay Slot Filler modification.
This code should have been with the previous check-in (r270417) and prevents the DelaySlotFiller pass being utilized in functions where the erratum fix has been applied as this will break the run-time code. llvm-svn: 270418
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/Sparc/DelaySlotFiller.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/DelaySlotFiller.cpp b/llvm/lib/Target/Sparc/DelaySlotFiller.cpp
index 48c15cab376..442e7263e39 100644
--- a/llvm/lib/Target/Sparc/DelaySlotFiller.cpp
+++ b/llvm/lib/Target/Sparc/DelaySlotFiller.cpp
@@ -273,6 +273,15 @@ bool Filler::delayHasHazard(MachineBasicBlock::iterator candidate,
return true;
}
}
+
+ unsigned Opcode = candidate->getOpcode();
+ // LD and LDD may have NOPs inserted afterwards in the case of some LEON
+ // processors, so we can't use the delay slot if this feature is switched-on.
+ if (Subtarget->insertNOPLoad()
+ &&
+ Opcode >= SP::LDDArr && Opcode <= SP::LDrr)
+ return true;
+
return false;
}
OpenPOWER on IntegriCloud