Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / lib / Target / Xtensa / XtensaTargetMachine.h
blobdd76f45b3bb717ae7da69fcad1fbc47fd7e1f44b
1 //===-- XtensaTargetMachine.h - Define TargetMachine for Xtensa -*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
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
8 //
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"
19 #include <optional>
21 namespace llvm {
22 extern Target TheXtensaTarget;
24 class XtensaTargetMachine : public LLVMTargetMachine {
25 std::unique_ptr<TargetLoweringObjectFile> TLOF;
26 public:
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,
37 bool JIT);
39 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
40 TargetLoweringObjectFile *getObjFileLowering() const override {
41 return TLOF.get();
44 } // end namespace llvm
46 #endif // LLVM_LIB_TARGET_XTENSA_XTENSATARGETMACHINE_H