LLVM  14.0.0git
AArch64MCInstLower.cpp
Go to the documentation of this file.
1 //==-- AArch64MCInstLower.cpp - Convert AArch64 MachineInstr to an MCInst --==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains code to lower AArch64 MachineInstrs to their corresponding
10 // MCInst records.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "AArch64MCInstLower.h"
16 #include "Utils/AArch64BaseInfo.h"
21 #include "llvm/IR/Mangler.h"
22 #include "llvm/MC/MCContext.h"
23 #include "llvm/MC/MCExpr.h"
24 #include "llvm/MC/MCInst.h"
25 #include "llvm/Support/CodeGen.h"
29 using namespace llvm;
30 
32 
34  : Ctx(ctx), Printer(printer) {}
35 
36 MCSymbol *
38  const GlobalValue *GV = MO.getGlobal();
39  unsigned TargetFlags = MO.getTargetFlags();
40  const Triple &TheTriple = Printer.TM.getTargetTriple();
41  if (!TheTriple.isOSBinFormatCOFF())
42  return Printer.getSymbolPreferLocal(*GV);
43 
44  assert(TheTriple.isOSWindows() &&
45  "Windows is the only supported COFF target");
46 
47  bool IsIndirect = (TargetFlags & (AArch64II::MO_DLLIMPORT | AArch64II::MO_COFFSTUB));
48  if (!IsIndirect)
49  return Printer.getSymbol(GV);
50 
52  if (TargetFlags & AArch64II::MO_DLLIMPORT)
53  Name = "__imp_";
54  else if (TargetFlags & AArch64II::MO_COFFSTUB)
55  Name = ".refptr.";
56  Printer.TM.getNameWithPrefix(Name, GV,
57  Printer.getObjFileLowering().getMangler());
58 
59  MCSymbol *MCSym = Ctx.getOrCreateSymbol(Name);
60 
61  if (TargetFlags & AArch64II::MO_COFFSTUB) {
62  MachineModuleInfoCOFF &MMICOFF =
65  MMICOFF.getGVStubEntry(MCSym);
66 
67  if (!StubSym.getPointer())
68  StubSym = MachineModuleInfoImpl::StubValueTy(Printer.getSymbol(GV), true);
69  }
70 
71  return MCSym;
72 }
73 
74 MCSymbol *
76  return Printer.GetExternalSymbolSymbol(MO.getSymbolName());
77 }
78 
80  MCSymbol *Sym) const {
81  // FIXME: We would like an efficient form for this, so we don't have to do a
82  // lot of extra uniquing.
84  if ((MO.getTargetFlags() & AArch64II::MO_GOT) != 0) {
87  else if ((MO.getTargetFlags() & AArch64II::MO_FRAGMENT) ==
90  else
91  llvm_unreachable("Unexpected target flags with MO_GOT on GV operand");
92  } else if ((MO.getTargetFlags() & AArch64II::MO_TLS) != 0) {
95  else if ((MO.getTargetFlags() & AArch64II::MO_FRAGMENT) ==
98  else
99  llvm_unreachable("Unexpected target flags with MO_TLS on GV operand");
100  } else {
102  RefKind = MCSymbolRefExpr::VK_PAGE;
103  else if ((MO.getTargetFlags() & AArch64II::MO_FRAGMENT) ==
105  RefKind = MCSymbolRefExpr::VK_PAGEOFF;
106  }
107  const MCExpr *Expr = MCSymbolRefExpr::create(Sym, RefKind, Ctx);
108  if (!MO.isJTI() && MO.getOffset())
110  Expr, MCConstantExpr::create(MO.getOffset(), Ctx), Ctx);
111  return MCOperand::createExpr(Expr);
112 }
113 
115  MCSymbol *Sym) const {
116  uint32_t RefFlags = 0;
117 
119  RefFlags |= AArch64MCExpr::VK_GOT;
120  else if (MO.getTargetFlags() & AArch64II::MO_TLS) {
122  if (MO.isGlobal()) {
123  const GlobalValue *GV = MO.getGlobal();
124  Model = Printer.TM.getTLSModel(GV);
128 
129  } else {
130  assert(MO.isSymbol() &&
131  StringRef(MO.getSymbolName()) == "_TLS_MODULE_BASE_" &&
132  "unexpected external TLS symbol");
133  // The general dynamic access sequence is used to get the
134  // address of _TLS_MODULE_BASE_.
136  }
137  switch (Model) {
139  RefFlags |= AArch64MCExpr::VK_GOTTPREL;
140  break;
141  case TLSModel::LocalExec:
142  RefFlags |= AArch64MCExpr::VK_TPREL;
143  break;
145  RefFlags |= AArch64MCExpr::VK_DTPREL;
146  break;
148  RefFlags |= AArch64MCExpr::VK_TLSDESC;
149  break;
150  }
151  } else if (MO.getTargetFlags() & AArch64II::MO_PREL) {
152  RefFlags |= AArch64MCExpr::VK_PREL;
153  } else {
154  // No modifier means this is a generic reference, classified as absolute for
155  // the cases where it matters (:abs_g0: etc).
156  RefFlags |= AArch64MCExpr::VK_ABS;
157  }
158 
160  RefFlags |= AArch64MCExpr::VK_PAGE;
161  else if ((MO.getTargetFlags() & AArch64II::MO_FRAGMENT) ==
163  RefFlags |= AArch64MCExpr::VK_PAGEOFF;
165  RefFlags |= AArch64MCExpr::VK_G3;
167  RefFlags |= AArch64MCExpr::VK_G2;
169  RefFlags |= AArch64MCExpr::VK_G1;
171  RefFlags |= AArch64MCExpr::VK_G0;
173  RefFlags |= AArch64MCExpr::VK_HI12;
174 
175  if (MO.getTargetFlags() & AArch64II::MO_NC)
176  RefFlags |= AArch64MCExpr::VK_NC;
177 
178  const MCExpr *Expr =
180  if (!MO.isJTI() && MO.getOffset())
182  Expr, MCConstantExpr::create(MO.getOffset(), Ctx), Ctx);
183 
185  RefKind = static_cast<AArch64MCExpr::VariantKind>(RefFlags);
186  Expr = AArch64MCExpr::create(Expr, RefKind, Ctx);
187 
188  return MCOperand::createExpr(Expr);
189 }
190 
192  MCSymbol *Sym) const {
193  uint32_t RefFlags = 0;
194 
195  if (MO.getTargetFlags() & AArch64II::MO_TLS) {
197  RefFlags |= AArch64MCExpr::VK_SECREL_LO12;
198  else if ((MO.getTargetFlags() & AArch64II::MO_FRAGMENT) ==
200  RefFlags |= AArch64MCExpr::VK_SECREL_HI12;
201 
202  } else if (MO.getTargetFlags() & AArch64II::MO_S) {
203  RefFlags |= AArch64MCExpr::VK_SABS;
204  } else {
205  RefFlags |= AArch64MCExpr::VK_ABS;
206 
208  RefFlags |= AArch64MCExpr::VK_PAGE;
209  else if ((MO.getTargetFlags() & AArch64II::MO_FRAGMENT) ==
212  }
213 
215  RefFlags |= AArch64MCExpr::VK_G3;
217  RefFlags |= AArch64MCExpr::VK_G2;
219  RefFlags |= AArch64MCExpr::VK_G1;
221  RefFlags |= AArch64MCExpr::VK_G0;
222 
223  // FIXME: Currently we only set VK_NC for MO_G3/MO_G2/MO_G1/MO_G0. This is
224  // because setting VK_NC for others would mean setting their respective
225  // RefFlags correctly. We should do this in a separate patch.
226  if (MO.getTargetFlags() & AArch64II::MO_NC) {
227  auto MOFrag = (MO.getTargetFlags() & AArch64II::MO_FRAGMENT);
228  if (MOFrag == AArch64II::MO_G3 || MOFrag == AArch64II::MO_G2 ||
229  MOFrag == AArch64II::MO_G1 || MOFrag == AArch64II::MO_G0)
230  RefFlags |= AArch64MCExpr::VK_NC;
231  }
232 
233  const MCExpr *Expr =
235  if (!MO.isJTI() && MO.getOffset())
237  Expr, MCConstantExpr::create(MO.getOffset(), Ctx), Ctx);
238 
239  auto RefKind = static_cast<AArch64MCExpr::VariantKind>(RefFlags);
240  assert(RefKind != AArch64MCExpr::VK_INVALID &&
241  "Invalid relocation requested");
242  Expr = AArch64MCExpr::create(Expr, RefKind, Ctx);
243 
244  return MCOperand::createExpr(Expr);
245 }
246 
248  MCSymbol *Sym) const {
249  if (Printer.TM.getTargetTriple().isOSDarwin())
250  return lowerSymbolOperandDarwin(MO, Sym);
251  if (Printer.TM.getTargetTriple().isOSBinFormatCOFF())
252  return lowerSymbolOperandCOFF(MO, Sym);
253 
254  assert(Printer.TM.getTargetTriple().isOSBinFormatELF() && "Invalid target");
255  return lowerSymbolOperandELF(MO, Sym);
256 }
257 
259  MCOperand &MCOp) const {
260  switch (MO.getType()) {
261  default:
262  llvm_unreachable("unknown operand type");
264  // Ignore all implicit register operands.
265  if (MO.isImplicit())
266  return false;
267  MCOp = MCOperand::createReg(MO.getReg());
268  break;
270  // Regmasks are like implicit defs.
271  return false;
273  MCOp = MCOperand::createImm(MO.getImm());
274  break;
276  MCOp = MCOperand::createExpr(
278  break;
281  break;
284  break;
286  MCOp = LowerSymbolOperand(MO, MO.getMCSymbol());
287  break;
289  MCOp = LowerSymbolOperand(MO, Printer.GetJTISymbol(MO.getIndex()));
290  break;
292  MCOp = LowerSymbolOperand(MO, Printer.GetCPISymbol(MO.getIndex()));
293  break;
295  MCOp = LowerSymbolOperand(
296  MO, Printer.GetBlockAddressSymbol(MO.getBlockAddress()));
297  break;
298  }
299  return true;
300 }
301 
302 void AArch64MCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const {
303  OutMI.setOpcode(MI->getOpcode());
304 
305  for (const MachineOperand &MO : MI->operands()) {
306  MCOperand MCOp;
307  if (lowerOperand(MO, MCOp))
308  OutMI.addOperand(MCOp);
309  }
310 
311  switch (OutMI.getOpcode()) {
312  case AArch64::CATCHRET:
313  OutMI = MCInst();
314  OutMI.setOpcode(AArch64::RET);
315  OutMI.addOperand(MCOperand::createReg(AArch64::LR));
316  break;
317  case AArch64::CLEANUPRET:
318  OutMI = MCInst();
319  OutMI.setOpcode(AArch64::RET);
320  OutMI.addOperand(MCOperand::createReg(AArch64::LR));
321  break;
322  }
323 }
AsmPrinter.h
llvm::AArch64II::MO_G3
@ MO_G3
MO_G3 - A symbol operand with this flag (granule 3) represents the high 16-bits of a 64-bit address,...
Definition: AArch64BaseInfo.h:686
llvm::AArch64MCExpr::create
static const AArch64MCExpr * create(const MCExpr *Expr, VariantKind Kind, MCContext &Ctx)
Definition: AArch64MCExpr.cpp:26
llvm::MachineOperand::MO_BlockAddress
@ MO_BlockAddress
Address of a basic block.
Definition: MachineOperand.h:63
MachineModuleInfoImpls.h
llvm::AArch64MCInstLower::lowerOperand
bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp) const
Definition: AArch64MCInstLower.cpp:258
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:105
MachineInstr.h
llvm::MachineOperand::MO_Immediate
@ MO_Immediate
Immediate operand.
Definition: MachineOperand.h:53
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::MCSymbolRefExpr::VK_PAGEOFF
@ VK_PAGEOFF
Definition: MCExpr.h:219
llvm::AArch64MCExpr::VK_ABS
@ VK_ABS
Definition: AArch64MCExpr.h:28
llvm::AArch64II::MO_HI12
@ MO_HI12
MO_HI12 - This flag indicates that a symbol operand represents the bits 13-24 of a 64-bit address,...
Definition: AArch64BaseInfo.h:703
llvm::MCOperand::createExpr
static MCOperand createExpr(const MCExpr *Val)
Definition: MCInst.h:162
llvm::AArch64MCInstLower::GetExternalSymbolSymbol
MCSymbol * GetExternalSymbolSymbol(const MachineOperand &MO) const
Definition: AArch64MCInstLower.cpp:75
llvm::AArch64II::MO_G1
@ MO_G1
MO_G1 - A symbol operand with this flag (granule 1) represents the bits 16-31 of a 64-bit address,...
Definition: AArch64BaseInfo.h:694
llvm::Triple::isOSBinFormatCOFF
bool isOSBinFormatCOFF() const
Tests whether the OS uses the COFF binary format.
Definition: Triple.h:640
llvm::MachineOperand::getGlobal
const GlobalValue * getGlobal() const
Definition: MachineOperand.h:563
llvm::MCOperand::createImm
static MCOperand createImm(int64_t Val)
Definition: MCInst.h:141
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:72
llvm::MCConstantExpr::create
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)
Definition: MCExpr.cpp:194
llvm::TLSModel::GeneralDynamic
@ GeneralDynamic
Definition: CodeGen.h:43
llvm::AArch64MCInstLower::lowerSymbolOperandDarwin
MCOperand lowerSymbolOperandDarwin(const MachineOperand &MO, MCSymbol *Sym) const
Definition: AArch64MCInstLower.cpp:79
llvm::MachineOperand::getBlockAddress
const BlockAddress * getBlockAddress() const
Definition: MachineOperand.h:568
AArch64MCExpr.h
llvm::AArch64MCExpr::VK_NC
@ VK_NC
Definition: AArch64MCExpr.h:57
AArch64BaseInfo.h
llvm::AArch64MCExpr::VK_HI12
@ VK_HI12
Definition: AArch64MCExpr.h:44
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
MachineBasicBlock.h
llvm::AArch64II::MO_PREL
@ MO_PREL
MO_PREL - Indicates that the bits of the symbol operand represented by MO_G0 etc are PC relative.
Definition: AArch64BaseInfo.h:737
llvm::MachineOperand::isSymbol
bool isSymbol() const
isSymbol - Tests if this is a MO_ExternalSymbol operand.
Definition: MachineOperand.h:341
llvm::MachineOperand::isJTI
bool isJTI() const
isJTI - Tests if this is a MO_JumpTableIndex operand.
Definition: MachineOperand.h:337
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
llvm::AArch64MCExpr::VK_TPREL
@ VK_TPREL
Definition: AArch64MCExpr.h:34
llvm::AArch64MCInstLower::AArch64MCInstLower
AArch64MCInstLower(MCContext &ctx, AsmPrinter &printer)
Definition: AArch64MCInstLower.cpp:33
llvm::MachineOperand::getOffset
int64_t getOffset() const
Return the offset from the symbol in this operand.
Definition: MachineOperand.h:600
llvm::AArch64MCExpr::VK_DTPREL
@ VK_DTPREL
Definition: AArch64MCExpr.h:32
llvm::MachineOperand::getMCSymbol
MCSymbol * getMCSymbol() const
Definition: MachineOperand.h:573
llvm::MachineOperand::MO_Register
@ MO_Register
Register operand.
Definition: MachineOperand.h:52
llvm::AArch64II::MO_TLS
@ MO_TLS
MO_TLS - Indicates that the operand being accessed is some kind of thread-local symbol.
Definition: AArch64BaseInfo.h:724
llvm::MCInst::setOpcode
void setOpcode(unsigned Op)
Definition: MCInst.h:197
llvm::Reloc::Model
Model
Definition: CodeGen.h:22
llvm::MachineBasicBlock::getSymbol
MCSymbol * getSymbol() const
Return the MCSymbol for this basic block.
Definition: MachineBasicBlock.cpp:60
CommandLine.h
Printer
print alias Alias Set Printer
Definition: AliasSetTracker.cpp:762
llvm::MCContext::getOrCreateSymbol
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
Definition: MCContext.cpp:191
llvm::AArch64II::MO_G0
@ MO_G0
MO_G0 - A symbol operand with this flag (granule 0) represents the bits 0-15 of a 64-bit address,...
Definition: AArch64BaseInfo.h:698
llvm::MachineOperand::isImplicit
bool isImplicit() const
Definition: MachineOperand.h:380
llvm::Triple::isOSBinFormatELF
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
Definition: Triple.h:635
TargetMachine.h
llvm::MachineOperand::MO_GlobalAddress
@ MO_GlobalAddress
Address of a global value.
Definition: MachineOperand.h:62
llvm::Triple::isOSDarwin
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (macOS, iOS, tvOS or watchOS).
Definition: Triple.h:487
llvm::MachineOperand::getImm
int64_t getImm() const
Definition: MachineOperand.h:537
llvm::ISD::CATCHRET
@ CATCHRET
CATCHRET - Represents a return from a catch block funclet.
Definition: ISDOpcodes.h:999
llvm::MCSymbolRefExpr::VK_GOTPAGEOFF
@ VK_GOTPAGEOFF
Definition: MCExpr.h:221
MCContext.h
MCInst.h
llvm::MachineOperand
MachineOperand class - Representation of each machine instruction operand.
Definition: MachineOperand.h:49
llvm::AArch64MCExpr::VK_G1
@ VK_G1
Definition: AArch64MCExpr.h:46
llvm::AArch64MCInstLower::GetGlobalAddressSymbol
MCSymbol * GetGlobalAddressSymbol(const MachineOperand &MO) const
Definition: AArch64MCInstLower.cpp:37
llvm::AArch64MCExpr::VK_PAGEOFF
@ VK_PAGEOFF
Definition: AArch64MCExpr.h:43
llvm::MCInst::addOperand
void addOperand(const MCOperand Op)
Definition: MCInst.h:210
llvm::SmallString< 128 >
llvm::MachineModuleInfoCOFF
MachineModuleInfoCOFF - This is a MachineModuleInfoImpl implementation for COFF targets.
Definition: MachineModuleInfoImpls.h:85
llvm::AArch64II::MO_S
@ MO_S
MO_S - Indicates that the bits of the symbol operand represented by MO_G0 etc are signed.
Definition: AArch64BaseInfo.h:733
llvm::AArch64MCInstLower::lowerSymbolOperandCOFF
MCOperand lowerSymbolOperandCOFF(const MachineOperand &MO, MCSymbol *Sym) const
Definition: AArch64MCInstLower.cpp:191
llvm::cl::opt< bool >
llvm::GlobalValue
Definition: GlobalValue.h:44
llvm::MCSymbolRefExpr::VariantKind
VariantKind
Definition: MCExpr.h:194
llvm::MachineOperand::getTargetFlags
unsigned getTargetFlags() const
Definition: MachineOperand.h:221
llvm::AsmPrinter::GetCPISymbol
virtual MCSymbol * GetCPISymbol(unsigned CPID) const
Return the symbol for the specified constant pool entry.
Definition: AsmPrinter.cpp:3125
llvm::MachineInstr
Representation of each machine instruction.
Definition: MachineInstr.h:64
llvm::AArch64II::MO_DLLIMPORT
@ MO_DLLIMPORT
MO_DLLIMPORT - On a symbol operand, this represents that the reference to the symbol is for an import...
Definition: AArch64BaseInfo.h:729
llvm::TLSModel::LocalDynamic
@ LocalDynamic
Definition: CodeGen.h:44
llvm::AArch64MCExpr::VK_PAGE
@ VK_PAGE
Definition: AArch64MCExpr.h:42
llvm::AsmPrinter::GetBlockAddressSymbol
MCSymbol * GetBlockAddressSymbol(const BlockAddress *BA) const
Return the MCSymbol used to satisfy BlockAddress uses of the specified basic block.
Definition: AsmPrinter.cpp:3116
llvm::AArch64II::MO_NC
@ MO_NC
MO_NC - Indicates whether the linker is expected to check the symbol reference for overflow.
Definition: AArch64BaseInfo.h:718
llvm::AArch64II::MO_PAGEOFF
@ MO_PAGEOFF
MO_PAGEOFF - A symbol operand with this flag represents the offset of that symbol within a 4K page.
Definition: AArch64BaseInfo.h:682
llvm::AsmPrinter::getSymbolPreferLocal
MCSymbol * getSymbolPreferLocal(const GlobalValue &GV) const
Similar to getSymbol() but preferred for references.
Definition: AsmPrinter.cpp:490
llvm::ISD::CLEANUPRET
@ CLEANUPRET
CLEANUPRET - Represents a return from a cleanup block funclet.
Definition: ISDOpcodes.h:1003
llvm::AArch64MCExpr::VK_SECREL_LO12
@ VK_SECREL_LO12
Definition: AArch64MCExpr.h:109
llvm::MachineOperand::MO_MCSymbol
@ MO_MCSymbol
MCSymbol reference (for debug/eh info)
Definition: MachineOperand.h:67
llvm::MachineOperand::getType
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
Definition: MachineOperand.h:219
EnableAArch64ELFLocalDynamicTLSGeneration
cl::opt< bool > EnableAArch64ELFLocalDynamicTLSGeneration
llvm::TargetMachine::getTLSModel
TLSModel::Model getTLSModel(const GlobalValue *GV) const
Returns the TLS model which should be used for the given global variable.
Definition: TargetMachine.cpp:157
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::AsmPrinter::getSymbol
MCSymbol * getSymbol(const GlobalValue *GV) const
Definition: AsmPrinter.cpp:486
llvm::MachineOperand::getReg
Register getReg() const
getReg - Returns the register number.
Definition: MachineOperand.h:360
Mangler.h
llvm::MachineOperand::MO_JumpTableIndex
@ MO_JumpTableIndex
Address of indexed Jump Table for switch.
Definition: MachineOperand.h:60
llvm::AArch64II::MO_FRAGMENT
@ MO_FRAGMENT
Definition: AArch64BaseInfo.h:672
llvm::MCBinaryExpr::createAdd
static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
Definition: MCExpr.h:524
llvm::AsmPrinter::GetExternalSymbolSymbol
MCSymbol * GetExternalSymbolSymbol(StringRef Sym) const
Return the MCSymbol for the specified ExternalSymbol.
Definition: AsmPrinter.cpp:3172
llvm::TargetLoweringObjectFile::getMangler
Mangler & getMangler() const
Definition: TargetLoweringObjectFile.h:76
llvm::MachineOperand::getMBB
MachineBasicBlock * getMBB() const
Definition: MachineOperand.h:552
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::AsmPrinter::GetJTISymbol
MCSymbol * GetJTISymbol(unsigned JTID, bool isLinkerPrivate=false) const
Return the symbol for the specified jump table entry.
Definition: AsmPrinter.cpp:3153
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:134
llvm::MCOperand::createReg
static MCOperand createReg(unsigned Reg)
Definition: MCInst.h:134
TargetLoweringObjectFile.h
uint32_t
llvm::MachineModuleInfoCOFF::getGVStubEntry
StubValueTy & getGVStubEntry(MCSymbol *Sym)
Definition: MachineModuleInfoImpls.h:95
llvm::MachineOperand::MO_MachineBasicBlock
@ MO_MachineBasicBlock
MachineBasicBlock reference.
Definition: MachineOperand.h:56
llvm::AArch64MCExpr::VK_INVALID
@ VK_INVALID
Definition: AArch64MCExpr.h:112
llvm::AsmPrinter::MMI
MachineModuleInfo * MMI
This is a pointer to the current MachineModuleInfo.
Definition: AsmPrinter.h:103
llvm::Triple::isOSWindows
bool isOSWindows() const
Tests whether the OS is Windows.
Definition: Triple.h:550
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:52
llvm::TargetMachine::getNameWithPrefix
void getNameWithPrefix(SmallVectorImpl< char > &Name, const GlobalValue *GV, Mangler &Mang, bool MayAlwaysUsePrivate=false) const
Definition: TargetMachine.cpp:193
llvm::MCSymbolRefExpr::VK_TLVPPAGE
@ VK_TLVPPAGE
Definition: MCExpr.h:216
llvm::ARCISD::RET
@ RET
Definition: ARCISelLowering.h:52
llvm::MachineOperand::MO_ExternalSymbol
@ MO_ExternalSymbol
Name of external global symbol.
Definition: MachineOperand.h:61
llvm::MachineOperand::getIndex
int getIndex() const
Definition: MachineOperand.h:557
llvm::AArch64MCExpr::VK_G3
@ VK_G3
Definition: AArch64MCExpr.h:48
llvm::MCInst::getOpcode
unsigned getOpcode() const
Definition: MCInst.h:198
llvm::AsmPrinter
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:82
llvm::TLSModel::Model
Model
Definition: CodeGen.h:42
llvm::MCSymbolRefExpr::create
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
Definition: MCExpr.h:385
llvm::AArch64MCInstLower::LowerSymbolOperand
MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const
Definition: AArch64MCInstLower.cpp:247
CodeGen.h
llvm::TLSModel::InitialExec
@ InitialExec
Definition: CodeGen.h:45
llvm::AArch64MCInstLower::lowerSymbolOperandELF
MCOperand lowerSymbolOperandELF(const MachineOperand &MO, MCSymbol *Sym) const
Definition: AArch64MCInstLower.cpp:114
llvm::PointerIntPair
PointerIntPair - This class implements a pair of a pointer and small integer.
Definition: PointerIntPair.h:45
llvm::AsmPrinter::TM
TargetMachine & TM
Target machine description.
Definition: AsmPrinter.h:85
llvm::AArch64MCExpr::VariantKind
VariantKind
Definition: AArch64MCExpr.h:24
llvm::MachineOperand::getSymbolName
const char * getSymbolName() const
Definition: MachineOperand.h:608
llvm::AsmPrinter::getObjFileLowering
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
Definition: AsmPrinter.cpp:224
llvm::AArch64MCExpr::VK_TLSDESC
@ VK_TLSDESC
Definition: AArch64MCExpr.h:35
llvm::TargetMachine::getTargetTriple
const Triple & getTargetTriple() const
Definition: TargetMachine.h:128
llvm::MCOperand
Instances of this class represent operands of the MCInst class.
Definition: MCInst.h:36
llvm::AArch64II::MO_G2
@ MO_G2
MO_G2 - A symbol operand with this flag (granule 2) represents the bits 32-47 of a 64-bit address,...
Definition: AArch64BaseInfo.h:690
llvm::AArch64II::MO_COFFSTUB
@ MO_COFFSTUB
MO_COFFSTUB - On a symbol operand "FOO", this indicates that the reference is actually to the "....
Definition: AArch64BaseInfo.h:708
llvm::MCSymbolRefExpr::VK_None
@ VK_None
Definition: MCExpr.h:195
llvm::MCSymbolRefExpr::VK_GOTPAGE
@ VK_GOTPAGE
Definition: MCExpr.h:220
llvm::MachineOperand::MO_RegisterMask
@ MO_RegisterMask
Mask of preserved registers.
Definition: MachineOperand.h:64
llvm::AArch64MCExpr::VK_GOTTPREL
@ VK_GOTTPREL
Definition: AArch64MCExpr.h:33
llvm::MCSymbolRefExpr::VK_PAGE
@ VK_PAGE
Definition: MCExpr.h:218
MCExpr.h
llvm::AArch64MCExpr::VK_G2
@ VK_G2
Definition: AArch64MCExpr.h:47
llvm::AArch64II::MO_GOT
@ MO_GOT
MO_GOT - This flag indicates that a symbol operand represents the address of the GOT entry for the sy...
Definition: AArch64BaseInfo.h:713
llvm::MCSymbolRefExpr::VK_TLVPPAGEOFF
@ VK_TLVPPAGEOFF
Definition: MCExpr.h:217
llvm::AArch64MCExpr::VK_SECREL_HI12
@ VK_SECREL_HI12
Definition: AArch64MCExpr.h:110
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
llvm::AArch64MCExpr::VK_G0
@ VK_G0
Definition: AArch64MCExpr.h:45
llvm::AArch64MCExpr::VK_SABS
@ VK_SABS
Definition: AArch64MCExpr.h:29
llvm::MachineModuleInfo::getObjFileInfo
Ty & getObjFileInfo()
Keep track of various per-module pieces of information for backends that would like to do so.
Definition: MachineModuleInfo.h:191
llvm::AArch64MCExpr::VK_PREL
@ VK_PREL
Definition: AArch64MCExpr.h:30
llvm::AArch64MCInstLower::Lower
void Lower(const MachineInstr *MI, MCInst &OutMI) const
Definition: AArch64MCInstLower.cpp:302
llvm::AArch64II::MO_PAGE
@ MO_PAGE
MO_PAGE - A symbol operand with this flag represents the pc-relative offset of the 4K page containing...
Definition: AArch64BaseInfo.h:677
llvm::MachineOperand::isGlobal
bool isGlobal() const
isGlobal - Tests if this is a MO_GlobalAddress operand.
Definition: MachineOperand.h:339
llvm::TLSModel::LocalExec
@ LocalExec
Definition: CodeGen.h:46
llvm::MachineOperand::MO_ConstantPoolIndex
@ MO_ConstantPoolIndex
Address of indexed Constant in Constant Pool.
Definition: MachineOperand.h:58
AArch64MCInstLower.h
llvm::AArch64MCExpr::VK_GOT
@ VK_GOT
Definition: AArch64MCExpr.h:31