LLVM 24.0.0git
WebAssemblyTargetMachine.cpp
Go to the documentation of this file.
1//===- WebAssemblyTargetMachine.cpp - Define TargetMachine for WebAssembly -==//
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/// \file
10/// This file defines the WebAssembly-specific subclass of TargetMachine.
11///
12//===----------------------------------------------------------------------===//
13
17#include "WebAssembly.h"
28#include "llvm/CodeGen/Passes.h"
30#include "llvm/IR/Function.h"
38#include <optional>
39using namespace llvm;
40
41#define DEBUG_TYPE "wasm"
42
45 // Register the target.
51
52 // Register backend passes
85}
86
87//===----------------------------------------------------------------------===//
88// WebAssembly Lowering public interface.
89//===----------------------------------------------------------------------===//
90
91static Reloc::Model getEffectiveRelocModel(std::optional<Reloc::Model> RM) {
92 // Default to static relocation model. This should always be more optimal
93 // than PIC since the static linker can determine all global addresses and
94 // assume direct function calls.
95 return RM.value_or(Reloc::Static);
96}
97
98static void basicCheckForEHAndSjLj(const WebAssemblyOptions &CLOpts) {
99 // You can't enable two modes of SjLj at the same time
100 if (CLOpts.enable_emscripten_sjlj && CLOpts.enable_sjlj)
102 "-enable-emscripten-sjlj not allowed with -wasm-enable-sjlj");
103}
104
105/// Create an WebAssembly architecture model.
106///
108 const Target &T, const Triple &TT, StringRef CPU, StringRef FS,
109 const TargetOptions &Options, std::optional<Reloc::Model> RM,
110 std::optional<CodeModel::Model> CM, CodeGenOptLevel OL, bool JIT)
111 : CodeGenTargetMachineImpl(T, TT, CPU, FS, Options,
113 getEffectiveCodeModel(CM, CodeModel::Large), OL),
114 CLOpts(cl::LibraryOptionsContext::get<WebAssemblyOptions>(
115 Options.MCOptions.LibraryOptions)),
116 TLOF(new WebAssemblyTargetObjectFile()) {
117 // WebAssembly type-checks instructions, but a noreturn function with a return
118 // type that doesn't match the context will cause a check failure. So we lower
119 // LLVM 'unreachable' to ISD::TRAP and then lower that to WebAssembly's
120 // 'unreachable' instructions which is meant for that case. Formerly, we also
121 // needed to add checks to SP failure emission in the instruction selection
122 // backends, but this has since been tied to TrapUnreachable and is no longer
123 // necessary.
124 this->Options.TrapUnreachable = true;
125 this->Options.NoTrapAfterNoreturn = false;
126
127 // WebAssembly treats each function as an independent unit. Force
128 // -ffunction-sections, effectively, so that we can emit them independently.
129 this->Options.FunctionSections = true;
130 this->Options.DataSections = true;
131 this->Options.UniqueSectionNames = true;
132
134 initAsmInfo();
135
136 // WebAssembly does not run RegAllocFast; tied operands must be lowered by
137 // TwoAddressInstructionPass.
139
141
142 // Note that we don't use setRequiresStructuredCFG(true). It disables
143 // optimizations than we're ok with, and want, such as critical edge
144 // splitting and tail merging.
145}
146
148
151 StringRef ABIName) const {
152 auto &I = SubtargetMap[CPU.str() + FS.str() + ABIName.str()];
153 if (!I) {
154 I = std::make_unique<WebAssemblySubtarget>(TargetTriple, CPU, FS, *this,
155 ABIName);
156 }
157 return I.get();
158}
159
162 AttributeSet FnAttrs = F.getAttributes().getFnAttrs();
163 const Module *M = F.getParent();
164 if (const WebAssemblySubtarget *ST = LastSubtarget.lookup(FnAttrs, M))
165 return ST;
166
167 SubtargetAttrs Attrs;
168 Attrs.CPU = FnAttrs.getAttribute("target-cpu");
169 Attrs.FS = FnAttrs.getAttribute("target-features");
170 Attrs.ABIName = getTargetABIName(*M);
171
172 if (const WebAssemblySubtarget *ST = LastSubtarget.lookup(FnAttrs, M, Attrs))
173 return ST;
174
175 StringRef CPU =
176 Attrs.CPU.isValid() ? Attrs.CPU.getValueAsString() : TargetCPU;
177 StringRef FS = Attrs.FS.isValid() ? Attrs.FS.getValueAsString() : TargetFS;
178
179 const WebAssemblySubtarget *ST = getSubtargetImpl(CPU, FS, Attrs.ABIName);
180 LastSubtarget.set(FnAttrs, M, Attrs, ST);
181 return ST;
182}
183
184namespace {
185
186/// WebAssembly Code Generator Pass Configuration Options.
187class WebAssemblyPassConfig final : public TargetPassConfig {
188public:
189 WebAssemblyPassConfig(WebAssemblyTargetMachine &TM, PassManagerBase &PM)
190 : TargetPassConfig(TM, PM) {}
191
192 WebAssemblyTargetMachine &getWebAssemblyTargetMachine() const {
194 }
195
196 void addIRPasses() override;
197 void addISelPrepare() override;
198 bool addInstSelector() override;
199 void addOptimizedRegAlloc() override;
200 void addPostRegAlloc() override;
201 bool addGCPasses() override { return false; }
202 void addPreEmitPass() override;
203 bool addPreISel() override;
204
205 bool addIRTranslator() override;
206 void addPreLegalizeMachineIR() override;
207 bool addLegalizeMachineIR() override;
208 void addPreRegBankSelect() override;
209 bool addRegBankSelect() override;
210 bool addGlobalInstructionSelect() override;
211};
212} // end anonymous namespace
213
220
223 return TargetTransformInfo(std::make_unique<WebAssemblyTTIImpl>(this, F));
224}
225
228 return new WebAssemblyPassConfig(*this, PM);
229}
230
231//===----------------------------------------------------------------------===//
232// The following functions are called from lib/CodeGen/Passes.cpp to modify
233// the CodeGen pass sequence.
234//===----------------------------------------------------------------------===//
235
236void WebAssemblyPassConfig::addIRPasses() {
237 // Add signatures to prototype-less function declarations
239
240 // Lower .llvm.global_dtors into .llvm.global_ctors with __cxa_atexit calls.
242
243 // Fix function bitcasts, as WebAssembly requires caller and callee signatures
244 // to match.
246
247 // Optimize "returned" function attributes.
248 if (getOptLevel() != CodeGenOptLevel::None)
250
251 // Wasm SjLj shares Emscripten SjLj's transformation, so it is handled here.
252 // Without Wasm or Emscripten EH, this also lowers invokes.
254
255 // Expand indirectbr instructions to switches.
256 addPass(createIndirectBrExpandPass(getOptLevel()));
257
258 // Try to expand `vecreduce_{and, or}` into `{any, all}_true`.
260 getWebAssemblyTargetMachine()));
261
263}
264
265void WebAssemblyPassConfig::addISelPrepare() {
266 // We need to move reference type allocas to WASM_ADDRESS_SPACE_VAR so that
267 // loads and stores are promoted to local.gets/local.sets.
269 // Lower atomics and TLS if necessary
271 getWebAssemblyTargetMachine()));
272
273 // This is a no-op if atomics are not used in the module
275
277}
278
279bool WebAssemblyPassConfig::addInstSelector() {
281 addPass(createWebAssemblyISelDagLegacyPass(getWebAssemblyTargetMachine(),
282 getOptLevel()));
283 // Run the argument-move pass immediately after the ScheduleDAG scheduler
284 // so that we can fix up the ARGUMENT instructions before anything else
285 // sees them in the wrong place.
287 // Set the p2align operands. This information is present during ISel, however
288 // it's inconvenient to collect. Collect it now, and update the immediate
289 // operands.
291
292 // Eliminate range checks and add default targets to br_table instructions.
294
295 // unreachable is terminator, non-terminator instruction after it is not
296 // allowed.
298
299 return false;
300}
301
302void WebAssemblyPassConfig::addOptimizedRegAlloc() {
303 // Currently RegisterCoalesce degrades wasm debug info quality by a
304 // significant margin. As a quick fix, disable this for -O1, which is often
305 // used for debugging large applications. Disabling this increases code size
306 // of Emscripten core benchmarks by ~5%, which is acceptable for -O1, which is
307 // usually not used for production builds.
308 // TODO Investigate why RegisterCoalesce degrades debug info quality and fix
309 // it properly
310 if (getOptLevel() == CodeGenOptLevel::Less)
311 disablePass(&RegisterCoalescerID);
313}
314
315void WebAssemblyPassConfig::addPostRegAlloc() {
316 // This pass hurts code size for wasm because it can generate irreducible
317 // control flow.
318 disablePass(&MachineBlockPlacementID);
319
321}
322
323void WebAssemblyPassConfig::addPreEmitPass() {
325
326 // Nullify DBG_VALUE_LISTs that we cannot handle.
328
329 // Remove any unreachable blocks that may be left floating around.
330 // Rare, but possible. Needed for WebAssemblyFixIrreducibleControlFlow.
332
333 // Eliminate multiple-entry loops.
335
336 // Do various transformations for exception handling.
337 // Every CFG-changing optimizations should come before this.
339
340 // Now that we have a prologue and epilogue and all frame indices are
341 // rewritten, eliminate SP and FP. This allows them to be stackified,
342 // colored, and numbered with the rest of the registers.
344
345 // Preparations and optimizations related to register stackification.
346 if (getOptLevel() != CodeGenOptLevel::None) {
347 // Depend on LiveIntervals and perform some optimizations on it.
349
350 // Prepare memory intrinsic calls for register stackifying.
352 }
353
354 // Mark registers as representing wasm's value stack. This is a key
355 // code-compression technique in WebAssembly. We run this pass (and
356 // MemIntrinsicResults above) very late, so that it sees as much code as
357 // possible, including code emitted by PEI and expanded by late tail
358 // duplication.
359 addPass(createWebAssemblyRegStackifyLegacyPass(getOptLevel()));
360
361 if (getOptLevel() != CodeGenOptLevel::None) {
362 // Run the register coloring pass to reduce the total number of registers.
363 // This runs after stackification so that it doesn't consider registers
364 // that become stackified.
366 }
367
368 // Sort the blocks of the CFG into topological order, a prerequisite for
369 // BLOCK and LOOP markers.
371
372 // Insert BLOCK and LOOP markers.
374
375 // Insert explicit local.get and local.set operators.
376 if (getWebAssemblyTargetMachine().getCLOpts().emit_explicit_locals)
378
379 // Lower br_unless into br_if.
381
382 // Perform the very last peephole optimizations on the code.
383 if (getOptLevel() != CodeGenOptLevel::None)
385
386 // Create a mapping from LLVM CodeGen virtual registers to wasm registers.
388
389 // Fix debug_values whose defs have been stackified.
390 if (getWebAssemblyTargetMachine().getCLOpts().emit_explicit_locals)
392
393 // Collect information to prepare for MC lowering / asm printing.
395}
396
397bool WebAssemblyPassConfig::addPreISel() {
399 return false;
400}
401
402bool WebAssemblyPassConfig::addIRTranslator() {
403 addPass(new IRTranslatorLegacy());
404 return false;
405}
406
407void WebAssemblyPassConfig::addPreLegalizeMachineIR() {
408 if (getOptLevel() != CodeGenOptLevel::None) {
410 }
411}
412bool WebAssemblyPassConfig::addLegalizeMachineIR() {
413 addPass(new LegalizerLegacy());
414 return false;
415}
416
417void WebAssemblyPassConfig::addPreRegBankSelect() {
418 if (getOptLevel() != CodeGenOptLevel::None) {
420 }
421}
422
423bool WebAssemblyPassConfig::addRegBankSelect() {
424 addPass(new RegBankSelectLegacy());
425 return false;
426}
427
428bool WebAssemblyPassConfig::addGlobalInstructionSelect() {
429 addPass(new InstructionSelectLegacy(getOptLevel()));
430
431 // We insert only if ISelDAG won't insert these at a later point.
432 if (isGlobalISelAbortEnabled()) {
437 }
438
439 return false;
440}
441
446
452
455 SMDiagnostic &Error, SMRange &SourceRange) const {
456 const auto &YamlMFI = static_cast<const yaml::WebAssemblyFunctionInfo &>(MFI);
457 MachineFunction &MF = PFS.MF;
458 MF.getInfo<WebAssemblyFunctionInfo>()->initializeBaseYamlFields(MF, YamlMFI);
459 return false;
460}
static Reloc::Model getEffectiveRelocModel()
#define X(NUM, ENUM, NAME)
Definition ELF.h:665
#define LLVM_ABI
Definition Compiler.h:211
#define LLVM_EXTERNAL_VISIBILITY
Definition Compiler.h:132
This file declares the IRTranslator pass.
#define F(x, y, z)
Definition MD5.cpp:54
#define I(x, y, z)
Definition MD5.cpp:57
#define T
This file describes the interface of the MachineFunctionPass responsible for assigning the generic vi...
const GCNTargetMachine & getTM(const GCNSubtarget *STI)
static TableGen::Emitter::Opt Y("gen-skeleton-entry", EmitSkeleton, "Generate example skeleton entry")
Target-Independent Code Generator Pass Configuration Options pass.
This file defines the interfaces that WebAssembly uses to lower LLVM code into a selection DAG.
This file provides WebAssembly-specific target descriptions.
This file declares WebAssembly-specific per-machine-function information.
This file registers the WebAssembly target.
LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyTarget()
static void basicCheckForEHAndSjLj(const WebAssemblyOptions &CLOpts)
This file declares the WebAssembly-specific subclass of TargetMachine.
This file declares the WebAssembly-specific subclass of TargetLoweringObjectFile.
This file a TargetTransformInfoImplBase conforming object specific to the WebAssembly target machine.
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.
This class holds the attributes for a particular argument, parameter, function, or return value.
Definition Attributes.h:445
LLVM_ABI Attribute getAttribute(Attribute::AttrKind Kind) const
Return the attribute object.
CodeGenTargetMachineImpl(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOptLevel OL)
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
This pass is responsible for selecting generic machine instructions to target-specific instructions.
static void setUseExtended(bool Enable)
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:68
static LLVM_ABI PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
This pass implements the reg bank selector pass used in the GlobalISel pipeline.
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...
Definition SourceMgr.h:307
Represents a range in source code.
Definition SMLoc.h:47
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
std::string str() const
Get the contents as an std::string.
Definition StringRef.h:222
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with.
StringRef getTargetABIName(const Module &M) const
Returns the effective target ABI name: the "target-abi" module flag if present, otherwise the -target...
std::unique_ptr< const MCSubtargetInfo > STI
TargetOptions Options
void setEnableTiedFastRegAlloc(bool Value)
unsigned FunctionSections
Emit functions into separate sections.
unsigned NoTrapAfterNoreturn
Do not emit a trap instruction for 'unreachable' IR instructions behind noreturn calls,...
unsigned DataSections
Emit data into separate sections.
unsigned TrapUnreachable
Emit target-specific trap instruction for 'unreachable' IR instructions.
Target-Independent Code Generator Pass Configuration Options.
virtual void addPostRegAlloc()
This method may be implemented by targets that want to run passes after register allocation pass pipe...
virtual bool addInstSelector()
addInstSelector - This method should install an instruction selector pass, which converts from LLVM c...
virtual bool addPreISel()
Methods with trivial inline returns are convenient points in the common codegen pass pipeline where t...
virtual void addOptimizedRegAlloc()
addOptimizedRegAlloc - Add passes related to register allocation.
virtual void addPreEmitPass()
This pass may be implemented by targets that want to run passes immediately before machine code is em...
virtual void addIRPasses()
Add common target configurable passes that perform LLVM IR to IR transforms following machine indepen...
virtual void addISelPrepare()
Add common passes that perform LLVM IR to IR transforms in preparation for instruction selection.
TargetSubtargetInfo - Generic base class for all target subtargets.
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:48
This class is derived from MachineFunctionInfo and contains private WebAssembly-specific information ...
yaml::MachineFunctionInfo * createDefaultFuncInfoYAML() const override
Allocate and return a default initialized instance of the YAML representation for the MachineFunction...
const WebAssemblySubtarget * getSubtargetImpl(StringRef CPU, StringRef FS, StringRef ABIName) const
bool parseMachineFunctionInfo(const yaml::MachineFunctionInfo &, PerFunctionMIParsingState &PFS, SMDiagnostic &Error, SMRange &SourceRange) const override
Parse out the target's MachineFunctionInfo from the YAML reprsentation.
WebAssemblyTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, std::optional< Reloc::Model > RM, std::optional< CodeModel::Model > CM, CodeGenOptLevel OL, bool JIT)
Create an WebAssembly architecture model.
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
MachineFunctionInfo * createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F, const TargetSubtargetInfo *STI) const override
Create the target's instance of MachineFunctionInfo.
TargetTransformInfo getTargetTransformInfo(const Function &F) const override
Get a TargetTransformInfo implementation for the target.
yaml::MachineFunctionInfo * convertFuncInfoToYAML(const MachineFunction &MF) const override
Allocate and initialize an instance of the YAML representation of the MachineFunctionInfo.
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
Registers T with cl::parseCommandLineOptions.
const AArch64MCOptions & getCLOpts(const MCTargetOptions &Options)
This namespace contains all of the command line option processing machinery.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI ModulePass * createLowerGlobalDtorsLegacyPass()
FunctionPass * createWebAssemblyExplicitLocalsLegacyPass()
FunctionPass * createWebAssemblyCleanCodeAfterTrapLegacyPass()
ModulePass * createWebAssemblyMCLowerPreLegacyPass()
void initializeWebAssemblySetP2AlignOperandsLegacyPass(PassRegistry &)
void initializeWebAssemblyRegStackifyLegacyPass(PassRegistry &)
LLVM_ABI char & RegisterCoalescerID
RegisterCoalescer - This pass merges live ranges to eliminate copies.
void initializeWebAssemblyPeepholeLegacyPass(PassRegistry &)
void initializeWebAssemblyExceptionInfoWrapperPassPass(PassRegistry &)
FunctionPass * createWebAssemblyPreLegalizerCombinerLegacyPass()
FunctionPass * createWebAssemblyRegNumberingLegacyPass()
void initializeWebAssemblyDAGToDAGISelLegacyPass(PassRegistry &)
FunctionPass * createWebAssemblySetP2AlignOperandsLegacyPass()
void initializeWebAssemblyPreLegalizerCombinerLegacyPass(PassRegistry &)
void initializeWebAssemblyMemIntrinsicResultsLegacyPass(PassRegistry &)
void initializeWebAssemblyRegNumberingLegacyPass(PassRegistry &)
void initializeWebAssemblyLateEHPrepareLegacyPass(PassRegistry &)
LLVM_ABI FunctionPass * createIndirectBrExpandPass(CodeGenOptLevel OptLevel)
static Reloc::Model getEffectiveRelocModel(std::optional< Reloc::Model > RM)
void initializeWebAssemblyNullifyDebugValueListsLegacyPass(PassRegistry &)
FunctionPass * createWebAssemblyArgumentMoveLegacyPass()
CodeModel::Model getEffectiveCodeModel(std::optional< CodeModel::Model > CM, CodeModel::Model Default)
Helper method for getting the code model, returning Default if CM does not have a value.
void initializeWebAssemblyRefTypeMem2LocalLegacyPass(PassRegistry &)
LLVM_ABI char & UnreachableMachineBlockElimID
UnreachableMachineBlockElimination - This pass removes unreachable machine basic blocks.
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)
void initializeWebAssemblyFixFunctionBitcastsLegacyPass(PassRegistry &)
void initializeWebAssemblyLowerBrUnlessLegacyPass(PassRegistry &)
Target & getTheWebAssemblyTarget32()
LLVM_ABI void initializeLowerGlobalDtorsLegacyPassPass(PassRegistry &)
FunctionPass * createWebAssemblyReduceToAnyAllTrueLegacyPass(WebAssemblyTargetMachine &TM)
FunctionPass * createWebAssemblyRegColoringLegacyPass()
FunctionPass * createWebAssemblyPostLegalizerCombinerLegacyPass()
FunctionPass * createWebAssemblyFixIrreducibleControlFlowLegacyPass()
void initializeWebAssemblyPostLegalizerCombinerLegacyPass(PassRegistry &)
CodeGenOptLevel
Code generation optimization level.
Definition CodeGen.h:280
ModulePass * createWebAssemblyCoalesceFeaturesAndStripAtomicsLegacyPass(WebAssemblyTargetMachine &TM)
FunctionPass * createWebAssemblyRefTypeMem2LocalLegacyPass()
void initializeWebAssemblyArgumentMoveLegacyPass(PassRegistry &)
void initializeWebAssemblyOptimizeReturnedLegacyPass(PassRegistry &)
void initializeWebAssemblyExplicitLocalsLegacyPass(PassRegistry &)
ModulePass * createWebAssemblyFixFunctionBitcastsLegacyPass()
FunctionPass * createWebAssemblyPeepholeLegacyPass()
LLVM_ABI void initializeGlobalISel(PassRegistry &)
Initialize all passes linked into the GlobalISel library.
FunctionPass * createWebAssemblyMemIntrinsicResultsLegacyPass()
void initializeWebAssemblyLowerEmscriptenEHSjLjLegacyPass(PassRegistry &)
Target & getTheWebAssemblyTarget64()
FunctionPass * createWebAssemblyOptimizeReturnedLegacyPass()
ModulePass * createWebAssemblyLowerEmscriptenEHSjLjLegacyPass()
void initializeWebAssemblyFixBrTableDefaultsLegacyPass(PassRegistry &)
void initializeWebAssemblyAddMissingPrototypesLegacyPass(PassRegistry &)
void initializeWebAssemblyCFGSortLegacyPass(PassRegistry &)
FunctionPass * createWebAssemblyDebugFixupLegacyPass()
FunctionPass * createWebAssemblyFixBrTableDefaultsLegacyPass()
FunctionPass * createWebAssemblyISelDagLegacyPass(WebAssemblyTargetMachine &TM, CodeGenOptLevel OptLevel)
FunctionPass * createWebAssemblyNullifyDebugValueListsLegacyPass()
FunctionPass * createWebAssemblyCFGStackifyLegacyPass()
void initializeWebAssemblyRegColoringLegacyPass(PassRegistry &)
FunctionPass * createWebAssemblyRegStackifyLegacyPass(CodeGenOptLevel OptLevel)
FunctionPass * createWebAssemblyOptimizeLiveIntervalsLegacyPass()
void initializeWebAssemblyFixIrreducibleControlFlowLegacyPass(PassRegistry &)
FunctionPass * createWebAssemblyLowerBrUnlessLegacyPass()
LLVM_ABI char & MachineBlockPlacementID
MachineBlockPlacement - This pass places basic blocks based on branch probabilities.
ModulePass * createWebAssemblyAddMissingPrototypesLegacyPass()
LLVM_ABI FunctionPass * createAtomicExpandLegacyPass()
AtomicExpandPass - At IR level this pass replace atomic instructions with __atomic_* library calls,...
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
Definition Allocator.h:391
FunctionPass * createWebAssemblyReplacePhysRegsLegacyPass()
void initializeWebAssemblyCFGStackifyLegacyPass(PassRegistry &)
void initializeWebAssemblyOptimizeLiveIntervalsLegacyPass(PassRegistry &)
FunctionPass * createWebAssemblyCFGSortLegacyPass()
void initializeWebAssemblyMCLowerPreLegacyPass(PassRegistry &)
void initializeWebAssemblyAsmPrinterPass(PassRegistry &)
void initializeWebAssemblyReplacePhysRegsLegacyPass(PassRegistry &)
FunctionPass * createWebAssemblyLateEHPrepareLegacyPass()
void initializeWebAssemblyDebugFixupLegacyPass(PassRegistry &)
LLVM_ABI void reportFatalUsageError(Error Err)
Report a fatal error that does not indicate a bug in LLVM.
Definition Error.cpp:177
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
static FuncInfoTy * create(BumpPtrAllocator &Allocator, const Function &F, const SubtargetTy *STI)
Factory function: default behavior is to call new using the supplied allocator.
RegisterTargetMachine - Helper template for registering a target machine implementation,...
Targets should override this in a way that mirrors the implementation of llvm::MachineFunctionInfo.