rsmith added a comment.
Herald added a subscriber: jfb.
There's still something wrong here: in the cases where we produce these
warnings, we still produce calls to `__atomic_*_` library functions. Those
functions are specified to only work on properly-aligned inputs, so that's
wrong. And there
t.p.northover closed this revision.
t.p.northover added a comment.
Ah, I see you approved it before, presumably with the suggested changes. I've
committed as r330566.
Repository:
rC Clang
https://reviews.llvm.org/D45319
___
cfe-commits mailing
t.p.northover updated this revision to Diff 143506.
t.p.northover added a comment.
Moved diagnostic emission next to where the decision is made.
Repository:
rC Clang
https://reviews.llvm.org/D45319
Files:
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/CodeGen/CGAtomic.cpp
compnerd added inline comments.
Comment at: clang/lib/CodeGen/CGAtomic.cpp:883
if (UseLibcall) {
+CGM.getDiags().Report(E->getLocStart(), diag::warn_atomic_op_misaligned);
+
t.p.northover wrote:
> compnerd wrote:
> > It is kinda unfortunate that you need
t.p.northover added inline comments.
Comment at: clang/lib/CodeGen/CGAtomic.cpp:883
if (UseLibcall) {
+CGM.getDiags().Report(E->getLocStart(), diag::warn_atomic_op_misaligned);
+
compnerd wrote:
> It is kinda unfortunate that you need to look up 125 lines
compnerd accepted this revision.
compnerd added a comment.
This revision is now accepted and ready to land.
Sorry for the delay, didn't see the changes earlier.
Comment at: clang/lib/CodeGen/CGAtomic.cpp:883
if (UseLibcall) {
+CGM.getDiags().Report(E->getLocStart(),
t.p.northover added a comment.
Ping.
Repository:
rC Clang
https://reviews.llvm.org/D45319
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
t.p.northover created this revision.
t.p.northover added a reviewer: rsmith.
t.p.northover added a project: clang.
Herald added a subscriber: mcrosier.
If an atomic variable is misaligned Clang will emit accesses to it as a
libcall. These calls are likely to be slow and involve locks; they are