1 //===-- XtensaTargetMachine.h - Define TargetMachine for Xtensa -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
6 // See https://llvm.org/LICENSE.txt for license information.
7 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
9 //===----------------------------------------------------------------------===//
11 // This file declares the Xtensa specific subclass of TargetMachine.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_XTENSA_XTENSATARGETMACHINE_H
16 #define LLVM_LIB_TARGET_XTENSA_XTENSATARGETMACHINE_H
18 #include "llvm/Target/TargetMachine.h"
22 extern Target TheXtensaTarget
;
24 class XtensaTargetMachine
: public LLVMTargetMachine
{
25 std::unique_ptr
<TargetLoweringObjectFile
> TLOF
;
27 XtensaTargetMachine(const Target
&T
, const Triple
&TT
, StringRef CPU
,
28 StringRef FS
, const TargetOptions
&Options
,
29 std::optional
<Reloc::Model
> RM
,
30 std::optional
<CodeModel::Model
> CM
, CodeGenOptLevel OL
,
31 bool JIT
, bool isLittle
);
33 XtensaTargetMachine(const Target
&T
, const Triple
&TT
, StringRef CPU
,
34 StringRef FS
, const TargetOptions
&Options
,
35 std::optional
<Reloc::Model
> RM
,
36 std::optional
<CodeModel::Model
> CM
, CodeGenOptLevel OL
,
39 TargetPassConfig
*createPassConfig(PassManagerBase
&PM
) override
;
40 TargetLoweringObjectFile
*getObjFileLowering() const override
{
44 } // end namespace llvm
46 #endif // LLVM_LIB_TARGET_XTENSA_XTENSATARGETMACHINE_H