[PATCH] D105787: [WIP][AbstractAttributor] Fold function calls to `__kmpc_is_spmd_exec_mode` if possible
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 13 13:02:01 PDT 2021
jdoerfert added a comment.
Minor nits, basically good to go.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:3540-3543
+ SimplifiedValue = nullptr;
+ indicatePessimisticFixpoint();
+ return getState() == StateBefore ? ChangeStatus::UNCHANGED
+ : ChangeStatus::CHANGED;
----------------
Same below please.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:3571
+ : ChangeStatus::CHANGED;
+ }
+
----------------
Technically we could even try to stay with nullptr but not pessimistic fixppoint here.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:3593
+ }
+
+ return getState() == StateBefore ? ChangeStatus::UNCHANGED
----------------
Remove the empty conditionals above.
================
Comment at: llvm/test/Transforms/OpenMP/is_spmd_exec_mode_fold.ll:129
+ ret void
+}
+
----------------
Can we have a second is_generic helper like this:
```
define internal void @is_non_spmd_helper2() {
;
%isSPMD = call i8 @__kmpc_is_spmd_exec_mode()
%c = icmp eq i8 %isSPMD, 0
br i1 %c, label %t, label %f
t:
call void @foo()
ret void
f:
call void bar()
ret void
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105787/new/
https://reviews.llvm.org/D105787
More information about the llvm-commits
mailing list