AMDGPU: Mark test as XFAIL in expensive_checks builds
[llvm-project.git] / llvm / lib / Target / XCore / XCoreTargetMachine.h
blobb844e7ea76f066601f8e1d1badd3c3e3ca709d1f
1 //===-- XCoreTargetMachine.h - Define TargetMachine for XCore ---*- 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 XCore specific subclass of TargetMachine.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_XCORE_XCORETARGETMACHINE_H
14 #define LLVM_LIB_TARGET_XCORE_XCORETARGETMACHINE_H
16 #include "XCoreSubtarget.h"
17 #include "llvm/Analysis/TargetTransformInfo.h"
18 #include "llvm/CodeGen/CodeGenTargetMachineImpl.h"
19 #include "llvm/Support/CodeGen.h"
20 #include <memory>
21 #include <optional>
23 namespace llvm {
24 class StringRef;
26 class XCoreTargetMachine : public CodeGenTargetMachineImpl {
27 std::unique_ptr<TargetLoweringObjectFile> TLOF;
28 XCoreSubtarget Subtarget;
30 public:
31 XCoreTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
32 StringRef FS, const TargetOptions &Options,
33 std::optional<Reloc::Model> RM,
34 std::optional<CodeModel::Model> CM, CodeGenOptLevel OL,
35 bool JIT);
36 ~XCoreTargetMachine() override;
38 const XCoreSubtarget *getSubtargetImpl() const { return &Subtarget; }
39 const XCoreSubtarget *getSubtargetImpl(const Function &) const override {
40 return &Subtarget;
43 // Pass Pipeline Configuration
44 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
46 TargetTransformInfo getTargetTransformInfo(const Function &F) const override;
48 TargetLoweringObjectFile *getObjFileLowering() const override {
49 return TLOF.get();
52 MachineFunctionInfo *
53 createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F,
54 const TargetSubtargetInfo *STI) const override;
57 } // end namespace llvm
59 #endif // LLVM_LIB_TARGET_XCORE_XCORETARGETMACHINE_H