[llvm] r270418 - [Sparc] LEON erratum fix - Delay Slot Filler modification.
Chris Dewhurst via llvm-commits
llvm-commits at lists.llvm.org
Mon May 23 04:52:33 PDT 2016
Author: lerochris
Date: Mon May 23 06:52:28 2016
New Revision: 270418
URL: http://llvm.org/viewvc/llvm-project?rev=270418&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Target/Sparc/DelaySlotFiller.cpp
Modified: llvm/trunk/lib/Target/Sparc/DelaySlotFiller.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/DelaySlotFiller.cpp?rev=270418&r1=270417&r2=270418&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/DelaySlotFiller.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/DelaySlotFiller.cpp Mon May 23 06:52:28 2016
@@ -273,6 +273,15 @@ bool Filler::delayHasHazard(MachineBasic
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;
}
More information about the llvm-commits
mailing list