35#define DEBUG_TYPE "x86-insert-wait"
48 return "X86 insert wait instruction";
54char WaitInsert::ID = 0;
59 switch (
MI.getOpcode()) {
84 switch (
MI.getOpcode()) {
102 bool Changed =
false;
112 if (!(
MI->mayRaiseFPException() ||
MI->mayLoadOrStore()) ||
const HexagonInstrInfo * TII
static bool isX87ControlInstruction(MachineInstr &MI)
static bool isX87NonWaitingControlInstruction(MachineInstr &MI)
FunctionPass class - This class is used to implement most global optimizations.
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
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 TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
Function & getFunction()
Return the LLVM function that this machine code represents.
Representation of each machine instruction.
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.
bool isX87Instruction(MachineInstr &MI)
Check if the instruction is X87 instruction.
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 * createX86InsertX87waitPass()
This pass insert wait instruction after X87 instructions which could raise fp exceptions when strict-...
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.