mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-04 06:26:28 +00:00
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183488 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -44,10 +44,16 @@ ARMHazardRecognizer::getHazardType(SUnit *SU, int Stalls) {
|
||||
if (LastMI && (MCID.TSFlags & ARMII::DomainMask) != ARMII::DomainGeneral) {
|
||||
MachineInstr *DefMI = LastMI;
|
||||
const MCInstrDesc &LastMCID = LastMI->getDesc();
|
||||
const TargetMachine &TM =
|
||||
MI->getParent()->getParent()->getTarget();
|
||||
const ARMBaseInstrInfo &TII =
|
||||
*static_cast<const ARMBaseInstrInfo*>(TM.getInstrInfo());
|
||||
|
||||
// Skip over one non-VFP / NEON instruction.
|
||||
if (!LastMI->isBarrier() &&
|
||||
// On A9, AGU and NEON/FPU are muxed.
|
||||
!(STI.isLikeA9() && (LastMI->mayLoad() || LastMI->mayStore())) &&
|
||||
!(TII.getSubtarget().isLikeA9() &&
|
||||
(LastMI->mayLoad() || LastMI->mayStore())) &&
|
||||
(LastMCID.TSFlags & ARMII::DomainMask) == ARMII::DomainGeneral) {
|
||||
MachineBasicBlock::iterator I = LastMI;
|
||||
if (I != LastMI->getParent()->begin()) {
|
||||
@@ -58,7 +64,7 @@ ARMHazardRecognizer::getHazardType(SUnit *SU, int Stalls) {
|
||||
|
||||
if (TII.isFpMLxInstruction(DefMI->getOpcode()) &&
|
||||
(TII.canCauseFpMLxStall(MI->getOpcode()) ||
|
||||
hasRAWHazard(DefMI, MI, TRI))) {
|
||||
hasRAWHazard(DefMI, MI, TII.getRegisterInfo()))) {
|
||||
// Try to schedule another instruction for the next 4 cycles.
|
||||
if (FpMLxStalls == 0)
|
||||
FpMLxStalls = 4;
|
||||
|
Reference in New Issue
Block a user