1
//===-- WebAssemblySubtarget.cpp - WebAssembly Subtarget Information ------===//
3
// The LLVM Compiler Infrastructure
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
8
//===----------------------------------------------------------------------===//
11
/// \brief This file implements the WebAssembly-specific subclass of
14
//===----------------------------------------------------------------------===//
16
#include "WebAssemblyInstrInfo.h"
17
#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
18
#include "WebAssemblySubtarget.h"
19
#include "llvm/Support/TargetRegistry.h"
22
#define DEBUG_TYPE "wasm-subtarget"
24
#define GET_SUBTARGETINFO_CTOR
25
#define GET_SUBTARGETINFO_TARGET_DESC
26
#include "WebAssemblyGenSubtargetInfo.inc"
28
WebAssemblySubtarget &
29
WebAssemblySubtarget::initializeSubtargetDependencies(StringRef FS) {
30
// Determine default and user-specified characteristics
32
if (CPUString.empty())
33
CPUString = "generic";
35
ParseSubtargetFeatures(CPUString, FS);
39
WebAssemblySubtarget::WebAssemblySubtarget(const Triple &TT,
40
const std::string &CPU,
41
const std::string &FS,
42
const TargetMachine &TM)
43
: WebAssemblyGenSubtargetInfo(TT, CPU, FS), HasSIMD128(false),
44
CPUString(CPU), TargetTriple(TT), FrameLowering(),
45
InstrInfo(initializeSubtargetDependencies(FS)), TSInfo(),
48
bool WebAssemblySubtarget::enableMachineScheduler() const { return true; }