19#define DEBUG_TYPE "lvl-gen"
32 int getVLIndex(
unsigned Opcode);
40int LVLGen::getVLIndex(
unsigned Opcode) {
53 int Index = getVLIndex(
MI.getOpcode());
55 return MI.getOperand(
Index).getReg();
57 return VE::NoRegister;
62 (MBB.getParent()->getSubtarget<VESubtarget>().getRegisterInfo()->getName(no))
65 bool HasRegForVL =
false;
77 unsigned Reg = getVL(*
MI);
78 if (Reg != VE::NoRegister) {
83 << (HasRegForVL ?
RegName(RegForVL) :
"unknown")
86 if (!HasRegForVL || RegForVL != Reg) {
102 if (
MI->definesRegister(RegForVL,
TRI) ||
103 MI->modifiesRegister(RegForVL,
TRI) ||
104 MI->killsRegister(RegForVL,
TRI) ||
MI->isCall()) {
122 bool Changed =
false;
129 Changed |= runOnMachineBasicBlock(
MBB);
const HexagonInstrInfo * TII
unsigned const TargetRegisterInfo * TRI
FunctionPass class - This class is used to implement most global optimizations.
Describe properties that are true of each instruction in the target description file.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
virtual bool runOnMachineFunction(MachineFunction &MF)=0
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
const MachineInstrBuilder & addReg(Register RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
Representation of each machine instruction.
TargetInstrInfo - Interface to description of machine instruction set.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
const VEInstrInfo * getInstrInfo() const override
const VERegisterInfo * getRegisterInfo() const override
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Reg
All possible values of the reg field in the ModR/M byte.
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.
FunctionPass * createLVLGenPass()
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.