LLVM: lib/Target/Lanai/LanaiMCInstLower.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

15

28

29using namespace llvm;

30

33 return Printer.getSymbol(MO.getGlobal());

34}

35

40

43 return Printer.GetExternalSymbolSymbol(MO.getSymbolName());

44}

45

48 raw_svector_ostream(Name) << Printer.MAI->getPrivateGlobalPrefix() << "JTI"

49 << Printer.getFunctionNumber() << '_'

51

52 return Ctx.getOrCreateSymbol(Name.str());

53}

54

58 raw_svector_ostream(Name) << Printer.MAI->getPrivateGlobalPrefix() << "CPI"

59 << Printer.getFunctionNumber() << '_'

61

62 return Ctx.getOrCreateSymbol(Name.str());

63}

64

71 break;

74 break;

77 break;

78 default:

80 }

81

88}

89

92

95 switch (MO.getType()) {

97

98 if (MO.isImplicit())

99 continue;

101 break;

104 break;

108 break;

110 continue;

113 break;

116 break;

119 break;

122 break;

125 break;

126 default:

129 }

130

132 }

133}

This file defines the SmallString class.

MCSymbol * GetGlobalAddressSymbol(const MachineOperand &MO) const

Definition LanaiMCInstLower.cpp:32

MCSymbol * GetExternalSymbolSymbol(const MachineOperand &MO) const

Definition LanaiMCInstLower.cpp:42

MCSymbol * GetConstantPoolIndexSymbol(const MachineOperand &MO) const

Definition LanaiMCInstLower.cpp:56

MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const

Definition LanaiMCInstLower.cpp:65

MCSymbol * GetBlockAddressSymbol(const MachineOperand &MO) const

Definition LanaiMCInstLower.cpp:37

MCSymbol * GetJumpTableSymbol(const MachineOperand &MO) const

Definition LanaiMCInstLower.cpp:46

void Lower(const MachineInstr *MI, MCInst &OutMI) const

Definition LanaiMCInstLower.cpp:90

static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx, SMLoc Loc=SMLoc())

static LLVM_ABI const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)

Base class for the full range of assembler expressions which are needed for parsing.

Instances of this class represent a single low-level machine instruction.

void addOperand(const MCOperand Op)

void setOpcode(unsigned Op)

Instances of this class represent operands of the MCInst class.

static MCOperand createExpr(const MCExpr *Val)

static MCOperand createReg(MCRegister Reg)

static MCOperand createImm(int64_t Val)

static const MCSpecifierExpr * create(const MCExpr *Expr, Spec S, MCContext &Ctx, SMLoc Loc=SMLoc())

static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())

MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...

Representation of each machine instruction.

MachineOperand class - Representation of each machine instruction operand.

const GlobalValue * getGlobal() const

bool isJTI() const

isJTI - Tests if this is a MO_JumpTableIndex operand.

const BlockAddress * getBlockAddress() const

unsigned getTargetFlags() const

const char * getSymbolName() const

@ MO_Immediate

Immediate operand.

@ MO_ConstantPoolIndex

Address of indexed Constant in Constant Pool.

@ MO_GlobalAddress

Address of a global value.

@ MO_RegisterMask

Mask of preserved registers.

@ MO_BlockAddress

Address of a basic block.

@ MO_MachineBasicBlock

MachineBasicBlock reference.

@ MO_Register

Register operand.

@ MO_ExternalSymbol

Name of external global symbol.

@ MO_JumpTableIndex

Address of indexed Jump Table for switch.

int64_t getOffset() const

Return the offset from the symbol in this operand.

SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...

A raw_ostream that writes to an SmallVector or SmallString.

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI raw_fd_ostream & errs()

This returns a reference to a raw_ostream for standard error.