LLVM 20.0.0git
Namespaces | Macros | Functions | Variables
HexagonNewValueJump.cpp File Reference
#include "llvm/InitializePasses.h"
#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>

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

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::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

Definition at line 116 of file HexagonNewValueJump.cpp.

References assert(), contains(), II, skip(), and TRI.

◆ 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 199 of file HexagonNewValueJump.cpp.

Referenced by canCompareBeNewValueJump().

◆ getNewValueJumpOpcode()

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

◆ 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")) ( "nvj-count"  ,
cl::init(-1)  ,
cl::Hidden  ,
cl::desc("Maximum number of predicated jumps to be converted to " "New Value Jump")   
)
static

◆ DisableNewValueJumps

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

◆ 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 111 of file HexagonNewValueJump.cpp.