LLVM: lib/Target/ARM/ARMConstantIslandPass.cpp File Reference (original ) (raw )Go to the source code of this file.
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")
STATISTIC (NumLEInserted, "Number of LE backwards branches inserted")
static bool
AlignBlocks (MachineFunction *MF, const ARMSubtarget *STI)
static bool
CompareMBBNumbers (const MachineBasicBlock *LHS , const MachineBasicBlock *RHS )
CompareMBBNumbers - Little predicate function to sort the WaterList by MBB ID .
static bool
BBIsJumpedOver (MachineBasicBlock *MBB )
BBIsJumpedOver - Return true of the specified basic block's only predecessor unconditionally branches to its only successor.
static unsigned
getUnconditionalBrDisp (int Opc )
getUnconditionalBrDisp - Returns the maximum displacement that can fit in the specific unconditional branch instruction.
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).
static void
RemoveDeadAddBetweenLEAAndJT (MachineInstr *LEAMI, MachineInstr *JumpMI, unsigned &DeadSize)
◆ ARM_CP_ISLANDS_OPT_NAME#define ARM_CP_ISLANDS_OPT_NAME "ARM constant island placement and branch shortening pass"
◆ DEBUG_TYPE#define DEBUG_TYPE "arm-cp-islands"
◆ AlignBlocks()Definition at line 341 of file ARMConstantIslandPass.cpp .
References llvm::Aggressive , Changed , llvm::MachineFunction::getFunction() , llvm::TargetMachine::getOptLevel() , llvm::MachineFunction::getTarget() , llvm::ARMSubtarget::getTargetLowering() , llvm::Function::hasOptSize() , llvm::isLoopStart() , MBB , MI , and llvm::reverse() .
◆ BBIsJumpedOver()◆ CompareMBBNumbers()◆ getUnconditionalBrDisp()
unsigned getUnconditionalBrDisp ( int Opc )
inlinestatic
getUnconditionalBrDisp - Returns the maximum displacement that can fit in the specific unconditional branch instruction.
Definition at line 1259 of file ARMConstantIslandPass.cpp .
References Opc .
◆ isSimpleIndexCalc()◆ jumpTableFollowsTB()◆ RemoveDeadAddBetweenLEAAndJT()◆ STATISTIC() [1/11]
STATISTIC
(
NumCBrFixed
,
"Number of cond branches fixed"
)
◆ STATISTIC() [2/11]
STATISTIC
(
NumCBZ
,
"Number of CBZ / CBNZ formed"
)
◆ STATISTIC() [3/11]
STATISTIC
(
NumCPEs
,
"Number of constpool entries"
)
◆ STATISTIC() [4/11]
STATISTIC
(
NumJTInserted
,
"Number of jump table intermediate blocks inserted"
)
◆ STATISTIC() [5/11]
STATISTIC
(
NumJTMoved
,
"Number of jump table destination blocks moved"
)
◆ STATISTIC() [6/11]
STATISTIC
(
NumLEInserted
,
"Number of LE backwards branches inserted"
)
◆ STATISTIC() [7/11]
STATISTIC
(
NumSplit
,
"Number of uncond branches inserted"
)
◆ STATISTIC() [8/11]
STATISTIC
(
NumT2BrShrunk
,
"Number of Thumb2 immediate branches shrunk"
)
◆ STATISTIC() [9/11]
STATISTIC
(
NumT2CPShrunk
,
"Number of Thumb2 constantpool instructions shrunk"
)
◆ STATISTIC() [10/11]
STATISTIC
(
NumTBs
,
"Number of table branches generated"
)
◆ STATISTIC() [11/11]
STATISTIC
(
NumUBrFixed
,
"Number of uncond branches fixed"
)
◆ AdjustJumpTableBlocks
cl::opt < bool > AdjustJumpTableBlocks("arm-adjust-jump-tables", cl::Hidden, cl::init(true), cl::desc ("Adjust basic block layout to better use TB[BH]")) ( "arm-adjust-jump-tables" , cl::Hidden , cl::init(true) , cl::desc ("Adjust basic block layout to better use TB[BH]") )
static
◆ CPMaxIteration
cl::opt < unsigned > CPMaxIteration("arm-constant-island-max-iteration", cl::Hidden, cl::init(30), cl::desc ("The max number of iteration for converge")) ( "arm-constant-island-max-iteration" , cl::Hidden , cl::init(30) , cl::desc ("The max number of iteration for converge") )
static
◆ SynthesizeThumb1TBB
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")) ( "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") )
static