[Mlir-commits] [clang] [flang] [llvm] [mlir] [NFC][AMDGPU] Move AMDGPU related code out of generic TargetParser.cpp (PR #198433)

Shilei Tian llvmlistbot at llvm.org
Tue May 19 13:01:30 PDT 2026


================
@@ -17,6 +17,7 @@
 #include "clang/Basic/MacroBuilder.h"
 #include "clang/Basic/TargetBuiltins.h"
 #include "llvm/ADT/SmallString.h"
+#include "llvm/TargetParser/AMDGPUTargetParser.h"
----------------
shiltian wrote:

Right, but my understanding is that the best practice is to include the headers we actually need instead of relying on transitive includes from other headers, since those headers might later stop including the ones we depend on.

That probably won't happen with `AMDGPU.h`, since it's basically a giant all-in-one header included by almost every AMDGPU source file, but IMHO that's not really a good thing.

https://github.com/llvm/llvm-project/pull/198433


More information about the Mlir-commits mailing list