AMDGPU: Mark test as XFAIL in expensive_checks builds
[llvm-project.git] / llvm / lib / Target / Xtensa / XtensaTargetMachine.h
blobada42f31a11b2a0b60f41cc57ff3ebd39611d6c3
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 "XtensaSubtarget.h"
19 #include "llvm/CodeGen/CodeGenTargetMachineImpl.h"
20 #include <optional>
22 namespace llvm {
23 extern Target TheXtensaTarget;
25 class XtensaTargetMachine : public CodeGenTargetMachineImpl {
26 std::unique_ptr<TargetLoweringObjectFile> TLOF;
27 public:
28 XtensaTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
29 StringRef FS, const TargetOptions &Options,
30 std::optional<Reloc::Model> RM,
31 std::optional<CodeModel::Model> CM, CodeGenOptLevel OL,
32 bool JIT, bool isLittle);
34 XtensaTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
35 StringRef FS, const TargetOptions &Options,
36 std::optional<Reloc::Model> RM,
37 std::optional<CodeModel::Model> CM, CodeGenOptLevel OL,
38 bool JIT);
40 const XtensaSubtarget *getSubtargetImpl(const Function &F) const override;
42 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
44 TargetLoweringObjectFile *getObjFileLowering() const override {
45 return TLOF.get();
48 MachineFunctionInfo *
49 createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F,
50 const TargetSubtargetInfo *STI) const override;
52 protected:
53 mutable StringMap<std::unique_ptr<XtensaSubtarget>> SubtargetMap;
55 } // end namespace llvm
57 #endif // LLVM_LIB_TARGET_XTENSA_XTENSATARGETMACHINE_H