asbirlea added a comment.

I think that expanding the patch description will help motivate this and 
clarify the use-cases for which this is useful, and how it differentiates from 
`noinline`.
Perhaps include that the attribute aims to avoid merging identical calls so as 
to keep the separate debug-information for those calls, and that there is an 
asan usecase where having this attribute would be beneficial to avoid 
alternative work-arounds.
If you have a link to the feature request for this, include that in the 
description as well, or include the motivation behind it.

Note there are other LLVM passes (beside SimplifyCFG) that may need to check 
for this argument to prevent optimizations (e.g. LICM does instruction 
sinking/hoising, add check ~LICM.cpp:1092?).

Include a comment in the `clang/test/CodeGen/attr-nomerge.c` test on the 
expected outcome of the test. Something like:
"The attribute no-merge prevents the 3 bar() calls from being merged into one 
inside foo. Check that there are still 3 tail calls."


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

https://reviews.llvm.org/D78659



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to