LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions | Variables
MipsConstantIslandPass.cpp File Reference
#include "Mips.h"
#include "MCTargetDesc/MipsBaseInfo.h"
#include "Mips16InstrInfo.h"
#include "MipsMachineFunction.h"
#include "MipsTargetMachine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/InstIterator.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Support/Format.h"
#include <algorithm>
Include dependency graph for MipsConstantIslandPass.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "mips-constant-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")
 
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< boolAlignConstantIslands ("mips-align-constant-islands", cl::Hidden, cl::init(true), cl::desc("Align constant islands in code"))
 
static cl::opt< int > ConstantIslandsSmallOffset ("mips-constant-islands-small-offset", cl::init(0), cl::desc("Make small offsets be this amount for testing purposes"), cl::Hidden)
 
static cl::opt< boolNoLoadRelaxation ("mips-constant-islands-no-load-relaxation", cl::init(false), cl::desc("Don't relax loads to long loads - for testing purposes"), cl::Hidden)
 

Macro Definition Documentation

#define DEBUG_TYPE   "mips-constant-islands"

Definition at line 24 of file MipsConstantIslandPass.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 508 of file MipsConstantIslandPass.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 703 of file MipsConstantIslandPass.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 1039 of file MipsConstantIslandPass.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"   
)

Variable Documentation

cl::opt<bool> AlignConstantIslands("mips-align-constant-islands", cl::Hidden, cl::init(true), cl::desc("Align constant islands in code"))
static
cl::opt<int> ConstantIslandsSmallOffset("mips-constant-islands-small-offset", cl::init(0), cl::desc("Make small offsets be this amount for testing purposes"), cl::Hidden)
static
cl::opt<bool> NoLoadRelaxation("mips-constant-islands-no-load-relaxation", cl::init(false), cl::desc("Don't relax loads to long loads - for testing purposes"), cl::Hidden)
static