Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/Lanai/LanaiSubtarget.cpp
Line
Count
Source
1
//===- LanaiSubtarget.cpp - Lanai Subtarget Information -----------*- C++ -*-=//
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
// This file implements the Lanai specific subclass of TargetSubtarget.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "LanaiSubtarget.h"
14
15
#include "Lanai.h"
16
17
#define DEBUG_TYPE "lanai-subtarget"
18
19
#define GET_SUBTARGETINFO_TARGET_DESC
20
#define GET_SUBTARGETINFO_CTOR
21
#include "LanaiGenSubtargetInfo.inc"
22
23
using namespace llvm;
24
25
27
void LanaiSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
26
27
  std::string CPUName = CPU;
27
27
  if (CPUName.empty())
28
27
    CPUName = "generic";
29
27
30
27
  ParseSubtargetFeatures(CPUName, FS);
31
27
}
32
33
LanaiSubtarget &LanaiSubtarget::initializeSubtargetDependencies(StringRef CPU,
34
27
                                                                StringRef FS) {
35
27
  initSubtargetFeatures(CPU, FS);
36
27
  return *this;
37
27
}
38
39
LanaiSubtarget::LanaiSubtarget(const Triple &TargetTriple, StringRef Cpu,
40
                               StringRef FeatureString, const TargetMachine &TM,
41
                               const TargetOptions & /*Options*/,
42
                               CodeModel::Model /*CodeModel*/,
43
                               CodeGenOpt::Level /*OptLevel*/)
44
    : LanaiGenSubtargetInfo(TargetTriple, Cpu, FeatureString),
45
      FrameLowering(initializeSubtargetDependencies(Cpu, FeatureString)),
46
27
      InstrInfo(), TLInfo(TM, *this), TSInfo() {}