35#define DEBUG_TYPE "x86-insert-x87-wait"
48 return "X86 insert wait instruction";
53char X86InsertX87WaitLegacy::ID = 0;
56 return new X86InsertX87WaitLegacy();
60 switch (
MI.getOpcode()) {
85 switch (
MI.getOpcode()) {
113 if (!(
MI->mayRaiseFPException() ||
MI->mayLoadOrStore()) ||
133bool X86InsertX87WaitLegacy::runOnMachineFunction(
MachineFunction &MF) {
const HexagonInstrInfo * TII
static bool isX87ControlInstruction(MachineInstr &MI)
static bool insertWaitInstruction(MachineFunction &MF)
static bool isX87NonWaitingControlInstruction(MachineInstr &MI)
Represents analyses that only rely on functions' control flow.
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.
MachineInstrBundleIterator< MachineInstr > iterator
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
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.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
PreservedAnalyses & preserveSet()
Mark an analysis set as preserved.
StringRef - Represent a constant reference to a string, i.e.
PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &)
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 * createX86InsertX87WaitLegacyPass()
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
LLVM_ABI PreservedAnalyses getMachineFunctionPassPreservedAnalyses()
Returns the minimum set of Analyses that all machine function passes must preserve.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.