LLVM API Documentation
#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"
Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "aarch64-branch-relax" |
Functions | |
| STATISTIC (NumSplit,"Number of basic blocks split") | |
| STATISTIC (NumRelaxed,"Number of conditional branches relaxed") | |
| static bool | BBHasFallthrough (MachineBasicBlock *MBB) |
| static bool | isConditionalBranch (unsigned Opc) |
| static MachineBasicBlock * | getDestBlock (MachineInstr *MI) |
| static unsigned | getOppositeConditionOpcode (unsigned Opc) |
| static unsigned | getBranchDisplacementBits (unsigned Opc) |
| static void | invertBccCondition (MachineInstr *MI) |
Variables | |
| static cl::opt< bool > | BranchRelaxation ("aarch64-branch-relax", cl::Hidden, cl::init(true), cl::desc("Relax out of range conditional branches")) |
| static cl::opt< unsigned > | TBZDisplacementBits ("aarch64-tbz-offset-bits", cl::Hidden, cl::init(14), cl::desc("Restrict range of TB[N]Z instructions (DEBUG)")) |
| static cl::opt< unsigned > | CBZDisplacementBits ("aarch64-cbz-offset-bits", cl::Hidden, cl::init(19), cl::desc("Restrict range of CB[N]Z instructions (DEBUG)")) |
| static cl::opt< unsigned > | BCCDisplacementBits ("aarch64-bcc-offset-bits", cl::Hidden, cl::init(19), cl::desc("Restrict range of Bcc instructions (DEBUG)")) |
| #define DEBUG_TYPE "aarch64-branch-relax" |
Definition at line 27 of file AArch64BranchRelaxation.cpp.
| static bool BBHasFallthrough | ( | MachineBasicBlock * | MBB | ) | [static] |
BBHasFallthrough - Return true if the specified basic block can fallthrough into the block immediately after it.
Definition at line 132 of file AArch64BranchRelaxation.cpp.
References llvm::MachineFunction::end(), llvm::MachineBasicBlock::getParent(), and llvm::MachineBasicBlock::successors().
| static unsigned getBranchDisplacementBits | ( | unsigned | Opc | ) | [static] |
Definition at line 326 of file AArch64BranchRelaxation.cpp.
References BCCDisplacementBits, CBZDisplacementBits, llvm_unreachable, and TBZDisplacementBits.
| static MachineBasicBlock* getDestBlock | ( | MachineInstr * | MI | ) | [static] |
Definition at line 292 of file AArch64BranchRelaxation.cpp.
References llvm::MachineOperand::getMBB(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm_unreachable.
| static unsigned getOppositeConditionOpcode | ( | unsigned | Opc | ) | [static] |
Definition at line 310 of file AArch64BranchRelaxation.cpp.
References llvm_unreachable.
| static void invertBccCondition | ( | MachineInstr * | MI | ) | [inline, static] |
Definition at line 345 of file AArch64BranchRelaxation.cpp.
References llvm::MachineOperand::getImm(), llvm::AArch64CC::getInvertedCondCode(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::setImm().
| static bool isConditionalBranch | ( | unsigned | Opc | ) | [static] |
Definition at line 275 of file AArch64BranchRelaxation.cpp.
| STATISTIC | ( | NumRelaxed | , |
| "Number of conditional branches relaxed" | |||
| ) |
cl::opt<unsigned> BCCDisplacementBits("aarch64-bcc-offset-bits", cl::Hidden, cl::init(19), cl::desc("Restrict range of Bcc instructions (DEBUG)")) [static] |
Referenced by getBranchDisplacementBits().
cl::opt<bool> BranchRelaxation("aarch64-branch-relax", cl::Hidden, cl::init(true), cl::desc("Relax out of range conditional branches")) [static] |
cl::opt<unsigned> CBZDisplacementBits("aarch64-cbz-offset-bits", cl::Hidden, cl::init(19), cl::desc("Restrict range of CB[N]Z instructions (DEBUG)")) [static] |
Referenced by getBranchDisplacementBits().
cl::opt<unsigned> TBZDisplacementBits("aarch64-tbz-offset-bits", cl::Hidden, cl::init(14), cl::desc("Restrict range of TB[N]Z instructions (DEBUG)")) [static] |
Referenced by getBranchDisplacementBits().