[cfe-commits] [PATCH] Invariants (and Assume Aligned) - Clang
Dmitri Gribenko
gribozavr at gmail.com
Wed Dec 5 15:57:58 PST 2012
I don't have more comments, so this looks good to me, but please wait for another review.
================
Comment at: docs/LanguageExtensions.html:1409-1412
@@ +1408,6 @@
+
+<p>The boolean argument to this function is defined to be true. The optimizer
+may analyze the expression used to compute the argument and deduce from that
+analysis information used to optimize the program.
+</p>
+
----------------
Same comment as for LLVM intrinsic:
What about adding explicitly: "If the condition does not hold during execution, the behavior is undefined"?
================
Comment at: docs/LanguageExtensions.html:1400
@@ +1399,3 @@
+
+ if (x == 0) // he optimizer may short-circuit this check using the invariant.
+ return do_something();
----------------
typo: he -> the
http://llvm-reviews.chandlerc.com/D149
More information about the cfe-commits
mailing list