1 //===- ARCTargetMachine.h - Define TargetMachine for ARC --------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file declares the ARC specific subclass of TargetMachine.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_ARC_ARCTARGETMACHINE_H
14 #define LLVM_LIB_TARGET_ARC_ARCTARGETMACHINE_H
16 #include "ARCSubtarget.h"
17 #include "llvm/Target/TargetMachine.h"
21 class TargetPassConfig
;
23 class ARCTargetMachine
: public LLVMTargetMachine
{
24 std::unique_ptr
<TargetLoweringObjectFile
> TLOF
;
25 ARCSubtarget Subtarget
;
28 ARCTargetMachine(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 ~ARCTargetMachine() override
;
34 const ARCSubtarget
*getSubtargetImpl() const { return &Subtarget
; }
35 const ARCSubtarget
*getSubtargetImpl(const Function
&) const override
{
39 // Pass Pipeline Configuration
40 TargetPassConfig
*createPassConfig(PassManagerBase
&PM
) override
;
42 TargetTransformInfo
getTargetTransformInfo(const Function
&F
) override
;
43 TargetLoweringObjectFile
*getObjFileLowering() const override
{
48 } // end namespace llvm
50 #endif // LLVM_LIB_TARGET_ARC_ARCTARGETMACHINE_H