[llvm] b4e7806 - [AMDGPU] Forward-declare AMDGPUTargetMachine (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 30 09:54:05 PST 2021
Author: Kazu Hirata
Date: 2021-01-30T09:53:40-08:00
New Revision: b4e780697d1cf0c06e7ca3a908ece0ab65a470ff
URL: https://github.com/llvm/llvm-project/commit/b4e780697d1cf0c06e7ca3a908ece0ab65a470ff
DIFF: https://github.com/llvm/llvm-project/commit/b4e780697d1cf0c06e7ca3a908ece0ab65a470ff.diff
LOG: [AMDGPU] Forward-declare AMDGPUTargetMachine (NFC)
AMDGPUTargetTransformInfo.h needs AMDGPUTargetMachine but relies on a
forward declaration of AMDGPUTargetMachine in AMDGPU.h. This patch
adds a forward declaration right in AMDGPUTargetTransformInfo.h.
While we are at it, this patch removes the one in
AMDGPU.h, where it is unnecessary.
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPU.h
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPU.h b/llvm/lib/Target/AMDGPU/AMDGPU.h
index 677c49331cd5..79846b82eeab 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPU.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPU.h
@@ -15,7 +15,6 @@
namespace llvm {
-class AMDGPUTargetMachine;
class FunctionPass;
class GCNTargetMachine;
class ImmutablePass;
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
index b29c94180fb8..9eaad39f985b 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
@@ -25,6 +25,7 @@
namespace llvm {
class AMDGPUTargetLowering;
+class AMDGPUTargetMachine;
class GCNSubtarget;
class InstCombiner;
class Loop;
More information about the llvm-commits
mailing list