Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/RISCV/RISCVTargetMachine.h
Line
Count
Source
1
//===-- RISCVTargetMachine.h - Define TargetMachine for RISCV ---*- 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 RISCV specific subclass of TargetMachine.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_LIB_TARGET_RISCV_RISCVTARGETMACHINE_H
14
#define LLVM_LIB_TARGET_RISCV_RISCVTARGETMACHINE_H
15
16
#include "MCTargetDesc/RISCVMCTargetDesc.h"
17
#include "RISCVSubtarget.h"
18
#include "llvm/CodeGen/SelectionDAGTargetInfo.h"
19
#include "llvm/IR/DataLayout.h"
20
#include "llvm/Target/TargetMachine.h"
21
22
namespace llvm {
23
class RISCVTargetMachine : public LLVMTargetMachine {
24
  std::unique_ptr<TargetLoweringObjectFile> TLOF;
25
  RISCVSubtarget Subtarget;
26
27
public:
28
  RISCVTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
29
                     StringRef FS, const TargetOptions &Options,
30
                     Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
31
                     CodeGenOpt::Level OL, bool JIT);
32
33
47.5k
  const RISCVSubtarget *getSubtargetImpl(const Function &) const override {
34
47.5k
    return &Subtarget;
35
47.5k
  }
36
37
  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
38
39
14.8k
  TargetLoweringObjectFile *getObjFileLowering() const override {
40
14.8k
    return TLOF.get();
41
14.8k
  }
42
43
  TargetTransformInfo getTargetTransformInfo(const Function &F) override;
44
};
45
}
46
47
#endif