LLVM: lib/Target/WebAssembly/WebAssemblySubtarget.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
19using namespace llvm;
20
21#define DEBUG_TYPE "wasm-subtarget"
22
23#define GET_SUBTARGETINFO_CTOR
24#define GET_SUBTARGETINFO_TARGET_DESC
25#include "WebAssemblyGenSubtargetInfo.inc"
26
28WebAssemblySubtarget::initializeSubtargetDependencies(StringRef CPU,
30
32
33 if (CPU.empty())
34 CPU = "generic";
35
37
39
40
41 if (HasBulkMemory) {
42 HasBulkMemoryOpt = true;
43 Bits.set(WebAssembly::FeatureBulkMemoryOpt);
44 }
45
46
47 if (HasGC) {
48 HasReferenceTypes = true;
49 }
50
51
52 if (HasReferenceTypes) {
53 HasCallIndirectOverlong = true;
54 Bits.set(WebAssembly::FeatureCallIndirectOverlong);
55 }
56
57
58 setFeatureBits(Bits);
59
60 return *this;
61}
62
64 const std::string &CPU,
65 const std::string &FS,
68 TargetTriple(TT), InstrInfo(initializeSubtargetDependencies(CPU, FS)),
69 TLInfo(TM, *this) {}
70
75
77
78
79
80 return false;
81}
82
This file contains the WebAssembly implementation of the TargetInstrInfo class.
This file provides WebAssembly-specific target descriptions.
This file declares the WebAssembly-specific subclass of TargetSubtarget.
Container class for subtarget features.
StringRef - Represent a constant reference to a string, i.e.
Primary interface to the complete machine description for the target machine.
Triple - Helper class for working with autoconf configuration names.
bool enableAtomicExpand() const override
Definition WebAssemblySubtarget.cpp:71
bool enableMachineScheduler() const override
Definition WebAssemblySubtarget.cpp:76
WebAssemblySubtarget(const Triple &TT, const std::string &CPU, const std::string &FS, const TargetMachine &TM)
This constructor initializes the data members to match that of the specified triple.
Definition WebAssemblySubtarget.cpp:63
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
Parses features string setting specified subtarget options.
bool useAA() const override
Definition WebAssemblySubtarget.cpp:83
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.