LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions | Variables
ARMConstantIslandPass.cpp File Reference
#include "ARM.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>
Include dependency graph for ARMConstantIslandPass.cpp:

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 unsigned UnknownPadding (unsigned LogAlign, unsigned KnownBits)
 
static bool BBHasFallthrough (MachineBasicBlock *MBB)
 
static bool CompareMBBNumbers (const MachineBasicBlock *LHS, const MachineBasicBlock *RHS)
 
static bool BBIsJumpedOver (MachineBasicBlock *MBB)
 
static unsigned getUnconditionalBrDisp (int Opc)
 

Variables

static cl::opt< boolAdjustJumpTableBlocks ("arm-adjust-jump-tables", cl::Hidden, cl::init(true), cl::desc("Adjust basic block layout to better use TB[BH]"))
 
static cl::opt< boolAlignConstantIslands ("arm-align-constant-islands", cl::Hidden, cl::init(true), cl::desc("Align constant islands in code"))
 

Macro Definition Documentation

#define DEBUG_TYPE   "arm-cp-islands"

Definition at line 16 of file ARMConstantIslandPass.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 568 of file ARMConstantIslandPass.cpp.

References llvm::MachineFunction::end(), llvm::MachineBasicBlock::getParent(), I, llvm::next(), llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_end().

static bool BBIsJumpedOver ( MachineBasicBlock MBB)
static
static bool CompareMBBNumbers ( const MachineBasicBlock LHS,
const MachineBasicBlock RHS 
)
static

CompareMBBNumbers - Little predicate function to sort the WaterList by MBB ID.

Definition at line 844 of file ARMConstantIslandPass.cpp.

References llvm::MachineBasicBlock::getNumber().

static unsigned getUnconditionalBrDisp ( int  Opc)
inlinestatic

getUnconditionalBrDisp - Returns the maximum displacement that can fit in the specific unconditional branch instruction.

Definition at line 1164 of file ARMConstantIslandPass.cpp.

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 unsigned UnknownPadding ( unsigned  LogAlign,
unsigned  KnownBits 
)
inlinestatic

UnknownPadding - Return the worst case padding that could result from unknown offset bits. This does not include alignment padding caused by known offset bits.

Parameters
LogAlignlog2(alignment)
KnownBitsNumber of known low offset bits.

Definition at line 66 of file ARMConstantIslandPass.cpp.

Variable Documentation

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<bool> AlignConstantIslands("arm-align-constant-islands", cl::Hidden, cl::init(true), cl::desc("Align constant islands in code"))
static