LLVM: lib/Target/WebAssembly/WebAssemblySubtarget.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYSUBTARGET_H
16#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYSUBTARGET_H
17
24#include
25
26#define GET_SUBTARGETINFO_HEADER
27#include "WebAssemblyGenSubtargetInfo.inc"
28
29namespace llvm {
30
31
32extern const SubtargetFeatureKV
34
36 enum SIMDEnum {
37 NoSIMD,
38 SIMD128,
39 RelaxedSIMD,
40 } SIMDLevel = NoSIMD;
41
42 bool HasAtomics = false;
43 bool HasBulkMemory = false;
44 bool HasBulkMemoryOpt = false;
45 bool HasCallIndirectOverlong = false;
46 bool HasExceptionHandling = false;
47 bool HasExtendedConst = false;
48 bool HasFP16 = false;
49 bool HasGC = false;
50 bool HasMultiMemory = false;
51 bool HasMultivalue = false;
52 bool HasMutableGlobals = false;
53 bool HasNontrappingFPToInt = false;
54 bool HasReferenceTypes = false;
55 bool HasSignExt = false;
56 bool HasTailCall = false;
57 bool HasWideArithmetic = false;
58
59
61
66
69
70public:
71
72
75
80 return &FrameLowering;
81 }
86 return &InstrInfo;
87 }
95 bool useAA() const override;
96
97
98 bool hasAddr64() const { return TargetTriple.isArch64Bit(); }
99 bool hasAtomics() const { return HasAtomics; }
105 bool hasFP16() const { return HasFP16; }
111 bool hasGC() const { return HasGC; }
114 bool hasSIMD128() const { return SIMDLevel >= SIMD128; }
117
118
119
121};
122
123}
124
125#endif
This class implements WebAssembly-specific bits of TargetFrameLowering class.
This file defines the interfaces that WebAssembly uses to lower LLVM code into a selection DAG.
This file contains the WebAssembly implementation of the TargetInstrInfo class.
This file provides WebAssembly-specific target descriptions.
This file defines the WebAssembly subclass for SelectionDAGTargetInfo.
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.
const WebAssemblyRegisterInfo & getRegisterInfo() const
bool hasCallIndirectOverlong() const
Definition WebAssemblySubtarget.h:102
bool hasExtendedConst() const
Definition WebAssemblySubtarget.h:104
bool hasFP16() const
Definition WebAssemblySubtarget.h:105
bool hasTailCall() const
Definition WebAssemblySubtarget.h:115
bool enableAtomicExpand() const override
const WebAssemblySelectionDAGInfo * getSelectionDAGInfo() const override
Definition WebAssemblySubtarget.h:76
const Triple & getTargetTriple() const
Definition WebAssemblySubtarget.h:91
bool hasMultiMemory() const
Definition WebAssemblySubtarget.h:106
bool enableIndirectBrExpand() const override
Definition WebAssemblySubtarget.h:93
const WebAssemblyTargetLowering * getTargetLowering() const override
Definition WebAssemblySubtarget.h:82
const WebAssemblyInstrInfo * getInstrInfo() const override
Definition WebAssemblySubtarget.h:85
bool hasBulkMemoryOpt() const
Definition WebAssemblySubtarget.h:101
bool hasAddr64() const
Definition WebAssemblySubtarget.h:98
bool hasBulkMemory() const
Definition WebAssemblySubtarget.h:100
bool hasAtomics() const
Definition WebAssemblySubtarget.h:99
const WebAssemblyRegisterInfo * getRegisterInfo() const override
Definition WebAssemblySubtarget.h:88
bool enableMachineScheduler() const override
bool hasMultivalue() const
Definition WebAssemblySubtarget.h:107
bool hasWideArithmetic() const
Definition WebAssemblySubtarget.h:116
bool hasReferenceTypes() const
Definition WebAssemblySubtarget.h:110
bool hasGC() const
Definition WebAssemblySubtarget.h:111
bool hasSIMD128() const
Definition WebAssemblySubtarget.h:114
bool hasExceptionHandling() const
Definition WebAssemblySubtarget.h:103
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.
bool hasSignExt() const
Definition WebAssemblySubtarget.h:113
bool hasMutableGlobals() const
Definition WebAssemblySubtarget.h:108
bool hasRelaxedSIMD() const
Definition WebAssemblySubtarget.h:112
bool hasNontrappingFPToInt() const
Definition WebAssemblySubtarget.h:109
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
Parses features string setting specified subtarget options.
const WebAssemblyFrameLowering * getFrameLowering() const override
Definition WebAssemblySubtarget.h:79
bool useAA() const override
This is an optimization pass for GlobalISel generic memory operations.
const SubtargetFeatureKV WebAssemblyFeatureKV[WebAssembly::NumSubtargetFeatures]