Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/XCore/XCoreSubtarget.h
Line
Count
Source
1
//===-- XCoreSubtarget.h - Define Subtarget for the XCore -------*- 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 declares the XCore specific subclass of TargetSubtargetInfo.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_LIB_TARGET_XCORE_XCORESUBTARGET_H
14
#define LLVM_LIB_TARGET_XCORE_XCORESUBTARGET_H
15
16
#include "XCoreFrameLowering.h"
17
#include "XCoreISelLowering.h"
18
#include "XCoreInstrInfo.h"
19
#include "XCoreSelectionDAGInfo.h"
20
#include "llvm/CodeGen/TargetSubtargetInfo.h"
21
#include "llvm/IR/DataLayout.h"
22
#include "llvm/Target/TargetMachine.h"
23
#include <string>
24
25
#define GET_SUBTARGETINFO_HEADER
26
#include "XCoreGenSubtargetInfo.inc"
27
28
namespace llvm {
29
class StringRef;
30
31
class XCoreSubtarget : public XCoreGenSubtargetInfo {
32
  virtual void anchor();
33
  XCoreInstrInfo InstrInfo;
34
  XCoreFrameLowering FrameLowering;
35
  XCoreTargetLowering TLInfo;
36
  XCoreSelectionDAGInfo TSInfo;
37
38
public:
39
  /// This constructor initializes the data members to match that
40
  /// of the specified triple.
41
  ///
42
  XCoreSubtarget(const Triple &TT, const std::string &CPU,
43
                 const std::string &FS, const TargetMachine &TM);
44
45
  /// ParseSubtargetFeatures - Parses features string setting specified
46
  /// subtarget options.  Definition of function is auto generated by tblgen.
47
  void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
48
49
14.6k
  const XCoreInstrInfo *getInstrInfo() const override { return &InstrInfo; }
50
12.5k
  const XCoreFrameLowering *getFrameLowering() const override {
51
12.5k
    return &FrameLowering;
52
12.5k
  }
53
6.25k
  const XCoreTargetLowering *getTargetLowering() const override {
54
6.25k
    return &TLInfo;
55
6.25k
  }
56
280
  const XCoreSelectionDAGInfo *getSelectionDAGInfo() const override {
57
280
    return &TSInfo;
58
280
  }
59
25.5k
  const TargetRegisterInfo *getRegisterInfo() const override {
60
25.5k
    return &InstrInfo.getRegisterInfo();
61
25.5k
  }
62
};
63
} // End llvm namespace
64
65
#endif