LLVM: include/llvm/CodeGen/CFIInstBuilder.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_CODEGEN_CFIINSTBUILDER_H

10#define LLVM_CODEGEN_CFIINSTBUILDER_H

11

16

17namespace llvm {

18

19

24

25

27

28

29

30

31 bool IsEH;

32

33

36 const MIMetadata MIMD;

37

38public:

41 : MF(*MBB.getParent()), MBB(MBB), MIFlag(MIFlag), IsEH(IsEH),

42 TRI(*MF.getSubtarget().getRegisterInfo()),

43 CFIID(MF.getSubtarget().getInstrInfo()->get(

46 }

47

51

53

55 BuildMI(MBB, InsertPt, MIMD, CFIID)

58 }

59

62 nullptr, TRI.getDwarfRegNum(Reg, IsEH), Offset));

63 }

64

67 nullptr, TRI.getDwarfRegNum(Reg, IsEH)));

68 }

69

73

77

80 nullptr, TRI.getDwarfRegNum(Reg, IsEH), Offset));

81 }

82

86

90

93 nullptr, TRI.getDwarfRegNum(Reg1, IsEH),

94 TRI.getDwarfRegNum(Reg2, IsEH)));

95 }

96

100

103 nullptr, TRI.getDwarfRegNum(Reg, IsEH)));

104 }

105

108 nullptr, TRI.getDwarfRegNum(Reg, IsEH)));

109 }

110

113 nullptr, TRI.getDwarfRegNum(Reg, IsEH)));

114 }

115

120};

121

122}

123

124#endif

static const Function * getParent(const Value *V)

void buildEscape(StringRef Bytes, StringRef Comment="") const

Definition CFIInstBuilder.h:116

void buildAdjustCFAOffset(int64_t Adjustment) const

Definition CFIInstBuilder.h:74

CFIInstBuilder(MachineBasicBlock &MBB, MachineBasicBlock::iterator InsertPt, MachineInstr::MIFlag MIFlag, bool IsEH=true)

Definition CFIInstBuilder.h:39

void buildDefCFAOffset(int64_t Offset, MCSymbol *Label=nullptr) const

Definition CFIInstBuilder.h:70

void buildWindowSave() const

Definition CFIInstBuilder.h:97

void buildRegister(MCRegister Reg1, MCRegister Reg2) const

Definition CFIInstBuilder.h:91

void buildRestore(MCRegister Reg) const

Definition CFIInstBuilder.h:101

void buildNegateRAState() const

Definition CFIInstBuilder.h:83

void buildDefCFARegister(MCRegister Reg) const

Definition CFIInstBuilder.h:65

void buildSameValue(MCRegister Reg) const

Definition CFIInstBuilder.h:111

void buildNegateRAStateWithPC() const

Definition CFIInstBuilder.h:87

void buildOffset(MCRegister Reg, int64_t Offset) const

Definition CFIInstBuilder.h:78

void insertCFIInst(const MCCFIInstruction &CFIInst) const

Definition CFIInstBuilder.h:54

CFIInstBuilder(MachineBasicBlock *MBB, MachineInstr::MIFlag MIFlag, bool IsEH=true)

Definition CFIInstBuilder.h:48

void buildUndefined(MCRegister Reg) const

Definition CFIInstBuilder.h:106

void buildDefCFA(MCRegister Reg, int64_t Offset) const

Definition CFIInstBuilder.h:60

void setInsertPoint(MachineBasicBlock::iterator IP)

Definition CFIInstBuilder.h:52

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)