30#define DEBUG_TYPE "mips-vr4300-mulmul-fix"
40 StringRef getPassName()
const override {
return "Mips VR4300 mulmul bugfix"; }
57 "Mips VR4300 mulmul bugfix",
false,
false)
59char MipsMulMulBugFix::
ID = 0;
63 *
static_cast<const MipsInstrInfo *
>(MF.getSubtarget().getInstrInfo());
74 switch (
MI.getOpcode()) {
86 if (
MI.isBranch() ||
MI.isIndirectBranch() ||
MI.isCall())
89 switch (
MI.getOpcode()) {
114 MII !=
E; MII = NextMII) {
123 const MCInstrDesc &NewMCID = MipsII.get(Mips::NOP);
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
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.
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...
Properties which a MachineFunction may have at a given point in time.
Representation of each machine instruction.
StringRef - Represent a constant reference to a string, i.e.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
MipsII - This namespace holds all of the target specific flags that instruction info tracks.
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.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
FunctionPass * createMipsMulMulBugPass()