[PATCH] D56274: [OPENMP][NVPTX]Fix incompatibility of __syncthreads with LLVM, NFC.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 28 08:14:33 PDT 2019


arsenm added a comment.

In D56274#1519176 <https://reviews.llvm.org/D56274#1519176>, @ABataev wrote:

> In D56274#1519039 <https://reviews.llvm.org/D56274#1519039>, @arsenm wrote:
>
> > In D56274#1517067 <https://reviews.llvm.org/D56274#1517067>, @arsenm wrote:
> >
> > > Is OpenMP not marking all functions as convergent?
> >
> >
> > ping
>
>
> Marks,but some of the optimizations ignore this attribute. I don't remebet which one exactly, something like critical edge splitting.


I think critical edge splitting handles convergent correctly, since it is one of the motivating examples. I just looked at a random example in test/OpenMP,  and this doesn't look correct to me:

__kmpc_barrier is declared as convergent, but the callers are not:

  declare void @__kmpc_barrier(%struct.ident_t*, i32) #3
  define internal void @__omp_outlined__78(i32* noalias %.global_tid., i32* noalias %.bound_tid.) #0 {
  attributes #0 = { noinline norecurse nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+ptx32,+sm_20" "unsafe-fp-math"="false" "use-soft-float"="false" }
  attributes #1 = { nounwind readnone }
  attributes #2 = { argmemonly nounwind }

*All* functions need to be assumed convergent, not just the convergent barrier leafs.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D56274





More information about the llvm-commits mailing list