LLVM: lib/MC/MCInstrDesc.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
17
18using namespace llvm;
19
23 return true;
25 if (!PC)
26 return false;
28 return true;
29 return false;
30}
31
35 if (ImpDef == Reg || (MRI && MRI->isSubRegister(Reg, ImpDef)))
36 return true;
37 return false;
38}
39
42 for (int i = 0, e = NumDefs; i != e; ++i)
43 if (MI.getOperand(i).isReg() && MI.getOperand(i).getReg() &&
45 return true;
47 for (int i = NumOperands - 1, e = MI.getNumOperands(); i != e; ++i)
48 if (MI.getOperand(i).isReg() &&
50 return true;
52}
unsigned const MachineRegisterInfo * MRI
Instances of this class represent a single low-level machine instruction.
bool isIndirectBranch() const
Return true if this is an indirect branch, such as a branch through a register.
LLVM_ABI bool hasDefOfPhysReg(const MCInst &MI, MCRegister Reg, const MCRegisterInfo &RI) const
Return true if this instruction defines the specified physical register, either explicitly or implici...
Definition MCInstrDesc.cpp:40
unsigned short NumOperands
LLVM_ABI bool mayAffectControlFlow(const MCInst &MI, const MCRegisterInfo &RI) const
Return true if this is a branch or an instruction which directly writes to the program counter.
Definition MCInstrDesc.cpp:20
bool isBranch() const
Returns true if this is a conditional, unconditional, or indirect branch.
bool variadicOpsAreDefs() const
Return true if variadic operands of this instruction are definitions.
ArrayRef< MCPhysReg > implicit_defs() const
Return a list of registers that are potentially written by any instance of this machine instruction.
bool isCall() const
Return true if the instruction is a call.
bool isReturn() const
Return true if the instruction is a return.
LLVM_ABI bool hasImplicitDefOfPhysReg(MCRegister Reg, const MCRegisterInfo *MRI=nullptr) const
Return true if this instruction implicitly defines the specified physical register.
Definition MCInstrDesc.cpp:32
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.
bool isSubRegisterEq(MCRegister RegA, MCRegister RegB) const
Returns true if RegB is a sub-register of RegA or if RegB == RegA.
Wrapper class representing physical registers. Should be passed by value.
This is an optimization pass for GlobalISel generic memory operations.
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...