[PATCH] D101534: [AMDGPU] Do not annotate features for graphics

Madhur Amilkanthwar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 29 09:25:31 PDT 2021


madhur13490 added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp:407
     // Add feature attributes
-    if (!F || F->isDeclaration())
+    if (!F || F->isDeclaration() || AMDGPU::isGraphics(F->getCallingConv()))
       continue;
----------------
Please put a comment about why you "continue" when particular CC is met.


================
Comment at: llvm/test/CodeGen/AMDGPU/pal-simple-indirect-call.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: opt -S -mtriple=amdgcn-amd-amdpal -amdgpu-annotate-kernel-features  %s | FileCheck -check-prefix=GCN %s
+; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 < %s | FileCheck -check-prefix=GFX9 %s
----------------
sebastian-ne wrote:
> arsenm wrote:
> > The IR checks look missing except for the label
> This test is copied from `simple-indirect-call.ll` (it can’t be in the same file because amdhsa does not allow amdgpu_cs functions). The one check line still checks that there are no attributes added, but I can just remove the opt test if that is not worth it.
Since this patch makes changes in the pass, I think `opt` check is required. `llc` line from `simple-indirect-call.ll` made sure that the test compiles fine. It's up to you if you want the similar assurance.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101534/new/

https://reviews.llvm.org/D101534



More information about the llvm-commits mailing list