14#ifndef LLVM_MC_MCINSTRANALYSIS_H
15#define LLVM_MC_MCINSTRANALYSIS_H
90 if (
isBranch(Inst) || isCall(Inst) || isReturn(Inst) ||
91 isIndirectBranch(Inst))
96 return Info->get(Inst.
getOpcode()).hasDefOfPhysReg(Inst, PC, MCRI);
143 unsigned CPUID)
const {
168 unsigned CPUID)
const {
169 return isZeroIdiom(
MI, Mask, CPUID);
179 unsigned CPUID)
const {
191 virtual std::optional<uint64_t>
197 virtual std::optional<uint64_t>
201 virtual std::vector<std::pair<uint64_t, uint64_t>>
unsigned const MachineRegisterInfo * MRI
Analysis containing CSE Info
SmallVector< uint32_t, 0 > Writes
static bool isBranch(unsigned Opcode)
Class for arbitrary precision integers.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Instances of this class represent a single low-level machine instruction.
unsigned getOpcode() const
virtual std::vector< std::pair< uint64_t, uint64_t > > findPltEntries(uint64_t PltSectionVA, ArrayRef< uint8_t > PltContents, const MCSubtargetInfo &STI) const
Returns (PLT virtual address, GOT virtual address) pairs for PLT entries.
virtual bool isCall(const MCInst &Inst) const
virtual bool isBranch(const MCInst &Inst) const
virtual bool isOptimizableRegisterMove(const MCInst &MI, unsigned CPUID) const
Returns true if MI is a candidate for move elimination.
virtual bool isDependencyBreaking(const MCInst &MI, APInt &Mask, unsigned CPUID) const
Returns true if MI is a dependency breaking instruction for the subtarget associated with CPUID .
virtual bool isUnconditionalBranch(const MCInst &Inst) const
virtual bool isZeroIdiom(const MCInst &MI, APInt &Mask, unsigned CPUID) const
Returns true if MI is a dependency breaking zero-idiom for the given subtarget.
virtual bool isTerminator(const MCInst &Inst) const
virtual bool isBarrier(const MCInst &Inst) const
virtual void resetState()
Clear the internal state. See updateState for more information.
virtual bool isConditionalBranch(const MCInst &Inst) const
virtual bool mayAffectControlFlow(const MCInst &Inst, const MCRegisterInfo &MCRI) const
virtual bool isReturn(const MCInst &Inst) const
virtual void updateState(const MCInst &Inst, uint64_t Addr)
Update internal state with Inst at Addr.
MCInstrAnalysis(const MCInstrInfo *Info)
virtual ~MCInstrAnalysis()=default
virtual bool isIndirectBranch(const MCInst &Inst) const
Interface to description of machine instruction set.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
MCRegister getProgramCounter() const
Return the register which is the program counter.
Wrapper class representing physical registers. Should be passed by value.
Generic base class for all target subtargets.
Target - Wrapper for Target specific information.
This is an optimization pass for GlobalISel generic memory operations.