LLVM  6.0.0svn
LanaiSubtarget.cpp
Go to the documentation of this file.
1 //===- LanaiSubtarget.cpp - Lanai Subtarget Information -----------*- C++ -*-=//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the Lanai specific subclass of TargetSubtarget.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "LanaiSubtarget.h"
15 
16 #include "Lanai.h"
17 
18 #define DEBUG_TYPE "lanai-subtarget"
19 
20 #define GET_SUBTARGETINFO_TARGET_DESC
21 #define GET_SUBTARGETINFO_CTOR
22 #include "LanaiGenSubtargetInfo.inc"
23 
24 using namespace llvm;
25 
27  std::string CPUName = CPU;
28  if (CPUName.empty())
29  CPUName = "generic";
30 
31  ParseSubtargetFeatures(CPUName, FS);
32 }
33 
35  StringRef FS) {
36  initSubtargetFeatures(CPU, FS);
37  return *this;
38 }
39 
41  StringRef FeatureString, const TargetMachine &TM,
42  const TargetOptions & /*Options*/,
43  CodeModel::Model /*CodeModel*/,
44  CodeGenOpt::Level /*OptLevel*/)
45  : LanaiGenSubtargetInfo(TargetTriple, Cpu, FeatureString),
46  FrameLowering(initializeSubtargetDependencies(Cpu, FeatureString)),
47  InstrInfo(), TLInfo(TM, *this), TSInfo() {}
LanaiSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef FS)
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
void initSubtargetFeatures(StringRef CPU, StringRef FS)
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:57
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
LanaiSubtarget(const Triple &TargetTriple, StringRef Cpu, StringRef FeatureString, const TargetMachine &TM, const TargetOptions &Options, CodeModel::Model CodeModel, CodeGenOpt::Level OptLevel)