AMDGPU: Mark test as XFAIL in expensive_checks builds
[llvm-project.git] / llvm / lib / Target / SystemZ / SystemZTargetMachine.h
blobe8eeb85647b83fe5d7bedb30a73de5d12e2b3de8
1 //=- SystemZTargetMachine.h - Define TargetMachine for SystemZ ----*- 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 SystemZ specific subclass of TargetMachine.
11 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H
15 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H
17 #include "SystemZSubtarget.h"
18 #include "llvm/ADT/StringRef.h"
19 #include "llvm/Analysis/TargetTransformInfo.h"
20 #include "llvm/CodeGen/CodeGenTargetMachineImpl.h"
21 #include "llvm/Support/CodeGen.h"
22 #include "llvm/Target/TargetMachine.h"
23 #include <memory>
24 #include <optional>
26 namespace llvm {
28 class SystemZTargetMachine : public CodeGenTargetMachineImpl {
29 std::unique_ptr<TargetLoweringObjectFile> TLOF;
31 mutable StringMap<std::unique_ptr<SystemZSubtarget>> SubtargetMap;
33 public:
34 SystemZTargetMachine(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);
39 ~SystemZTargetMachine() override;
41 const SystemZSubtarget *getSubtargetImpl(const Function &) const override;
42 // DO NOT IMPLEMENT: There is no such thing as a valid default subtarget,
43 // subtargets are per-function entities based on the target-specific
44 // attributes of each function.
45 const SystemZSubtarget *getSubtargetImpl() const = delete;
47 // Override CodeGenTargetMachineImpl
48 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
49 TargetTransformInfo getTargetTransformInfo(const Function &F) const override;
51 TargetLoweringObjectFile *getObjFileLowering() const override {
52 return TLOF.get();
55 MachineFunctionInfo *
56 createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F,
57 const TargetSubtargetInfo *STI) const override;
59 bool targetSchedulesPostRAScheduling() const override { return true; };
62 } // end namespace llvm
64 #endif // LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H