23void X86InstrPostProcess::setMemBarriers(
Instruction &Inst,
const MCInst &MCI) {
26 Inst.setLoadBarrier(
true);
27 Inst.setStoreBarrier(
true);
30 Inst.setLoadBarrier(
true);
33 Inst.setStoreBarrier(
true);
38void X86InstrPostProcess::useStackEngine(
Instruction &Inst,
const MCInst &MCI) {
46 auto *StackRegisterDef =
48 return State.getRegisterID() == X86::RSP;
51 StackRegisterDef != Inst.getDefs().end() &&
52 "Expected push instruction to implicitly use stack pointer register.");
53 Inst.getDefs().erase(StackRegisterDef);
60 setMemBarriers(Inst, MCI);
61 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...
An instruction propagated through the simulated instruction pipeline.
void postProcessInstruction(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.