mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
MachineInstr: Remove unused parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237726 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1067,8 +1067,7 @@ public:
|
|||||||
/// isSafeToMove - Return true if it is safe to move this instruction. If
|
/// isSafeToMove - Return true if it is safe to move this instruction. If
|
||||||
/// SawStore is set to true, it means that there is a store (or call) between
|
/// SawStore is set to true, it means that there is a store (or call) between
|
||||||
/// the instruction's location and its intended destination.
|
/// the instruction's location and its intended destination.
|
||||||
bool isSafeToMove(const TargetInstrInfo *TII, AliasAnalysis *AA,
|
bool isSafeToMove(AliasAnalysis *AA, bool &SawStore) const;
|
||||||
bool &SawStore) const;
|
|
||||||
|
|
||||||
/// hasOrderedMemoryRef - Return true if this instruction may have an ordered
|
/// hasOrderedMemoryRef - Return true if this instruction may have an ordered
|
||||||
/// or volatile memory reference, or if the information describing the memory
|
/// or volatile memory reference, or if the information describing the memory
|
||||||
|
@ -1683,8 +1683,7 @@ MachineBasicBlock::iterator findHoistingInsertPosAndDeps(MachineBasicBlock *MBB,
|
|||||||
// Also avoid moving code above predicated instruction since it's hard to
|
// Also avoid moving code above predicated instruction since it's hard to
|
||||||
// reason about register liveness with predicated instruction.
|
// reason about register liveness with predicated instruction.
|
||||||
bool DontMoveAcrossStore = true;
|
bool DontMoveAcrossStore = true;
|
||||||
if (!PI->isSafeToMove(TII, nullptr, DontMoveAcrossStore) ||
|
if (!PI->isSafeToMove(nullptr, DontMoveAcrossStore) || TII->isPredicated(PI))
|
||||||
TII->isPredicated(PI))
|
|
||||||
return MBB->end();
|
return MBB->end();
|
||||||
|
|
||||||
|
|
||||||
@ -1822,7 +1821,7 @@ bool BranchFolder::HoistCommonCodeInSuccs(MachineBasicBlock *MBB) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
bool DontMoveAcrossStore = true;
|
bool DontMoveAcrossStore = true;
|
||||||
if (!TIB->isSafeToMove(TII, nullptr, DontMoveAcrossStore))
|
if (!TIB->isSafeToMove(nullptr, DontMoveAcrossStore))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Remove kills from LocalDefsSet, these registers had short live ranges.
|
// Remove kills from LocalDefsSet, these registers had short live ranges.
|
||||||
|
@ -65,7 +65,7 @@ bool DeadMachineInstructionElim::isDead(const MachineInstr *MI) const {
|
|||||||
|
|
||||||
// Don't delete instructions with side effects.
|
// Don't delete instructions with side effects.
|
||||||
bool SawStore = false;
|
bool SawStore = false;
|
||||||
if (!MI->isSafeToMove(TII, nullptr, SawStore) && !MI->isPHI())
|
if (!MI->isSafeToMove(nullptr, SawStore) && !MI->isPHI())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Examine each operand.
|
// Examine each operand.
|
||||||
|
@ -220,7 +220,7 @@ bool SSAIfConv::canSpeculateInstrs(MachineBasicBlock *MBB) {
|
|||||||
|
|
||||||
// We never speculate stores, so an AA pointer isn't necessary.
|
// We never speculate stores, so an AA pointer isn't necessary.
|
||||||
bool DontMoveAcrossStore = true;
|
bool DontMoveAcrossStore = true;
|
||||||
if (!I->isSafeToMove(TII, nullptr, DontMoveAcrossStore)) {
|
if (!I->isSafeToMove(nullptr, DontMoveAcrossStore)) {
|
||||||
DEBUG(dbgs() << "Can't speculate: " << *I);
|
DEBUG(dbgs() << "Can't speculate: " << *I);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1519,10 +1519,9 @@ bool IfConverter::IfConvertDiamond(BBInfo &BBI, IfcvtKind Kind,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool MaySpeculate(const MachineInstr *MI,
|
static bool MaySpeculate(const MachineInstr *MI,
|
||||||
SmallSet<unsigned, 4> &LaterRedefs,
|
SmallSet<unsigned, 4> &LaterRedefs) {
|
||||||
const TargetInstrInfo *TII) {
|
|
||||||
bool SawStore = true;
|
bool SawStore = true;
|
||||||
if (!MI->isSafeToMove(TII, nullptr, SawStore))
|
if (!MI->isSafeToMove(nullptr, SawStore))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
||||||
@ -1553,7 +1552,7 @@ void IfConverter::PredicateBlock(BBInfo &BBI,
|
|||||||
// It may be possible not to predicate an instruction if it's the 'true'
|
// It may be possible not to predicate an instruction if it's the 'true'
|
||||||
// side of a diamond and the 'false' side may re-define the instruction's
|
// side of a diamond and the 'false' side may re-define the instruction's
|
||||||
// defs.
|
// defs.
|
||||||
if (MaySpec && MaySpeculate(I, *LaterRedefs, TII)) {
|
if (MaySpec && MaySpeculate(I, *LaterRedefs)) {
|
||||||
AnyUnpred = true;
|
AnyUnpred = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -196,7 +196,7 @@ bool LiveRangeEdit::foldAsLoad(LiveInterval *LI,
|
|||||||
// We also need to make sure it is safe to move the load.
|
// We also need to make sure it is safe to move the load.
|
||||||
// Assume there are stores between DefMI and UseMI.
|
// Assume there are stores between DefMI and UseMI.
|
||||||
bool SawStore = true;
|
bool SawStore = true;
|
||||||
if (!DefMI->isSafeToMove(&TII, nullptr, SawStore))
|
if (!DefMI->isSafeToMove(nullptr, SawStore))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
DEBUG(dbgs() << "Try to fold single def: " << *DefMI
|
DEBUG(dbgs() << "Try to fold single def: " << *DefMI
|
||||||
@ -235,7 +235,7 @@ void LiveRangeEdit::eliminateDeadDef(MachineInstr *MI, ToShrinkSet &ToShrink) {
|
|||||||
|
|
||||||
// Use the same criteria as DeadMachineInstructionElim.
|
// Use the same criteria as DeadMachineInstructionElim.
|
||||||
bool SawStore = false;
|
bool SawStore = false;
|
||||||
if (!MI->isSafeToMove(&TII, nullptr, SawStore)) {
|
if (!MI->isSafeToMove(nullptr, SawStore)) {
|
||||||
DEBUG(dbgs() << "Can't delete: " << Idx << '\t' << *MI);
|
DEBUG(dbgs() << "Can't delete: " << Idx << '\t' << *MI);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1366,9 +1366,7 @@ void MachineInstr::substituteRegister(unsigned FromReg,
|
|||||||
/// isSafeToMove - Return true if it is safe to move this instruction. If
|
/// isSafeToMove - Return true if it is safe to move this instruction. If
|
||||||
/// SawStore is set to true, it means that there is a store (or call) between
|
/// SawStore is set to true, it means that there is a store (or call) between
|
||||||
/// the instruction's location and its intended destination.
|
/// the instruction's location and its intended destination.
|
||||||
bool MachineInstr::isSafeToMove(const TargetInstrInfo *TII,
|
bool MachineInstr::isSafeToMove(AliasAnalysis *AA, bool &SawStore) const {
|
||||||
AliasAnalysis *AA,
|
|
||||||
bool &SawStore) const {
|
|
||||||
// Ignore stuff that we obviously can't move.
|
// Ignore stuff that we obviously can't move.
|
||||||
//
|
//
|
||||||
// Treat volatile loads as stores. This is not strictly necessary for
|
// Treat volatile loads as stores. This is not strictly necessary for
|
||||||
|
@ -934,7 +934,7 @@ static bool isLoadFromGOTOrConstantPool(MachineInstr &MI) {
|
|||||||
bool MachineLICM::IsLICMCandidate(MachineInstr &I) {
|
bool MachineLICM::IsLICMCandidate(MachineInstr &I) {
|
||||||
// Check if it's safe to move the instruction.
|
// Check if it's safe to move the instruction.
|
||||||
bool DontMoveAcrossStore = true;
|
bool DontMoveAcrossStore = true;
|
||||||
if (!I.isSafeToMove(TII, AA, DontMoveAcrossStore))
|
if (!I.isSafeToMove(AA, DontMoveAcrossStore))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// If it is load then check if it is guaranteed to execute by making sure that
|
// If it is load then check if it is guaranteed to execute by making sure that
|
||||||
|
@ -652,7 +652,7 @@ bool MachineSinking::SinkInstruction(MachineInstr *MI, bool &SawStore) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Check if it's safe to move the instruction.
|
// Check if it's safe to move the instruction.
|
||||||
if (!MI->isSafeToMove(TII, AA, SawStore))
|
if (!MI->isSafeToMove(AA, SawStore))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// FIXME: This should include support for sinking instructions within the
|
// FIXME: This should include support for sinking instructions within the
|
||||||
@ -694,7 +694,7 @@ bool MachineSinking::SinkInstruction(MachineInstr *MI, bool &SawStore) {
|
|||||||
// other code paths.
|
// other code paths.
|
||||||
bool TryBreak = false;
|
bool TryBreak = false;
|
||||||
bool store = true;
|
bool store = true;
|
||||||
if (!MI->isSafeToMove(TII, AA, store)) {
|
if (!MI->isSafeToMove(AA, store)) {
|
||||||
DEBUG(dbgs() << " *** NOTE: Won't sink load along critical edge.\n");
|
DEBUG(dbgs() << " *** NOTE: Won't sink load along critical edge.\n");
|
||||||
TryBreak = true;
|
TryBreak = true;
|
||||||
}
|
}
|
||||||
|
@ -908,7 +908,7 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP,
|
|||||||
if (!definesFullReg(*DefMI, SrcReg))
|
if (!definesFullReg(*DefMI, SrcReg))
|
||||||
return false;
|
return false;
|
||||||
bool SawStore = false;
|
bool SawStore = false;
|
||||||
if (!DefMI->isSafeToMove(TII, AA, SawStore))
|
if (!DefMI->isSafeToMove(AA, SawStore))
|
||||||
return false;
|
return false;
|
||||||
const MCInstrDesc &MCID = DefMI->getDesc();
|
const MCInstrDesc &MCID = DefMI->getDesc();
|
||||||
if (MCID.getNumDefs() != 1)
|
if (MCID.getNumDefs() != 1)
|
||||||
|
@ -189,7 +189,7 @@ sink3AddrInstruction(MachineInstr *MI, unsigned SavedReg,
|
|||||||
|
|
||||||
// Check if it's safe to move this instruction.
|
// Check if it's safe to move this instruction.
|
||||||
bool SeenStore = true; // Be conservative.
|
bool SeenStore = true; // Be conservative.
|
||||||
if (!MI->isSafeToMove(TII, AA, SeenStore))
|
if (!MI->isSafeToMove(AA, SeenStore))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
unsigned DefReg = 0;
|
unsigned DefReg = 0;
|
||||||
@ -861,7 +861,7 @@ rescheduleMIBelowKill(MachineBasicBlock::iterator &mi,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool SeenStore = true;
|
bool SeenStore = true;
|
||||||
if (!MI->isSafeToMove(TII, AA, SeenStore))
|
if (!MI->isSafeToMove(AA, SeenStore))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (TII->getInstrLatency(InstrItins, MI) > 1)
|
if (TII->getInstrLatency(InstrItins, MI) > 1)
|
||||||
@ -1048,7 +1048,7 @@ rescheduleKillAboveMI(MachineBasicBlock::iterator &mi,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool SeenStore = true;
|
bool SeenStore = true;
|
||||||
if (!KillMI->isSafeToMove(TII, AA, SeenStore))
|
if (!KillMI->isSafeToMove(AA, SeenStore))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
SmallSet<unsigned, 2> Uses;
|
SmallSet<unsigned, 2> Uses;
|
||||||
|
@ -416,7 +416,7 @@ bool SSACCmpConv::canSpeculateInstrs(MachineBasicBlock *MBB,
|
|||||||
|
|
||||||
// We never speculate stores, so an AA pointer isn't necessary.
|
// We never speculate stores, so an AA pointer isn't necessary.
|
||||||
bool DontMoveAcrossStore = true;
|
bool DontMoveAcrossStore = true;
|
||||||
if (!I.isSafeToMove(TII, nullptr, DontMoveAcrossStore)) {
|
if (!I.isSafeToMove(nullptr, DontMoveAcrossStore)) {
|
||||||
DEBUG(dbgs() << "Can't speculate: " << I);
|
DEBUG(dbgs() << "Can't speculate: " << I);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1807,8 +1807,7 @@ static MachineInstr *canFoldIntoMOVCC(unsigned Reg,
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
bool DontMoveAcrossStores = true;
|
bool DontMoveAcrossStores = true;
|
||||||
if (!MI->isSafeToMove(TII, /* AliasAnalysis = */ nullptr,
|
if (!MI->isSafeToMove(/* AliasAnalysis = */ nullptr, DontMoveAcrossStores))
|
||||||
DontMoveAcrossStores))
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return MI;
|
return MI;
|
||||||
}
|
}
|
||||||
|
@ -4579,7 +4579,7 @@ MachineInstr *X86InstrInfo::optimizeLoadInstr(MachineInstr *MI,
|
|||||||
DefMI = MRI->getVRegDef(FoldAsLoadDefReg);
|
DefMI = MRI->getVRegDef(FoldAsLoadDefReg);
|
||||||
assert(DefMI);
|
assert(DefMI);
|
||||||
bool SawStore = false;
|
bool SawStore = false;
|
||||||
if (!DefMI->isSafeToMove(this, nullptr, SawStore))
|
if (!DefMI->isSafeToMove(nullptr, SawStore))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// Collect information about virtual register operands of MI.
|
// Collect information about virtual register operands of MI.
|
||||||
|
Reference in New Issue
Block a user