LLVM  6.0.0svn
Macros | Functions | Variables
MipsLongBranch.cpp File Reference
#include "MCTargetDesc/MipsABIInfo.h"
#include "MCTargetDesc/MipsBaseInfo.h"
#include "MCTargetDesc/MipsMCNaCl.h"
#include "MCTargetDesc/MipsMCTargetDesc.h"
#include "Mips.h"
#include "MipsInstrInfo.h"
#include "MipsMachineFunction.h"
#include "MipsSubtarget.h"
#include "MipsTargetMachine.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetSubtargetInfo.h"
#include <cassert>
#include <cstdint>
#include <iterator>
Include dependency graph for MipsLongBranch.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "mips-long-branch"
 

Functions

 STATISTIC (LongBranches, "Number of long branches.")
 
static MachineBasicBlockgetTargetMBB (const MachineInstr &Br)
 Iterate over list of Br's operands and search for a MachineBasicBlock operand. More...
 
static ReverseIter getNonDebugInstr (ReverseIter B, const 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)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "mips-long-branch"

Definition at line 46 of file MipsLongBranch.cpp.

Function Documentation

◆ emitGPDisp()

static void emitGPDisp ( MachineFunction F,
const MipsInstrInfo TII 
)
static

◆ getNonDebugInstr()

static ReverseIter getNonDebugInstr ( ReverseIter  B,
const ReverseIter &  E 
)
static

◆ getTargetMBB()

static MachineBasicBlock* getTargetMBB ( const MachineInstr Br)
static

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

Definition at line 113 of file MipsLongBranch.cpp.

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

Referenced by getNonDebugInstr().

◆ STATISTIC()

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

Variable Documentation

◆ ForceLongBranch

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

Referenced by emitGPDisp().

◆ SkipLongBranch

cl::opt<bool> SkipLongBranch("skip-mips-long-branch", cl::init(false), cl::desc("MIPS: Skip long branch pass."), cl::Hidden)
static

Referenced by emitGPDisp().