23#define DEBUG_TYPE "lvl-gen"
36char VELVLGenLegacy::ID = 0;
57 return MI.getOperand(Index).getReg();
59 return VE::NoRegister;
66 (MBB.getParent()->getSubtarget<VESubtarget>().getRegisterInfo()->getName(no))
69 bool HasRegForVL =
false;
82 if (
Reg != VE::NoRegister) {
87 << (HasRegForVL ?
RegName(RegForVL) :
"unknown")
90 if (!HasRegForVL || RegForVL !=
Reg) {
106 if (
MI->definesRegister(RegForVL,
TRI) ||
107 MI->modifiesRegister(RegForVL,
TRI) ||
108 MI->killsRegister(RegForVL,
TRI) ||
MI->isCall()) {
const HexagonInstrInfo * TII
static bool runLVLGenOnMachineFunction(MachineFunction &F)
static bool runLVLGenOnMachineBasicBlock(MachineBasicBlock &MBB, const VEInstrInfo *TII, const VERegisterInfo *TRI)
static unsigned getVL(const MachineInstr &MI, const VEInstrInfo *TII)
static int getVLIndex(unsigned Opcode, const VEInstrInfo *TII)
Register const TargetRegisterInfo * TRI
Represent the analysis usage information of a pass.
LLVM_ABI void setPreservesCFG()
This function should be called by the pass, iff they do not:
Represents analyses that only rely on functions' control flow.
FunctionPass class - This class is used to implement most global optimizations.
Describe properties that are true of each instruction in the target description file.
MachineInstrBundleIterator< MachineInstr > iterator
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
const MachineInstrBuilder & addReg(Register RegNo, RegState Flags={}, unsigned SubReg=0) const
Add a new virtual register operand.
Representation of each machine instruction.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
PreservedAnalyses & preserveSet()
Mark an analysis set as preserved.
PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
const VEInstrInfo * getInstrInfo() const override
const VERegisterInfo * getRegisterInfo() const override
Pass manager infrastructure for declaring and invalidating analyses.
This is an optimization pass for GlobalISel generic memory operations.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
LLVM_ABI PreservedAnalyses getMachineFunctionPassPreservedAnalyses()
Returns the minimum set of Analyses that all machine function passes must preserve.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
FunctionPass * createVELVLGenLegacyPass()