LLVM API Documentation

Defines | Functions | Variables
AArch64BranchRelaxation.cpp File Reference
#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 dependency graph for AArch64BranchRelaxation.cpp:

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 MachineBasicBlockgetDestBlock (MachineInstr *MI)
static unsigned getOppositeConditionOpcode (unsigned Opc)
static unsigned getBranchDisplacementBits (unsigned Opc)
static void invertBccCondition (MachineInstr *MI)

Variables

static cl::opt< boolBranchRelaxation ("aarch64-branch-relax", cl::Hidden, cl::init(true), cl::desc("Relax out of range conditional branches"))
static cl::opt< unsignedTBZDisplacementBits ("aarch64-tbz-offset-bits", cl::Hidden, cl::init(14), cl::desc("Restrict range of TB[N]Z instructions (DEBUG)"))
static cl::opt< unsignedCBZDisplacementBits ("aarch64-cbz-offset-bits", cl::Hidden, cl::init(19), cl::desc("Restrict range of CB[N]Z instructions (DEBUG)"))
static cl::opt< unsignedBCCDisplacementBits ("aarch64-bcc-offset-bits", cl::Hidden, cl::init(19), cl::desc("Restrict range of Bcc instructions (DEBUG)"))

Define Documentation

#define DEBUG_TYPE   "aarch64-branch-relax"

Definition at line 27 of file AArch64BranchRelaxation.cpp.


Function Documentation

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]
static MachineBasicBlock* getDestBlock ( MachineInstr MI) [static]
static unsigned getOppositeConditionOpcode ( unsigned  Opc) [static]

Definition at line 310 of file AArch64BranchRelaxation.cpp.

References llvm_unreachable.

static void invertBccCondition ( MachineInstr MI) [inline, static]
static bool isConditionalBranch ( unsigned  Opc) [static]

Definition at line 275 of file AArch64BranchRelaxation.cpp.

STATISTIC ( NumSplit  ,
"Number of basic blocks split  
)
STATISTIC ( NumRelaxed  ,
"Number of conditional branches relaxed"   
)

Variable Documentation

cl::opt<unsigned> BCCDisplacementBits("aarch64-bcc-offset-bits", cl::Hidden, cl::init(19), cl::desc("Restrict range of Bcc instructions (DEBUG)")) [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> CBZDisplacementBits("aarch64-cbz-offset-bits", cl::Hidden, cl::init(19), cl::desc("Restrict range of CB[N]Z instructions (DEBUG)")) [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]