23void X86InstrPostProcess::setMemBarriers(std::unique_ptr<Instruction> &Inst,
27 Inst->setLoadBarrier(
true);
28 Inst->setStoreBarrier(
true);
31 Inst->setLoadBarrier(
true);
34 Inst->setStoreBarrier(
true);
39void X86InstrPostProcess::useStackEngine(std::unique_ptr<Instruction> &Inst,
48 auto *StackRegisterDef =
50 return State.getRegisterID() == X86::RSP;
53 StackRegisterDef != Inst->getDefs().end() &&
54 "Expected push instruction to implicitly use stack pointer register.");
55 Inst->getDefs().erase(StackRegisterDef);
60 std::unique_ptr<Instruction> &Inst,
const MCInst &MCI) {
62 setMemBarriers(Inst, MCI);
63 useStackEngine(Inst, MCI);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_C_ABI
LLVM_C_ABI is the export/visibility macro used to mark symbols declared in llvm-c as exported when bu...
LLVM_C_ABI void LLVMInitializeX86TargetMCA()
Extern function to initialize the targets for the X86 backend.
static InstrPostProcess * createX86InstrPostProcess(const MCSubtargetInfo &STI, const MCInstrInfo &MCII)
This file defines the X86CustomBehaviour class which inherits from CustomBehaviour.
Instances of this class represent a single low-level machine instruction.
unsigned getOpcode() const
Interface to description of machine instruction set.
Generic base class for all target subtargets.
Class which can be overriden by targets to modify the mca::Instruction objects before the pipeline st...
void postProcessInstruction(std::unique_ptr< Instruction > &Inst, const MCInst &MCI) override
This method can be overriden by targets to modify the mca::Instruction object after it has been lower...
This is an optimization pass for GlobalISel generic memory operations.
Target & getTheX86_32Target()
auto find_if(R &&Range, UnaryPredicate P)
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly.
Target & getTheX86_64Target()
static void RegisterInstrPostProcess(Target &T, Target::InstrPostProcessCtorTy Fn)
RegisterInstrPostProcess - Register an InstrPostProcess implementation for the given target.