[PATCH] D94585: [IndirectFunctions] Skip propagating attributes to address taken functions
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 10:21:31 PST 2021
rampitec added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPropagateAttributes.cpp:242
+ if (F.hasAddressTaken()) {
+ if (!Roots.count(&F) && !NewRoots.count(&F)) {
+ NewRoots.insert(&F);
----------------
Just
```
if (!Roots.count(&F))
NewRoots.insert(&F);
```
NewRoots is a set.
================
Comment at: llvm/test/CodeGen/AMDGPU/propagate-attributes-common-callees.ll:11
+define float @common_callee.gc(i32 %a) {
+ %add = add i32 %a, 6
+ %mul = mul nsw i32 %add, 9
----------------
95% of the code can be removed, it is not needed for the test. Here and in other places. You only need empty functions and calls.
================
Comment at: llvm/test/CodeGen/AMDGPU/propagate-attributes-direct-indirect.ll:77
+
+attributes #0 = { "amdgpu-flat-work-group-size"="1,256" "target-features"="-wavefrontsize16,-wavefrontsize32,+wavefrontsize64,+xnack" }
+attributes #1 = { convergent norecurse nounwind mustprogress
----------------
It still can be cleaned. +xnack is not needed. Most of the stuff in #1 is not needed too. Here and in other places.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94585/new/
https://reviews.llvm.org/D94585
More information about the llvm-commits
mailing list