[llvm] r235826 - [PerformanceTips] Provide context on the impact of assume(x)

Sean Silva chisophugis at gmail.com
Mon Apr 27 13:39:05 PDT 2015


Thanks!

-- Sean Silva

On Sun, Apr 26, 2015 at 3:23 PM, Philip Reames <listmail at philipreames.com>
wrote:

> Author: reames
> Date: Sun Apr 26 17:23:12 2015
> New Revision: 235826
>
> URL: http://llvm.org/viewvc/llvm-project?rev=235826&view=rev
> Log:
> [PerformanceTips] Provide context on the impact of assume(x)
>
> Sean Silva suggested I add something here a while back.  Sorry it's taken
> so long to get back to this.
>
>
> Modified:
>     llvm/trunk/docs/Frontend/PerformanceTips.rst
>     llvm/trunk/docs/LangRef.rst
>
> Modified: llvm/trunk/docs/Frontend/PerformanceTips.rst
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/Frontend/PerformanceTips.rst?rev=235826&r1=235825&r2=235826&view=diff
>
> ==============================================================================
> --- llvm/trunk/docs/Frontend/PerformanceTips.rst (original)
> +++ llvm/trunk/docs/Frontend/PerformanceTips.rst Sun Apr 26 17:23:12 2015
> @@ -144,7 +144,7 @@ Other things to consider
>  #. When checking a value against a constant, emit the check using a
> consistent
>     comparison type.  The GVN pass _will_ optimize redundant equalities
> even if
>     the type of comparison is inverted, but GVN only runs late in the
> pipeline.
> -   As a result, you may miss the oppurtunity to run other important
> +   As a result, you may miss the opportunity to run other important
>     optimizations.  Improvements to EarlyCSE to remove this issue are
> tracked in
>     Bug 23333.
>
> @@ -157,6 +157,13 @@ Other things to consider
>     profitable to emit these directly in the language frontend.  This item
>     explicitly includes the use of the :ref:`overflow intrinsics
> <int_overflow>`.
>
> +#. Avoid using the :ref:`assume intrinsic <int_assume>` until you've
> +   established that a) there's no other way to express the given fact and
> b)
> +   that fact is critical for optimization purposes.  Assumes are a great
> +   prototyping mechanism, but they can have negative effects on both
> compile
> +   time and optimization effectiveness.  The former is fixable with enough
> +   effort, but the later is fairly fundamental to their designed purpose.
> +
>  p.s. If you want to help improve this document, patches expanding any of
> the
>  above items into standalone sections of their own with a more complete
>  discussion would be very welcome.
>
> Modified: llvm/trunk/docs/LangRef.rst
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=235826&r1=235825&r2=235826&view=diff
>
> ==============================================================================
> --- llvm/trunk/docs/LangRef.rst (original)
> +++ llvm/trunk/docs/LangRef.rst Sun Apr 26 17:23:12 2015
> @@ -10285,6 +10285,8 @@ Semantics:
>
>  This intrinsic is lowered to the ``val``.
>
> +.. _int_assume:
> +
>  '``llvm.assume``' Intrinsic
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150427/bc341854/attachment.html>


More information about the llvm-commits mailing list