[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

Pierre van Houtryve via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 15 00:00:15 PST 2024


================
@@ -167,6 +167,10 @@ def FeatureCuMode : SubtargetFeature<"cumode",
   "Enable CU wavefront execution mode"
 >;
 
+def FeaturePreciseMemory
----------------
Pierre-vh wrote:

I think you just need to add something like this in `AMDGPU.cpp` in `getAMDGPUTargetFeatures`
```
  if (Args.hasFlag(options::OPT_mamdgpu_precise_memory_op,
                   options::OPT_mno_amdgpu_precise_memory_op false))
    Features.push_back("+precise-memory");
````
It should claim the arguments from the driver and `handleTargetFeaturesGroup` will not see them. 

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


More information about the cfe-commits mailing list