arsenm closed this revision.
arsenm added a comment.
r315094
Comment at: test/CodeGenOpenCL/convergent.cl:130
+// CHECK: attributes #0 = { noinline norecurse nounwind "
+// CHECK: attributes #1 = { {{[^}]*}}convergent{{[^}]*}} }
+// CHECK: attributes #2 = { {{[^}]*}}convergent{
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM!
https://reviews.llvm.org/D38113
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinf
arsenm updated this revision to Diff 117855.
arsenm added a comment.
Check noduplicate
https://reviews.llvm.org/D38113
Files:
include/clang/Basic/LangOptions.h
lib/CodeGen/CGCall.cpp
test/CodeGenOpenCL/amdgpu-attrs.cl
test/CodeGenOpenCL/convergent.cl
Index: test/CodeGenOpenCL/convergen
hfinkel added a comment.
In https://reviews.llvm.org/D38113#882187, @Anastasia wrote:
> In https://reviews.llvm.org/D38113#878840, @jlebar wrote:
>
> >
>
...
> Yes, I see this sounds more reasonable indeed. Btw, currently LLVM can remove
> `convergent` in some cases to recover the performance
Anastasia added a comment.
In https://reviews.llvm.org/D38113#878840, @jlebar wrote:
> > Yes, that's why if it would be responsibility of the kernel developer to
> > specify this explicitly we could avoid this complications in the compiler.
> > But if we add it into the language now we still ne
Anastasia added a comment.
In https://reviews.llvm.org/D38113#878852, @hfinkel wrote:
> In https://reviews.llvm.org/D38113#877874, @Anastasia wrote:
>
> > The problem of adding this attribute conservatively for all functions is
> > that it prevents some optimizations to happen. I agree to commit
yaxunl added a comment.
Do we need an option to disable this? In case it causes regression in some
applications and users want to disable it. At least for debugging.
Comment at: test/CodeGenOpenCL/convergent.cl:73
// CHECK: %[[tobool_pr:.+]] = phi i1 [ true, %[[if_then]] ],
hfinkel added a comment.
In https://reviews.llvm.org/D38113#877874, @Anastasia wrote:
> The problem of adding this attribute conservatively for all functions is that
> it prevents some optimizations to happen. I agree to commit this as a
> temporary fix to guarantee correctness of generated cod
jlebar added a comment.
> Yes, that's why if it would be responsibility of the kernel developer to
> specify this explicitly we could avoid this complications in the compiler.
> But if we add it into the language now we still need to support the
> correctness for the code written with the earli
Anastasia added inline comments.
Comment at: test/CodeGenOpenCL/convergent.cl:130
+// CHECK: attributes #0 = { noinline norecurse nounwind "
+// CHECK: attributes #1 = { {{[^}]*}}convergent{{[^}]*}} }
+// CHECK: attributes #2 = { {{[^}]*}}convergent{{[^}]*}} }
We
Anastasia added a comment.
In https://reviews.llvm.org/D38113#877906, @jlebar wrote:
> > The problem of adding this attribute conservatively for all functions is
> > that it prevents some optimizations to happen.
>
> function-attrs removes the convergent attribute from anything it can prove
> d
jlebar added a comment.
> The problem of adding this attribute conservatively for all functions is that
> it prevents some optimizations to happen.
function-attrs removes the convergent attribute from anything it can prove does
not call a convergent function.
I agree this is a nonoptimal solut
Anastasia added a comment.
The problem of adding this attribute conservatively for all functions is that
it prevents some optimizations to happen. I agree to commit this as a temporary
fix to guarantee correctness of generated code. But if we ask to add the
`convergent` attribute into the spec
arsenm updated this revision to Diff 116125.
arsenm added a comment.
Herald added a subscriber: nhaehnle.
Missed test update
https://reviews.llvm.org/D38113
Files:
include/clang/Basic/LangOptions.h
lib/CodeGen/CGCall.cpp
test/CodeGenOpenCL/amdgpu-attrs.cl
test/CodeGenOpenCL/convergent.c
jlebar added a comment.
LGTM for the changes other than the test (I don't read opencl).
https://reviews.llvm.org/D38113
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
arsenm created this revision.
Herald added a subscriber: wdng.
This was done for CUDA functions in r261779, and for the same
reason this also needs to be done for OpenCL. An arbitrary
function could have a barrier() call in it, which in turn
requires the calling function to be convergent.
https:
16 matches
Mail list logo