[PATCH] D45319: [Atomics] warn about misaligned atomic accesses using libcalls

2018-09-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
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

[PATCH] D45319: [Atomics] warn about misaligned atomic accesses using libcalls

2018-04-23 Thread Tim Northover via Phabricator via cfe-commits
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

[PATCH] D45319: [Atomics] warn about misaligned atomic accesses using libcalls

2018-04-23 Thread Tim Northover via Phabricator via cfe-commits
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

[PATCH] D45319: [Atomics] warn about misaligned atomic accesses using libcalls

2018-04-19 Thread Saleem Abdulrasool via Phabricator via cfe-commits
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

[PATCH] D45319: [Atomics] warn about misaligned atomic accesses using libcalls

2018-04-19 Thread Tim Northover via Phabricator via cfe-commits
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

[PATCH] D45319: [Atomics] warn about misaligned atomic accesses using libcalls

2018-04-14 Thread Saleem Abdulrasool via Phabricator via cfe-commits
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(),

[PATCH] D45319: [Atomics] warn about misaligned atomic accesses using libcalls

2018-04-13 Thread Tim Northover via Phabricator via cfe-commits
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

[PATCH] D45319: [Atomics] warn about misaligned atomic accesses using libcalls

2018-04-05 Thread Tim Northover via Phabricator via 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