LLVM: lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

53

54using namespace llvm;

55

56#define DEBUG_TYPE "asm-printer"

57

59

60

61

62

63

67 for (MVT T : {MVT::i32, MVT::i64, MVT::f32, MVT::f64, MVT::v16i8, MVT::v8i16,

68 MVT::v4i32, MVT::v2i64, MVT::v4f32, MVT::v2f64, MVT::v8f16})

69 if (TRI->isTypeLegalForClass(*TRC, T))

70 return T;

71 LLVM_DEBUG(errs() << "Unknown type for register number: " << RegNo);

73 return MVT::Other;

74}

75

79 "Unlowered physical register encountered during assembly printing");

80 assert(!MFI->isVRegStackified(RegNo));

81 unsigned WAReg = MFI->getWAReg(RegNo);

83 return '$' + utostr(WAReg);

84}

85

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

108 if (Name.front() == '"' && Name.back() == '"')

109 Name = Name.substr(1, Name.size() - 2);

110 return Name.starts_with("__invoke_");

111}

112

113

114

116 switch (VT) {

118 return 'i';

120 return 'j';

122 return 'f';

124 return 'd';

126 return 'V';

128 return 'F';

130 return 'X';

132 return 'E';

133 default:

135 }

136}

137

138

139

142 std::string Ret = "invoke_";

144 for (auto VT : Sig->Returns)

146 else

147 Ret += 'v';

148

151 return Ret;

152}

153

154

155

156

157

161

162 const bool EnableEmEH =

166 InvokeDetected = true;

168 std::string Msg =

169 "Emscripten EH/SjLj does not support multivalue returns: " +

170 std::string(F->getName()) + ": " +

173 }

176 } else {

178 }

179 return WasmSym;

180}

181

185 return;

186 }

187

190 if (!Sym->getType()) {

193 if (Subtarget) {

194

195

196

197

198

202 }

204 }

205

212

213

215 }

216}

217

220

221 if (WasmSym->getType())

222 return WasmSym;

223

225

226

227

228

229

230 if (Name == "__stack_pointer" || Name == "__tls_base" ||

231 Name == "__memory_base" || Name == "__table_base" ||

232 Name == "__tls_size" || Name == "__tls_align") {

233 bool Mutable =

234 Name == "__stack_pointer" || Name == "__tls_base";

239 Mutable});

240 return WasmSym;

241 }

242

243 if (Name.starts_with("GCC_except_table")) {

245 return WasmSym;

246 }

247

250 if (Name == "__cpp_exception" || Name == "__c_longjmp") {

252 WasmSym->setExternal(true);

253

254

255

256

257

258

262 } else {

265 }

266 auto Signature = OutContext.createWasmSignature();

267 Signature->Returns = std::move(Returns);

268 Signature->Params = std::move(Params);

269 WasmSym->setSignature(Signature);

270

271 return WasmSym;

272}

273

275 std::optionalwasm::WasmSymbolType WasmTy = Sym->getType();

276 if (!WasmTy)

277 return;

278

279 switch (*WasmTy) {

282 break;

285 break;

288 break;

289 default:

290 break;

291 }

292}

293

295 if (signaturesEmitted)

296 return;

297 signaturesEmitted = true;

298

299

300

301

302

306 if (WasmSym->isFunction()) {

307

308

310 }

311 }

312

313 for (auto &It : OutContext.getSymbols()) {

314

315

316

317 auto Sym = static_cast<MCSymbolWasm *>(It.getValue().Symbol);

318 if (Sym && !Sym->isDefined())

320 }

321

323 for (const auto &F : M) {

324 if (F.isIntrinsic())

325 continue;

326

327

328

329

330

334

335

336

337

339 bool InvokeDetected = false;

341

342

343

344

345

346 if (InvokeDetected && !InvokeSymbols.insert(Sym).second)

347 continue;

348

350 if (!Sym->getSignature()) {

351 Sym->setSignature(Signature);

352 }

353

355

356 if (F.hasFnAttribute("wasm-import-module")) {

358 F.getFnAttribute("wasm-import-module").getValueAsString();

359 Sym->setImportModule(OutContext.allocateString(Name));

361 }

362 if (F.hasFnAttribute("wasm-import-name")) {

363

364

366 InvokeDetected

367 ? Sym->getName()

368 : F.getFnAttribute("wasm-import-name").getValueAsString();

369 Sym->setImportName(OutContext.allocateString(Name));

371 }

372

373 if (F.hasFnAttribute("wasm-export-name")) {

375 StringRef Name = F.getFnAttribute("wasm-export-name").getValueAsString();

376 Sym->setExportName(OutContext.allocateString(Name));

378 }

379 }

380}

381

383

384

385

387

388

389

390

391

392

393

394 for (const auto &F : M) {

395 if (F.isIntrinsic() && F.hasAddressTaken()) {

399 break;

400 }

401 }

402

403 for (const auto &G : M.globals()) {

404 if (G.hasInitializer() && G.hasExternalLinkage() &&

406 G.getValueType()->isSized()) {

407 uint16_t Size = M.getDataLayout().getTypeAllocSize(G.getValueType());

410 }

411 }

412

413 if (const NamedMDNode *Named = M.getNamedMetadata("wasm.custom_sections")) {

414 for (const Metadata *MD : Named->operands()) {

416 if (!Tuple || Tuple->getNumOperands() != 2)

417 continue;

420 if (!Name || !Contents)

421 continue;

422

424 std::string SectionName = (".custom_section." + Name->getString()).str();

430 }

431 }

432

436}

437

440 if (const NamedMDNode *Debug = M.getNamedMetadata("llvm.dbg.cu")) {

442 for (size_t I = 0, E = Debug->getNumOperands(); I < E; ++I) {

446

447 Language.consume_front("DW_LANG_");

448 if (SeenLanguages.insert(Language).second)

450 }

451 }

452

454 if (const NamedMDNode *Ident = M.getNamedMetadata("llvm.ident")) {

456 for (size_t I = 0, E = Ident->getNumOperands(); I < E; ++I) {

457 const auto *S = cast(Ident->getOperand(I)->getOperand(0));

458 std::pair<StringRef, StringRef> Field = S->getString().split("version");

461 if (SeenTools.insert(Name).second)

463 }

464 }

465

466 int FieldCount = int(!Languages.empty()) + int(!Tools.empty());

467 if (FieldCount != 0) {

472 OutStreamer->emitULEB128IntValue(FieldCount);

473 for (auto &Producers : {std::make_pair("language", &Languages),

474 std::make_pair("processed-by", &Tools)}) {

475 if (Producers.second->empty())

476 continue;

477 OutStreamer->emitULEB128IntValue(strlen(Producers.first));

479 OutStreamer->emitULEB128IntValue(Producers.second->size());

480 for (auto &Producer : *Producers.second) {

481 OutStreamer->emitULEB128IntValue(Producer.first.size());

483 OutStreamer->emitULEB128IntValue(Producer.second.size());

485 }

486 }

488 }

489}

490

492 struct FeatureEntry {

494 std::string Name;

495 };

496

497

499 auto EmitFeature = [&](std::string Feature) {

500 std::string MDKey = (StringRef("wasm-feature-") + Feature).str();

501 Metadata *Policy = M.getModuleFlag(MDKey);

502 if (Policy == nullptr)

503 return;

504

505 FeatureEntry Entry;

506 Entry.Prefix = 0;

507 Entry.Name = Feature;

508

511 Entry.Prefix = I->getZExtValue();

512

513

516 return;

517

518 EmittedFeatures.push_back(Entry);

519 };

520

522 EmitFeature(KV.Key);

523 }

524

525 EmitFeature("shared-mem");

526

527

528

529

530 if (M.getDataLayout().getPointerSize() == 8) {

531

532

534 }

535

536 if (EmittedFeatures.size() == 0)

537 return;

538

539

543 OutStreamer->switchSection(FeaturesSection);

544

545 OutStreamer->emitULEB128IntValue(EmittedFeatures.size());

546 for (auto &F : EmittedFeatures) {

548 OutStreamer->emitULEB128IntValue(F.Name.size());

550 }

551

553}

554

556 auto V = M.getNamedGlobal("llvm.global.annotations");

557 if (!V)

558 return;

559

560

565

567

569 continue;

571

572

577 CustomSections[AnnotationString].push_back(Sym);

578 }

579

580

581 for (const auto &[Name, Symbols] : CustomSections) {

585 OutStreamer->switchSection(CustomSection);

586

587 for (auto &Sym : Symbols) {

590 4);

591 }

593 }

594}

595

598 assert(MF->getConstantPool()->getConstants().empty() &&

599 "WebAssembly disables constant pools");

600}

601

605

611

616

618

619

620 if (MDNode *Idx = F.getMetadata("wasm.index")) {

621 assert(Idx->getNumOperands() == 1);

622

625 }

626

630

632}

633

636 WebAssembly_MC::verifyInstructionPredicates(MI->getOpcode(),

637 Subtarget->getFeatureBits());

638

639 switch (MI->getOpcode()) {

640 case WebAssembly::ARGUMENT_i32:

641 case WebAssembly::ARGUMENT_i32_S:

642 case WebAssembly::ARGUMENT_i64:

643 case WebAssembly::ARGUMENT_i64_S:

644 case WebAssembly::ARGUMENT_f32:

645 case WebAssembly::ARGUMENT_f32_S:

646 case WebAssembly::ARGUMENT_f64:

647 case WebAssembly::ARGUMENT_f64_S:

648 case WebAssembly::ARGUMENT_v16i8:

649 case WebAssembly::ARGUMENT_v16i8_S:

650 case WebAssembly::ARGUMENT_v8i16:

651 case WebAssembly::ARGUMENT_v8i16_S:

652 case WebAssembly::ARGUMENT_v4i32:

653 case WebAssembly::ARGUMENT_v4i32_S:

654 case WebAssembly::ARGUMENT_v2i64:

655 case WebAssembly::ARGUMENT_v2i64_S:

656 case WebAssembly::ARGUMENT_v4f32:

657 case WebAssembly::ARGUMENT_v4f32_S:

658 case WebAssembly::ARGUMENT_v2f64:

659 case WebAssembly::ARGUMENT_v2f64_S:

660 case WebAssembly::ARGUMENT_v8f16:

661 case WebAssembly::ARGUMENT_v8f16_S:

662

663

664 break;

665 case WebAssembly::FALLTHROUGH_RETURN: {

666

667

669 OutStreamer->AddComment("fallthrough-return");

671 }

672 break;

673 }

674 case WebAssembly::COMPILER_FENCE:

675

676

677 break;

678 case WebAssembly::CATCH:

679 case WebAssembly::CATCH_S:

680 case WebAssembly::CATCH_REF:

681 case WebAssembly::CATCH_REF_S:

682 case WebAssembly::CATCH_ALL:

683 case WebAssembly::CATCH_ALL_S:

684 case WebAssembly::CATCH_ALL_REF:

685 case WebAssembly::CATCH_ALL_REF_S:

686

687

688 break;

689 default: {

692 MCInstLowering.lower(MI, TmpInst);

694 break;

695 }

696 }

697}

698

700 unsigned OpNo,

701 const char *ExtraCode,

703

705 return false;

706

707 if (!ExtraCode) {

712 return false;

714

715

716 assert(MI->getOpcode() == WebAssembly::INLINEASM);

718 return false;

721 return false;

725 return false;

728 return false;

729 default:

730 break;

731 }

732 }

733

734 return true;

735}

736

738 unsigned OpNo,

739 const char *ExtraCode,

741

742

743

744

745

746

748}

749

751

753 "WebAssembly Assmebly Printer", false, false)

754

755

757LLVMInitializeWebAssemblyAsmPrinter() {

760}

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

Function Alias Analysis Results

static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")

#define LLVM_EXTERNAL_VISIBILITY

Module.h This file contains the declarations for the Module class.

This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...

Register const TargetRegisterInfo * TRI

This file implements a map that provides insertion order iteration.

OptimizedStructLayoutField Field

#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)

This file defines the SmallSet class.

static TableGen::Emitter::Opt Y("gen-skeleton-entry", EmitSkeleton, "Generate example skeleton entry")

static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")

static std::string getEmscriptenInvokeSymbolName(wasm::WasmSignature *Sig)

Definition WebAssemblyAsmPrinter.cpp:140

static bool isEmscriptenInvokeName(StringRef Name)

Definition WebAssemblyAsmPrinter.cpp:107

static char getInvokeSig(wasm::ValType VT)

Definition WebAssemblyAsmPrinter.cpp:115

cl::opt< bool > WasmKeepRegisters

This file contains the declaration of the WebAssemblyMCAsmInfo class.

This file declares the class to lower WebAssembly MachineInstrs to their corresponding MCInst records...

This file provides WebAssembly-specific target descriptions.

This file declares WebAssembly-specific per-machine-function information.

This file contains the WebAssembly implementation of the WebAssemblyRegisterInfo class.

This file provides signature information for runtime libcalls.

This file registers the WebAssembly target.

This file declares the WebAssembly-specific subclass of TargetMachine.

This file declares WebAssembly-specific target streamer classes.

This file contains the declaration of the WebAssembly-specific type parsing utility functions.

This file contains the declaration of the WebAssembly-specific utility functions.

This file contains the entry points for global functions defined in the LLVM WebAssembly back-end.

MCSymbol * getSymbol(const GlobalValue *GV) const

void EmitToStreamer(MCStreamer &S, const MCInst &Inst)

virtual void emitGlobalVariable(const GlobalVariable *GV)

Emit the specified global variable to the .s file.

TargetMachine & TM

Target machine description.

virtual void PrintSymbolOperand(const MachineOperand &MO, raw_ostream &OS)

Print the MachineOperand as a symbol.

const MCAsmInfo * MAI

Target Asm Printer information.

MachineFunction * MF

The current machine function.

virtual const MCExpr * lowerConstant(const Constant *CV, const Constant *BaseCV=nullptr, uint64_t Offset=0)

Lower the specified LLVM Constant to an MCExpr.

virtual void emitFunctionBodyStart()

Targets can override this to emit stuff before the first basic block in the function.

virtual void emitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const

This emits linkage information about GVSym based on GV, if this is supported by the target.

void printOffset(int64_t Offset, raw_ostream &OS) const

This is just convenient handler for printing offsets.

MCSymbol * getSymbolPreferLocal(const GlobalValue &GV) const

Similar to getSymbol() but preferred for references.

MCSymbol * CurrentFnSym

The symbol for the current function.

MachineModuleInfo * MMI

This is a pointer to the current MachineModuleInfo.

MCContext & OutContext

This is the context for the output file that we are streaming.

void emitVisibility(MCSymbol *Sym, unsigned Visibility, bool IsDefinition=true) const

This emits visibility information about symbol, if this is supported by the target.

std::unique_ptr< MCStreamer > OutStreamer

This is the MCStreamer object for the file we are generating.

virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS)

Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as...

bool isVerbose() const

Return true if assembly output should contain comments.

MCSymbol * GetExternalSymbolSymbol(const Twine &Sym) const

Return the MCSymbol for the specified ExternalSymbol.

@ Debug

Emit .debug_frame.

virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS)

Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant.

ConstantArray - Constant Array Declarations.

Implements a dense probed hash-table based set.

bool isThreadLocal() const

If the value is "Thread Local", its value isn't shared by the threads.

VisibilityTypes getVisibility() const

LLVM_ABI bool isDeclaration() const

Return true if the primary definition of this global value is outside of the current translation unit...

unsigned getAddressSpace() const

Module * getParent()

Get the module that this global value is contained inside of...

LLVM_ABI const DataLayout & getDataLayout() const

Get the data layout of the module this global belongs to.

Type * getValueType() const

bool hasInitializer() const

Definitions have initializers, declarations don't.

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

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

This represents a section on wasm.

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

void setSignature(wasm::WasmSignature *Sig)

std::optional< wasm::WasmSymbolType > getType() const

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

LLVM_ABI void print(raw_ostream &OS, const MCAsmInfo *MAI) const

print - Print the value to the stream OS.

Target specific streamer interface.

LLVM_ABI StringRef getString() const

LLVM_ABI MCSymbol * getSymbol() const

Return the MCSymbol for this basic block.

Representation of each machine instruction.

MachineModuleInfoWasm - This is a MachineModuleInfoImpl implementation for Wasm targets.

SetVector< StringRef > MachineSymbolsUsed

MachineOperand class - Representation of each machine instruction operand.

MachineBasicBlock * getMBB() const

MachineOperandType getType() const

getType - Returns the MachineOperandType for this operand.

const char * getSymbolName() const

Register getReg() const

getReg - Returns the register number.

@ MO_Immediate

Immediate operand.

@ MO_GlobalAddress

Address of a global value.

@ MO_MachineBasicBlock

MachineBasicBlock reference.

@ MO_Register

Register operand.

@ MO_ExternalSymbol

Name of external global symbol.

int64_t getOffset() const

Return the offset from the symbol in this operand.

This class implements a map that also provides access to all stored values in a deterministic order.

A Module instance is used to store all the information related to an LLVM module.

LLVMContext & getContext() const

Get the global data context.

Wrapper class representing virtual and physical registers.

constexpr bool isVirtual() const

Return true if the specified register number is in the virtual register namespace.

static SectionKind getMetadata()

SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...

std::pair< const_iterator, bool > insert(const T &V)

insert - Insert an element into the set if it isn't already there.

reference emplace_back(ArgTypes &&... Args)

void push_back(const T &Elt)

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

StringRef - Represent a constant reference to a string, i.e.

TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

The instances of the Type class are immutable: once they are created, they are never changed.

LLVM Value Representation.

LLVM_ABI const Value * stripPointerCasts() const

Strip off pointer casts, all-zero GEPs and address space casts.

void emitJumpTableInfo() override

Print assembly representations of the jump tables used by the current function to the current output ...

Definition WebAssemblyAsmPrinter.cpp:602

void EmitProducerInfo(Module &M)

Definition WebAssemblyAsmPrinter.cpp:438

void emitGlobalVariable(const GlobalVariable *GV) override

Emit the specified global variable to the .s file.

Definition WebAssemblyAsmPrinter.cpp:182

void EmitTargetFeatures(Module &M)

Definition WebAssemblyAsmPrinter.cpp:491

bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS) override

Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as...

Definition WebAssemblyAsmPrinter.cpp:737

const WebAssemblySubtarget & getSubtarget() const

WebAssemblyTargetStreamer * getTargetStreamer()

Definition WebAssemblyAsmPrinter.cpp:86

void emitInstruction(const MachineInstr *MI) override

Targets should implement this to emit instructions.

Definition WebAssemblyAsmPrinter.cpp:634

std::string regToString(const MachineOperand &MO)

Definition WebAssemblyAsmPrinter.cpp:76

void emitSymbolType(const MCSymbolWasm *Sym)

Definition WebAssemblyAsmPrinter.cpp:274

MCSymbol * getOrCreateWasmSymbol(StringRef Name)

Definition WebAssemblyAsmPrinter.cpp:218

void emitConstantPool() override

Print to the current output stream assembly representations of the constants in the constant pool MCP...

Definition WebAssemblyAsmPrinter.cpp:596

MVT getRegType(unsigned RegNo) const

Definition WebAssemblyAsmPrinter.cpp:64

void emitDecls(const Module &M)

Definition WebAssemblyAsmPrinter.cpp:294

void emitFunctionBodyStart() override

Targets can override this to emit stuff before the first basic block in the function.

Definition WebAssemblyAsmPrinter.cpp:606

bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS) override

Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant.

Definition WebAssemblyAsmPrinter.cpp:699

void EmitFunctionAttributes(Module &M)

Definition WebAssemblyAsmPrinter.cpp:555

void emitEndOfAsmFile(Module &M) override

This virtual method can be overridden by targets that want to emit something at the end of their file...

Definition WebAssemblyAsmPrinter.cpp:382

MCSymbolWasm * getMCSymbolForFunction(const Function *F, wasm::WasmSignature *Sig, bool &InvokeDetected)

Definition WebAssemblyAsmPrinter.cpp:158

This class is used to lower an MachineInstr into an MCInst.

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

WebAssembly-specific streamer interface, to implement support WebAssembly-specific assembly directive...

virtual void emitFunctionType(const MCSymbolWasm *Sym)=0

.functype

virtual void emitLocal(ArrayRef< wasm::ValType > Types)=0

.local

virtual void emitTagType(const MCSymbolWasm *Sym)=0

.tagtype

virtual void emitExportName(const MCSymbolWasm *Sym, StringRef ExportName)=0

.export_name

virtual void emitGlobalType(const MCSymbolWasm *Sym)=0

.globaltype

virtual void emitImportModule(const MCSymbolWasm *Sym, StringRef ImportModule)=0

.import_module

virtual void emitTableType(const MCSymbolWasm *Sym)=0

.tabletype

virtual void emitImportName(const MCSymbolWasm *Sym, StringRef ImportName)=0

.import_name

virtual void emitIndIdx(const MCExpr *Value)=0

.indidx

std::pair< iterator, bool > insert(const ValueT &V)

This class implements an extremely fast bulk output stream that can only output to a stream.

LLVM_ABI StringRef LanguageString(unsigned Language)

#define llvm_unreachable(msg)

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

MCSymbolWasm * getOrCreateFunctionTableSymbol(MCContext &Ctx, const WebAssemblySubtarget *Subtarget)

Returns the __indirect_function_table, for use in call_indirect and in function bitcasts.

void wasmSymbolSetType(MCSymbolWasm *Sym, const Type *GlobalVT, ArrayRef< MVT > VTs)

Sets a Wasm Symbol Type.

static const unsigned UnusedReg

cl::opt< bool > WasmEnableEmEH

cl::opt< bool > WasmEnableEmSjLj

std::string signatureToString(const wasm::WasmSignature *Sig)

void getLibcallSignature(const WebAssemblySubtarget &Subtarget, RTLIB::Libcall LC, SmallVectorImpl< wasm::ValType > &Rets, SmallVectorImpl< wasm::ValType > &Params)

bool isWasmVarAddressSpace(unsigned AS)

@ WASM_FEATURE_PREFIX_USED

@ WASM_FEATURE_PREFIX_DISALLOWED

@ WASM_SYMBOL_TYPE_GLOBAL

@ WASM_SYMBOL_TYPE_FUNCTION

This is an optimization pass for GlobalISel generic memory operations.

void computeSignatureVTs(const FunctionType *Ty, const Function *TargetFunc, const Function &ContextFunc, const TargetMachine &TM, SmallVectorImpl< MVT > &Params, SmallVectorImpl< MVT > &Results)

const SubtargetFeatureKV WebAssemblyFeatureKV[WebAssembly::NumSubtargetFeatures]

decltype(auto) dyn_cast(const From &Val)

dyn_cast - Return the argument parameter cast to the specified type.

LLVM_ABI bool getConstantStringInfo(const Value *V, StringRef &Str, bool TrimAtNul=true)

This function computes the length of a null-terminated C string pointed to by V.

std::string utostr(uint64_t X, bool isNeg=false)

FunctionAddr VTableAddr uintptr_t uintptr_t Version

LLVM_ABI raw_ostream & dbgs()

dbgs() - This returns a reference to a raw_ostream for debugging messages.

Target & getTheWebAssemblyTarget32()

LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)

bool isa(const From &Val)

isa - Return true if the parameter to the template is an instance of one of the template type argu...

LLVM_ABI raw_fd_ostream & errs()

This returns a reference to a raw_ostream for standard error.

Target & getTheWebAssemblyTarget64()

DWARFExpression::Operation Op

void valTypesFromMVTs(ArrayRef< MVT > In, SmallVectorImpl< wasm::ValType > &Out)

decltype(auto) cast(const From &Val)

cast - Return the argument parameter cast to the specified type.

wasm::WasmSignature * signatureFromMVTs(MCContext &Ctx, const SmallVectorImpl< MVT > &Results, const SmallVectorImpl< MVT > &Params)

void computeLegalValueVTs(const WebAssemblyTargetLowering &TLI, LLVMContext &Ctx, const DataLayout &DL, Type *Ty, SmallVectorImpl< MVT > &ValueVTs)

@ MCSA_NoDeadStrip

.no_dead_strip (MachO)

RegisterAsmPrinter - Helper template for registering a target specific assembly printer,...

Used to provide key value pairs for feature and CPU bit flags.

SmallVector< ValType, 1 > Returns

SmallVector< ValType, 4 > Params