|
LLVM
4.0.0
|
#include "ARM.h"#include "ARMBasicBlockInfo.h"#include "ARMMachineFunctionInfo.h"#include "MCTargetDesc/ARMAddressingModes.h"#include "Thumb2InstrInfo.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/CodeGen/MachineConstantPool.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineJumpTableInfo.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/IR/DataLayout.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/Target/TargetMachine.h"#include <algorithm>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "arm-cp-islands" |
Functions | |
| STATISTIC (NumCPEs,"Number of constpool entries") | |
| STATISTIC (NumSplit,"Number of uncond branches inserted") | |
| STATISTIC (NumCBrFixed,"Number of cond branches fixed") | |
| STATISTIC (NumUBrFixed,"Number of uncond branches fixed") | |
| STATISTIC (NumTBs,"Number of table branches generated") | |
| STATISTIC (NumT2CPShrunk,"Number of Thumb2 constantpool instructions shrunk") | |
| STATISTIC (NumT2BrShrunk,"Number of Thumb2 immediate branches shrunk") | |
| STATISTIC (NumCBZ,"Number of CBZ / CBNZ formed") | |
| STATISTIC (NumJTMoved,"Number of jump table destination blocks moved") | |
| STATISTIC (NumJTInserted,"Number of jump table intermediate blocks inserted") | |
| static bool | CompareMBBNumbers (const MachineBasicBlock *LHS, const MachineBasicBlock *RHS) |
| CompareMBBNumbers - Little predicate function to sort the WaterList by MBB ID. More... | |
| static bool | BBIsJumpedOver (MachineBasicBlock *MBB) |
| BBIsJumpedOver - Return true of the specified basic block's only predecessor unconditionally branches to its only successor. More... | |
| static unsigned | getUnconditionalBrDisp (int Opc) |
| getUnconditionalBrDisp - Returns the maximum displacement that can fit in the specific unconditional branch instruction. More... | |
| static bool | isSimpleIndexCalc (MachineInstr &I, unsigned EntryReg, unsigned BaseReg) |
| static bool | jumpTableFollowsTB (MachineInstr *JTMI, MachineInstr *CPEMI) |
| Returns whether CPEMI is the first instruction in the block immediately following JTMI (assumed to be a TBB or TBH terminator). More... | |
Variables | |
| static cl::opt< bool > | AdjustJumpTableBlocks ("arm-adjust-jump-tables", cl::Hidden, cl::init(true), cl::desc("Adjust basic block layout to better use TB[BH]")) |
| static cl::opt< unsigned > | CPMaxIteration ("arm-constant-island-max-iteration", cl::Hidden, cl::init(30), cl::desc("The max number of iteration for converge")) |
| static cl::opt< bool > | SynthesizeThumb1TBB ("arm-synthesize-thumb-1-tbb", cl::Hidden, cl::init(true), cl::desc("Use compressed jump tables in Thumb-1 by synthesizing an ""equivalent to the TBB/TBH instructions")) |
| #define DEBUG_TYPE "arm-cp-islands" |
Definition at line 39 of file ARMConstantIslandPass.cpp.
|
static |
BBIsJumpedOver - Return true of the specified basic block's only predecessor unconditionally branches to its only successor.
Definition at line 1065 of file ARMConstantIslandPass.cpp.
References B, llvm::MachineBasicBlock::back(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::pred_begin(), llvm::MachineBasicBlock::pred_size(), llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_size().
|
static |
CompareMBBNumbers - Little predicate function to sort the WaterList by MBB ID.
Definition at line 852 of file ARMConstantIslandPass.cpp.
References llvm::MachineBasicBlock::getNumber().
|
inlinestatic |
getUnconditionalBrDisp - Returns the maximum displacement that can fit in the specific unconditional branch instruction.
Definition at line 1179 of file ARMConstantIslandPass.cpp.
|
static |
Definition at line 1870 of file ARMConstantIslandPass.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().
|
static |
Returns whether CPEMI is the first instruction in the block immediately following JTMI (assumed to be a TBB or TBH terminator).
If so, we can switch the first register to PC and usually remove the address calculation that preceded it.
Definition at line 1977 of file ARMConstantIslandPass.cpp.
References llvm::MachineFunction::end(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getParent(), and MBB.
| STATISTIC | ( | NumCPEs | , |
| "Number of constpool entries" | |||
| ) |
| STATISTIC | ( | NumSplit | , |
| "Number of uncond branches inserted" | |||
| ) |
| STATISTIC | ( | NumCBrFixed | , |
| "Number of cond branches fixed" | |||
| ) |
| STATISTIC | ( | NumUBrFixed | , |
| "Number of uncond branches fixed" | |||
| ) |
| STATISTIC | ( | NumTBs | , |
| "Number of table branches generated" | |||
| ) |
| STATISTIC | ( | NumT2CPShrunk | , |
| "Number of Thumb2 constantpool instructions shrunk" | |||
| ) |
| STATISTIC | ( | NumT2BrShrunk | , |
| "Number of Thumb2 immediate branches shrunk" | |||
| ) |
| STATISTIC | ( | NumCBZ | , |
| "Number of CBZ / CBNZ formed" | |||
| ) |
| STATISTIC | ( | NumJTMoved | , |
| "Number of jump table destination blocks moved" | |||
| ) |
| STATISTIC | ( | NumJTInserted | , |
| "Number of jump table intermediate blocks inserted" | |||
| ) |
|
static |
|
static |
|
static |
1.8.6