mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
[ARM64,C++11]: Range'ify loops in InstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205992 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -798,11 +798,9 @@ bool ARM64InstrInfo::optimizeCompareInstr(
|
|||||||
// If CPSR is not killed nor re-defined, we should check whether it is
|
// If CPSR is not killed nor re-defined, we should check whether it is
|
||||||
// live-out. If it is live-out, do not optimize.
|
// live-out. If it is live-out, do not optimize.
|
||||||
if (!IsSafe) {
|
if (!IsSafe) {
|
||||||
MachineBasicBlock *MBB = CmpInstr->getParent();
|
MachineBasicBlock *ParentBlock = CmpInstr->getParent();
|
||||||
for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(),
|
for (auto *MBB : ParentBlock->successors())
|
||||||
SE = MBB->succ_end();
|
if (MBB->isLiveIn(ARM64::CPSR))
|
||||||
SI != SE; ++SI)
|
|
||||||
if ((*SI)->isLiveIn(ARM64::CPSR))
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -976,11 +974,8 @@ bool ARM64InstrInfo::isScaledAddr(const MachineInstr *MI) const {
|
|||||||
bool ARM64InstrInfo::isLdStPairSuppressed(const MachineInstr *MI) const {
|
bool ARM64InstrInfo::isLdStPairSuppressed(const MachineInstr *MI) const {
|
||||||
assert(MOSuppressPair < (1 << MachineMemOperand::MOTargetNumBits) &&
|
assert(MOSuppressPair < (1 << MachineMemOperand::MOTargetNumBits) &&
|
||||||
"Too many target MO flags");
|
"Too many target MO flags");
|
||||||
for (MachineInstr::mmo_iterator MM = MI->memoperands_begin(),
|
for (auto *MM : MI->memoperands()) {
|
||||||
E = MI->memoperands_end();
|
if (MM->getFlags() &
|
||||||
MM != E; ++MM) {
|
|
||||||
|
|
||||||
if ((*MM)->getFlags() &
|
|
||||||
(MOSuppressPair << MachineMemOperand::MOTargetStartBit)) {
|
(MOSuppressPair << MachineMemOperand::MOTargetStartBit)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user