Skip to content

Revert "[ARM][Thumb2] Mark BTI-clearing instructions as scheduling region boundaries" #87699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,25 +286,6 @@ MachineInstr *Thumb2InstrInfo::commuteInstructionImpl(MachineInstr &MI,
return ARMBaseInstrInfo::commuteInstructionImpl(MI, NewMI, OpIdx1, OpIdx2);
}

bool Thumb2InstrInfo::isSchedulingBoundary(const MachineInstr &MI,
const MachineBasicBlock *MBB,
const MachineFunction &MF) const {
// BTI clearing instructions shall not take part in scheduling regions as
// they must stay in their intended place. Although PAC isn't BTI clearing,
// it can be transformed into PACBTI after the pre-RA Machine Scheduling
// has taken place, so its movement must also be restricted.
switch (MI.getOpcode()) {
case ARM::t2BTI:
case ARM::t2PAC:
case ARM::t2PACBTI:
case ARM::t2SG:
return true;
default:
break;
}
return ARMBaseInstrInfo::isSchedulingBoundary(MI, MBB, MF);
}

void llvm::emitT2RegPlusImmediate(MachineBasicBlock &MBB,
MachineBasicBlock::iterator &MBBI,
const DebugLoc &dl, Register DestReg,
Expand Down
4 changes: 0 additions & 4 deletions llvm/lib/Target/ARM/Thumb2InstrInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ class Thumb2InstrInfo : public ARMBaseInstrInfo {
unsigned OpIdx1,
unsigned OpIdx2) const override;

bool isSchedulingBoundary(const MachineInstr &MI,
const MachineBasicBlock *MBB,
const MachineFunction &MF) const override;

private:
void expandLoadStackGuard(MachineBasicBlock::iterator MI) const override;
};
Expand Down
166 changes: 0 additions & 166 deletions llvm/test/CodeGen/ARM/misched-branch-targets.mir

This file was deleted.