LLVM API Documentation

Defines | Functions | Variables
MipsLongBranch.cpp File Reference
#include "Mips.h"
#include "MCTargetDesc/MipsBaseInfo.h"
#include "MCTargetDesc/MipsMCNaCl.h"
#include "MipsMachineFunction.h"
#include "MipsTargetMachine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegisterInfo.h"
Include dependency graph for MipsLongBranch.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "mips-long-branch"

Functions

 STATISTIC (LongBranches,"Number of long branches.")
static MachineBasicBlockgetTargetMBB (const MachineInstr &Br)
static ReverseIter getNonDebugInstr (ReverseIter B, ReverseIter E)
static void emitGPDisp (MachineFunction &F, const MipsInstrInfo *TII)

Variables

static cl::opt< boolSkipLongBranch ("skip-mips-long-branch", cl::init(false), cl::desc("MIPS: Skip long branch pass."), cl::Hidden)
static cl::opt< boolForceLongBranch ("force-mips-long-branch", cl::init(false), cl::desc("MIPS: Expand all branches to long format."), cl::Hidden)

Define Documentation

#define DEBUG_TYPE   "mips-long-branch"

Definition at line 33 of file MipsLongBranch.cpp.


Function Documentation

static void emitGPDisp ( MachineFunction F,
const MipsInstrInfo TII 
) [static]
static ReverseIter getNonDebugInstr ( ReverseIter  B,
ReverseIter  E 
) [static]

Definition at line 119 of file MipsLongBranch.cpp.

static MachineBasicBlock* getTargetMBB ( const MachineInstr Br) [static]

Iterate over list of Br's operands and search for a MachineBasicBlock operand.

Definition at line 105 of file MipsLongBranch.cpp.

References llvm::MachineInstr::getDesc(), llvm::MachineOperand::getMBB(), llvm::MCInstrDesc::getNumOperands(), llvm::MachineInstr::getOperand(), I, and llvm::MachineOperand::isMBB().

STATISTIC ( LongBranches  ,
"Number of long branches."   
)

Variable Documentation

cl::opt<bool> ForceLongBranch("force-mips-long-branch", cl::init(false), cl::desc("MIPS: Expand all branches to long format."), cl::Hidden) [static]
cl::opt<bool> SkipLongBranch("skip-mips-long-branch", cl::init(false), cl::desc("MIPS: Skip long branch pass."), cl::Hidden) [static]