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

Jun Wang via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 12 14:58:30 PST 2024


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

As it is, we have a clang command-line option "-mamdgpu-precise-memory-op". When specified, "+amdgpu-precise-memory-op" would be passed to the backend as a target feature. So if the backend uses a different name for this feature, e.g., dropping the 'amdgpu' prefix as you suggested, the target feature passed by clang will be considered invalid and silently ignored.

In short, my understanding is that if the prefix is dropped in the backend (in `AMDGPU.td`), then the clang command-line option also has to drop it. If you know how to keep it in clang but drop it in the backend, pls let me know.


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


More information about the cfe-commits mailing list