[cfe-commits] [PATCH] Invariants (and Assume Aligned) - Clang

hfinkel at anl.gov hfinkel at anl.gov
Wed Dec 5 16:14:26 PST 2012


  ----- Original Message -----
  > From: "Dmitri Gribenko" <gribozavr at gmail.com>
  > To: hfinkel at anl.gov
  > Cc: gribozavr at gmail.com, cfe-commits at cs.uiuc.edu, chandlerc at gmail.com
  > Sent: Wednesday, December 5, 2012 5:57:58 PM
  > Subject: Re: [PATCH] Invariants (and Assume Aligned) - Clang
  >
  >
  >   I don't have more comments, so this looks good to me, but please
  >   wait for another review.

  Thanks! I will do (this also depends on the LLVM patch(es); and those would need to go in first).

   -Hal

  >
  >
  > ================
  > 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
  >

http://llvm-reviews.chandlerc.com/D149



More information about the cfe-commits mailing list