[PATCH] D50200: AMDGPU: Handle "uniform-work-group-size" attribute
Aakanksha Patil via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 09:26:47 PST 2018
aakanksha555 added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp:338
for (CallGraphNode *I : SCC) {
- Function *F = I->getFunction();
+ // Build a list of CallGraphNodes that is sorted by the number of uses
+ if (I->getNumReferences())
----------------
arsenm wrote:
> Comment is misleading since you aren't really sorting it. Also still not clear why the number of uses matter. Is it just to find unused functions?
I didn't need to explicitly sort it as push_back is doing it for me. The result is a list ranging from the most number of uses to the least.
The uses help to identify Callers and the Callees. For eg. kernel functions which are only calling other functions have just one use.
And that is where we need to start the attribute propagation from. This ensures that attributes get propagated through nested function calls.
https://reviews.llvm.org/D50200
More information about the llvm-commits
mailing list