mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
[C++11,ARM64] Range based for loops in branch relaxation.
No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205438 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
68c150834b
commit
5e2ab67a19
@ -120,10 +120,9 @@ void ARM64BranchRelaxation::verify() {
|
||||
|
||||
/// print block size and offset information - debugging
|
||||
void ARM64BranchRelaxation::dumpBBs() {
|
||||
for (MachineFunction::iterator MBBI = MF->begin(), E = MF->end(); MBBI != E;
|
||||
++MBBI) {
|
||||
const BasicBlockInfo &BBI = BlockInfo[MBBI->getNumber()];
|
||||
dbgs() << format("BB#%u\toffset=%08x\t", MBBI->getNumber(), BBI.Offset)
|
||||
for (auto &MBB: *MF) {
|
||||
const BasicBlockInfo &BBI = BlockInfo[MBB.getNumber()];
|
||||
dbgs() << format("BB#%u\toffset=%08x\t", MBB.getNumber(), BBI.Offset)
|
||||
<< format("size=%#x\n", BBI.Size);
|
||||
}
|
||||
}
|
||||
@ -449,8 +448,8 @@ bool ARM64BranchRelaxation::relaxBranchInstructions() {
|
||||
bool Changed = false;
|
||||
// Relaxing branches involves creating new basic blocks, so re-eval
|
||||
// end() for termination.
|
||||
for (MachineFunction::iterator I = MF->begin(); I != MF->end(); ++I) {
|
||||
MachineInstr *MI = I->getFirstTerminator();
|
||||
for (auto &MBB : *MF) {
|
||||
MachineInstr *MI = MBB.getFirstTerminator();
|
||||
if (isConditionalBranch(MI->getOpcode()) &&
|
||||
!isBlockInRange(MI, getDestBlock(MI),
|
||||
getBranchDisplacementBits(MI->getOpcode()))) {
|
||||
|
Loading…
Reference in New Issue
Block a user