30#define DEBUG_TYPE "mips-vr4300-mulmul-fix"
46 MachineFunctionProperties::Property::NoVRegs);
60 "Mips VR4300 mulmul bugfix",
false,
false)
62char MipsMulMulBugFix::
ID = 0;
66 *
static_cast<const MipsInstrInfo *
>(MF.getSubtarget().getInstrInfo());
77 switch (
MI.getOpcode()) {
89 if (
MI.isBranch() ||
MI.isIndirectBranch() ||
MI.isCall())
92 switch (
MI.getOpcode()) {
117 MII != E; MII = NextMII) {
126 const MCInstrDesc &NewMCID = MipsII.get(Mips::NOP);
static bool isSecondMulOrBranch(const MachineInstr &MI)
static bool isFirstMul(const MachineInstr &MI)
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
FunctionPass class - This class is used to implement most global optimizations.
Describe properties that are true of each instruction in the target description file.
instr_iterator instr_begin()
Instructions::iterator instr_iterator
instr_iterator instr_end()
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...
virtual MachineFunctionProperties getRequiredProperties() const
Properties which a MachineFunction may have at a given point in time.
MachineFunctionProperties & set(Property P)
Representation of each machine instruction.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
virtual StringRef getPassName() const
getPassName - Return a nice clean name for a pass.
StringRef - Represent a constant reference to a string, i.e.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.
IterT next_nodbg(IterT It, IterT End, bool SkipPseudoOp=true)
Increment It, then continue incrementing it while it points to a debug instruction.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
void initializeMipsMulMulBugFixPass(PassRegistry &)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
FunctionPass * createMipsMulMulBugPass()