X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FAArch64%2FAArch64BranchRelaxation.cpp;h=d973234dd86ae6b6374a1e063a2f40d7bd4cbf9d;hb=cfa534244477d407c09ce69bff1da3a4c772df63;hp=484e7e8ffce44338ef922d8b6cf97f9ae982722d;hpb=10d664fee72917960c8bf38cc2ec8e3b84924044;p=oota-llvm.git diff --git a/lib/Target/AArch64/AArch64BranchRelaxation.cpp b/lib/Target/AArch64/AArch64BranchRelaxation.cpp index 484e7e8ffce..d973234dd86 100644 --- a/lib/Target/AArch64/AArch64BranchRelaxation.cpp +++ b/lib/Target/AArch64/AArch64BranchRelaxation.cpp @@ -12,15 +12,16 @@ #include "AArch64.h" #include "AArch64InstrInfo.h" #include "AArch64MachineFunctionInfo.h" +#include "AArch64Subtarget.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/Statistic.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/ADT/Statistic.h" -#include "llvm/Support/CommandLine.h" using namespace llvm; #define DEBUG_TYPE "aarch64-branch-relax" @@ -136,7 +137,7 @@ static bool BBHasFallthrough(MachineBasicBlock *MBB) { if (NextBB == MBB->getParent()->end()) return false; - for (MachineBasicBlock *S : MBB->successors()) + for (MachineBasicBlock *S : MBB->successors()) if (S == NextBB) return true; @@ -475,7 +476,7 @@ bool AArch64BranchRelaxation::runOnMachineFunction(MachineFunction &mf) { DEBUG(dbgs() << "***** AArch64BranchRelaxation *****\n"); - TII = (const AArch64InstrInfo *)MF->getTarget().getInstrInfo(); + TII = (const AArch64InstrInfo *)MF->getSubtarget().getInstrInfo(); // Renumber all of the machine basic blocks in the function, guaranteeing that // the numbers agree with the position of the block in the function.