xref: /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/R600TargetMachine.h (revision 5956d97f4b3204318ceb6aa9c77bd0bc6ea87a41)
1 //===-- R600TargetMachine.h - AMDGPU TargetMachine Interface ----*- 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 /// \file
10 /// The AMDGPU TargetMachine interface definition for hw codgen targets.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_AMDGPU_R600TARGETMACHINE_H
15 #define LLVM_LIB_TARGET_AMDGPU_R600TARGETMACHINE_H
16 
17 #include "AMDGPUTargetMachine.h"
18 #include "R600Subtarget.h"
19 #include "llvm/Target/TargetMachine.h"
20 
21 namespace llvm {
22 
23 //===----------------------------------------------------------------------===//
24 // R600 Target Machine (R600 -> Cayman)
25 //===----------------------------------------------------------------------===//
26 
27 class R600TargetMachine final : public AMDGPUTargetMachine {
28 private:
29   mutable StringMap<std::unique_ptr<R600Subtarget>> SubtargetMap;
30 
31 public:
32   R600TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
33                     StringRef FS, TargetOptions Options,
34                     Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
35                     CodeGenOpt::Level OL, bool JIT);
36 
37   TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
38 
39   const TargetSubtargetInfo *getSubtargetImpl(const Function &) const override;
40 
41   TargetTransformInfo getTargetTransformInfo(const Function &F) override;
42 
43   bool isMachineVerifierClean() const override { return false; }
44 };
45 
46 } // end namespace llvm
47 
48 #endif // LLVM_LIB_TARGET_AMDGPU_R600TARGETMACHINE_H
49