9#ifndef LLVM_CODEGEN_CFIINSTBUILDER_H
10#define LLVM_CODEGEN_CFIINSTBUILDER_H
41 : MF(*MBB.
getParent()), MBB(MBB), MIFlag(MIFlag), IsEH(IsEH),
42 TRI(*MF.getSubtarget().getRegisterInfo()),
43 CFIID(MF.getSubtarget().getInstrInfo()->
get(
55 BuildMI(MBB, InsertPt, MIMD, CFIID)
62 nullptr, TRI.getDwarfRegNum(
Reg, IsEH),
Offset));
67 nullptr, TRI.getDwarfRegNum(
Reg, IsEH)));
80 nullptr, TRI.getDwarfRegNum(
Reg, IsEH),
Offset));
93 nullptr, TRI.getDwarfRegNum(Reg1, IsEH),
94 TRI.getDwarfRegNum(Reg2, IsEH)));
103 nullptr, TRI.getDwarfRegNum(
Reg, IsEH)));
108 nullptr, TRI.getDwarfRegNum(
Reg, IsEH)));
113 nullptr, TRI.getDwarfRegNum(
Reg, IsEH)));
static const Function * getParent(const Value *V)
void buildEscape(StringRef Bytes, StringRef Comment="") const
void buildAdjustCFAOffset(int64_t Adjustment) const
CFIInstBuilder(MachineBasicBlock &MBB, MachineBasicBlock::iterator InsertPt, MachineInstr::MIFlag MIFlag, bool IsEH=true)
void buildDefCFAOffset(int64_t Offset, MCSymbol *Label=nullptr) const
void buildWindowSave() const
void buildRegister(MCRegister Reg1, MCRegister Reg2) const
void buildRestore(MCRegister Reg) const
void buildNegateRAState() const
void buildDefCFARegister(MCRegister Reg) const
void buildSameValue(MCRegister Reg) const
void buildNegateRAStateWithPC() const
void buildOffset(MCRegister Reg, int64_t Offset) const
void insertCFIInst(const MCCFIInstruction &CFIInst) const
CFIInstBuilder(MachineBasicBlock *MBB, MachineInstr::MIFlag MIFlag, bool IsEH=true)
void buildUndefined(MCRegister Reg) const
void buildDefCFA(MCRegister Reg, int64_t Offset) const
void setInsertPoint(MachineBasicBlock::iterator IP)
static MCCFIInstruction createDefCfaRegister(MCSymbol *L, unsigned Register, SMLoc Loc={})
.cfi_def_cfa_register modifies a rule for computing CFA.
static MCCFIInstruction createUndefined(MCSymbol *L, unsigned Register, SMLoc Loc={})
.cfi_undefined From now on the previous value of Register can't be restored anymore.
static MCCFIInstruction createRestore(MCSymbol *L, unsigned Register, SMLoc Loc={})
.cfi_restore says that the rule for Register is now the same as it was at the beginning of the functi...
static MCCFIInstruction createRegister(MCSymbol *L, unsigned Register1, unsigned Register2, SMLoc Loc={})
.cfi_register Previous value of Register1 is saved in register Register2.
static MCCFIInstruction cfiDefCfa(MCSymbol *L, unsigned Register, int64_t Offset, SMLoc Loc={})
.cfi_def_cfa defines a rule for computing CFA as: take address from Register and add Offset to it.
static MCCFIInstruction createOffset(MCSymbol *L, unsigned Register, int64_t Offset, SMLoc Loc={})
.cfi_offset Previous value of Register is saved at offset Offset from CFA.
static MCCFIInstruction createNegateRAStateWithPC(MCSymbol *L, SMLoc Loc={})
.cfi_negate_ra_state_with_pc AArch64 negate RA state with PC.
static MCCFIInstruction createNegateRAState(MCSymbol *L, SMLoc Loc={})
.cfi_negate_ra_state AArch64 negate RA state.
static MCCFIInstruction cfiDefCfaOffset(MCSymbol *L, int64_t Offset, SMLoc Loc={})
.cfi_def_cfa_offset modifies a rule for computing CFA.
static MCCFIInstruction createEscape(MCSymbol *L, StringRef Vals, SMLoc Loc={}, StringRef Comment="")
.cfi_escape Allows the user to add arbitrary bytes to the unwind info.
static MCCFIInstruction createWindowSave(MCSymbol *L, SMLoc Loc={})
.cfi_window_save SPARC register window is saved.
static MCCFIInstruction createAdjustCfaOffset(MCSymbol *L, int64_t Adjustment, SMLoc Loc={})
.cfi_adjust_cfa_offset Same as .cfi_def_cfa_offset, but Offset is a relative value that is added/subt...
static MCCFIInstruction createSameValue(MCSymbol *L, unsigned Register, SMLoc Loc={})
.cfi_same_value Current value of Register is the same as in the previous frame.
Describe properties that are true of each instruction in the target description file.
Wrapper class representing physical registers. Should be passed by value.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
MachineInstrBundleIterator< MachineInstr > iterator
const MachineInstrBuilder & addCFIIndex(unsigned CFIIndex) const
const MachineInstrBuilder & setMIFlag(MachineInstr::MIFlag Flag) const
Represents a location in source code.
StringRef - Represent a constant reference to a string, i.e.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
Invariant opcodes: All instruction sets have these as their low opcodes.
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.
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)