LLVM  8.0.1
Namespaces | Macros | Functions | Variables
HexagonNewValueJump.cpp File Reference
#include "Hexagon.h"
#include "HexagonInstrInfo.h"
#include "HexagonRegisterInfo.h"
#include "HexagonSubtarget.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineBranchProbabilityInfo.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/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/Pass.h"
#include "llvm/Support/BranchProbability.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>
#include <iterator>
Include dependency graph for HexagonNewValueJump.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This class represents lattice values for constants.
 

Macros

#define DEBUG_TYPE   "hexagon-nvj"
 

Functions

 STATISTIC (NumNVJGenerated, "Number of New Value Jump Instructions created")
 
FunctionPassllvm::createHexagonNewValueJump ()
 
void llvm::initializeHexagonNewValueJumpPass (PassRegistry &)
 
 INITIALIZE_PASS_BEGIN (HexagonNewValueJump, "hexagon-nvj", "Hexagon NewValueJump", false, false) INITIALIZE_PASS_END(HexagonNewValueJump
 
hexagon Hexagon static false bool canBeFeederToNewValueJump (const HexagonInstrInfo *QII, const TargetRegisterInfo *TRI, MachineBasicBlock::iterator II, MachineBasicBlock::iterator end, MachineBasicBlock::iterator skip, MachineFunction &MF)
 
static bool commonChecksToProhibitNewValueJump (bool afterRA, MachineBasicBlock::iterator MII)
 
static bool canCompareBeNewValueJump (const HexagonInstrInfo *QII, const TargetRegisterInfo *TRI, MachineBasicBlock::iterator II, unsigned pReg, bool secondReg, bool optLocation, MachineBasicBlock::iterator end, MachineFunction &MF)
 
static unsigned getNewValueJumpOpcode (MachineInstr *MI, int reg, bool secondRegNewified, MachineBasicBlock *jmpTarget, const MachineBranchProbabilityInfo *MBPI)
 

Variables

static cl::opt< int > DbgNVJCount ("nvj-count", cl::init(-1), cl::Hidden, cl::desc("Maximum number of predicated jumps to be converted to " "New Value Jump"))
 
static cl::opt< boolDisableNewValueJumps ("disable-nvjump", cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::desc("Disable New Value Jumps"))
 
hexagon nvj
 
hexagon Hexagon NewValueJump
 
hexagon Hexagon false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "hexagon-nvj"

Definition at line 55 of file HexagonNewValueJump.cpp.

Function Documentation

◆ canBeFeederToNewValueJump()

hexagon Hexagon static false bool canBeFeederToNewValueJump ( const HexagonInstrInfo QII,
const TargetRegisterInfo TRI,
MachineBasicBlock::iterator  II,
MachineBasicBlock::iterator  end,
MachineBasicBlock::iterator  skip,
MachineFunction MF 
)
static

◆ canCompareBeNewValueJump()

static bool canCompareBeNewValueJump ( const HexagonInstrInfo QII,
const TargetRegisterInfo TRI,
MachineBasicBlock::iterator  II,
unsigned  pReg,
bool  secondReg,
bool  optLocation,
MachineBasicBlock::iterator  end,
MachineFunction MF 
)
static

◆ commonChecksToProhibitNewValueJump()

static bool commonChecksToProhibitNewValueJump ( bool  afterRA,
MachineBasicBlock::iterator  MII 
)
static

Definition at line 200 of file HexagonNewValueJump.cpp.

References llvm::AMDGPUISD::KILL.

Referenced by canCompareBeNewValueJump(), and getNewValueJumpOpcode().

◆ getNewValueJumpOpcode()

static unsigned getNewValueJumpOpcode ( MachineInstr MI,
int  reg,
bool  secondRegNewified,
MachineBasicBlock jmpTarget,
const MachineBranchProbabilityInfo MBPI 
)
static

Definition at line 335 of file HexagonNewValueJump.cpp.

References llvm::MachineInstrBuilder::addMBB(), assert(), llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), llvm::BuildMI(), canBeFeederToNewValueJump(), canCompareBeNewValueJump(), commonChecksToProhibitNewValueJump(), DbgNVJCount, llvm::dbgs(), DisableNewValueJumps, llvm::MachineBasicBlock::dump(), llvm::MachineInstr::dump(), E, llvm::MachineBasicBlock::end(), llvm::MachineFunction::end(), llvm::MachineInstr::eraseFromParent(), llvm::MDNode::get(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstr::getDesc(), llvm::MachineBranchProbabilityInfo::getEdgeProbability(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getImm(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::getKillRegState(), llvm::MachineOperand::getMBB(), llvm::MachineFunction::getName(), llvm::MachineBasicBlock::getNumber(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), I, llvm::MCInstrDesc::isCompare(), llvm::MachineInstr::isDebugInstr(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isKill(), llvm::MachineBasicBlock::isLiveIn(), llvm::MachineOperand::isMBB(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), LLVM_DEBUG, llvm_unreachable, MI, llvm::MachineInstr::operands(), llvm::MachineOperand::setIsKill(), SI, llvm::MachineBasicBlock::splice(), llvm::MachineBasicBlock::succ_begin(), llvm::MachineBasicBlock::succ_end(), and llvm::HexagonSubtarget::useNewValueJumps().

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( HexagonNewValueJump  ,
"hexagon-nvj ,
"Hexagon NewValueJump ,
false  ,
false   
)

◆ STATISTIC()

STATISTIC ( NumNVJGenerated  ,
"Number of New Value Jump Instructions created"   
)

Variable Documentation

◆ DbgNVJCount

cl::opt<int> DbgNVJCount("nvj-count", cl::init(-1), cl::Hidden, cl::desc("Maximum number of predicated jumps to be converted to " "New Value Jump"))
static

Referenced by getNewValueJumpOpcode().

◆ DisableNewValueJumps

cl::opt<bool> DisableNewValueJumps("disable-nvjump", cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::desc("Disable New Value Jumps"))
static

Referenced by getNewValueJumpOpcode().

◆ false

hexagon Hexagon false

Definition at line 112 of file HexagonNewValueJump.cpp.

◆ NewValueJump

hexagon Hexagon NewValueJump

Definition at line 112 of file HexagonNewValueJump.cpp.

◆ nvj

hexagon nvj

Definition at line 112 of file HexagonNewValueJump.cpp.