[clang] [llvm] [AMDGPU] Refactor insertWaveSizeFeature (PR #154850)

Yaxun Liu via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 25 21:16:32 PDT 2025


================
@@ -197,7 +197,7 @@ bool AMDGPUTargetInfo::initFeatureMap(
     const std::vector<std::string> &FeatureVec) const {
 
   using namespace llvm::AMDGPU;
-  fillAMDGPUFeatureMap(CPU, getTriple(), Features);
+
----------------
yxsamliu wrote:

I am a bit concerned moving fillAMDGPUFeatureMap from here to insertWaveSizeFeature. Since we are supposed to initialize the feature map with the target defaults, then override them with command line options.

How about we keep fillAMDGPUFeatureMap here and make a copy of default target features and pass it to insertWaveSizeFeature as an extra argument. In insertWaveSizeFeature, we only use the default target feature for checking target support of wave32/64.

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


More information about the llvm-commits mailing list