[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 8 00:20:16 PST 2022

jdoerfert added inline comments.

Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:566
+      return false;
+    };
You can use AAPointerInfo for the call site return IRPosition. It will (through the iterations) gather all accesses and put them into "bins" based on offset and size. It deals with uses in calls, etc. and if there is stuff missing it is better to add it in one place so we benefit throughout. 

Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:589
+    A.checkForAllCallLikeInstructions(CheckForHostcallAccess, *this,
+                                      UsedAssumedInformation);
Always check the return value, if it is false something went wrong and some calls might have been missed. Basically,
if (!A.check...)
  NeedsHostCallPtr = true;
then you also can just return false in the callback w/o setting it.

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list