17#define DEBUG_TYPE "lvl-gen"
30 int getVLIndex(
unsigned Opcode);
38int LVLGen::getVLIndex(
unsigned Opcode) {
51 int Index = getVLIndex(
MI.getOpcode());
53 return MI.getOperand(Index).getReg();
55 return VE::NoRegister;
60 (MBB.getParent()->getSubtarget<VESubtarget>().getRegisterInfo()->getName(no))
63 bool HasRegForVL =
false;
75 unsigned Reg = getVL(*
MI);
76 if (Reg != VE::NoRegister) {
81 << (HasRegForVL ?
RegName(RegForVL) :
"unknown")
84 if (!HasRegForVL || RegForVL != Reg) {
100 if (
MI->definesRegister(RegForVL,
TRI) ||
101 MI->modifiesRegister(RegForVL,
TRI) ||
102 MI->killsRegister(RegForVL,
TRI) ||
MI->isCall()) {
120 bool Changed =
false;
127 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.