Deleted Added
full compact
AMDGPUTargetMachine.h (344779) AMDGPUTargetMachine.h (353358)
1//===-- AMDGPUTargetMachine.h - AMDGPU TargetMachine Interface --*- C++ -*-===//
2//
1//===-- AMDGPUTargetMachine.h - AMDGPU TargetMachine Interface --*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
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
4//
6//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10/// \file
11/// The AMDGPU TargetMachine interface definition for hw codgen targets.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETMACHINE_H
16#define LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETMACHINE_H
17
7//===----------------------------------------------------------------------===//
8//
9/// \file
10/// The AMDGPU TargetMachine interface definition for hw codgen targets.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETMACHINE_H
15#define LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETMACHINE_H
16
18#include "AMDGPUIntrinsicInfo.h"
19#include "AMDGPUSubtarget.h"
20#include "llvm/ADT/Optional.h"
21#include "llvm/ADT/StringMap.h"
22#include "llvm/ADT/StringRef.h"
23#include "llvm/Analysis/TargetTransformInfo.h"
24#include "llvm/Support/CodeGen.h"
25#include "llvm/Target/TargetMachine.h"
26#include <memory>

--- 63 unchanged lines hidden (view full) ---

90};
91
92//===----------------------------------------------------------------------===//
93// GCN Target Machine (SI+)
94//===----------------------------------------------------------------------===//
95
96class GCNTargetMachine final : public AMDGPUTargetMachine {
97private:
17#include "AMDGPUSubtarget.h"
18#include "llvm/ADT/Optional.h"
19#include "llvm/ADT/StringMap.h"
20#include "llvm/ADT/StringRef.h"
21#include "llvm/Analysis/TargetTransformInfo.h"
22#include "llvm/Support/CodeGen.h"
23#include "llvm/Target/TargetMachine.h"
24#include <memory>

--- 63 unchanged lines hidden (view full) ---

88};
89
90//===----------------------------------------------------------------------===//
91// GCN Target Machine (SI+)
92//===----------------------------------------------------------------------===//
93
94class GCNTargetMachine final : public AMDGPUTargetMachine {
95private:
98 AMDGPUIntrinsicInfo IntrinsicInfo;
99 mutable StringMap<std::unique_ptr<GCNSubtarget>> SubtargetMap;
100
101public:
102 GCNTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
103 StringRef FS, TargetOptions Options,
104 Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
105 CodeGenOpt::Level OL, bool JIT);
106
107 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
108
109 const GCNSubtarget *getSubtargetImpl(const Function &) const override;
110
111 TargetTransformInfo getTargetTransformInfo(const Function &F) override;
112
96 mutable StringMap<std::unique_ptr<GCNSubtarget>> SubtargetMap;
97
98public:
99 GCNTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
100 StringRef FS, TargetOptions Options,
101 Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
102 CodeGenOpt::Level OL, bool JIT);
103
104 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
105
106 const GCNSubtarget *getSubtargetImpl(const Function &) const override;
107
108 TargetTransformInfo getTargetTransformInfo(const Function &F) override;
109
113 const AMDGPUIntrinsicInfo *getIntrinsicInfo() const override {
114 return &IntrinsicInfo;
115 }
116
117 bool useIPRA() const override {
118 return true;
119 }
110 bool useIPRA() const override {
111 return true;
112 }
113
114 yaml::MachineFunctionInfo *createDefaultFuncInfoYAML() const override;
115 yaml::MachineFunctionInfo *
116 convertFuncInfoToYAML(const MachineFunction &MF) const override;
117 bool parseMachineFunctionInfo(const yaml::MachineFunctionInfo &,
118 PerFunctionMIParsingState &PFS,
119 SMDiagnostic &Error,
120 SMRange &SourceRange) const override;
120};
121
122} // end namespace llvm
123
124#endif // LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETMACHINE_H
121};
122
123} // end namespace llvm
124
125#endif // LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETMACHINE_H