summaryrefslogtreecommitdiffstats
path: root/llvm/docs/Frontend
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-04-26 22:23:12 +0000
committerPhilip Reames <listmail@philipreames.com>2015-04-26 22:23:12 +0000
commite0e9083068daeaadbea7a21a0dfa3fbaf7b2bf75 (patch)
treee273ee5210acb747069fba08aa0d243a74d8c615 /llvm/docs/Frontend
parent65f335980daeaa8d22899f303fef4565ec9da386 (diff)
downloadbcm5719-llvm-e0e9083068daeaadbea7a21a0dfa3fbaf7b2bf75.tar.gz
bcm5719-llvm-e0e9083068daeaadbea7a21a0dfa3fbaf7b2bf75.zip
[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. llvm-svn: 235826
Diffstat (limited to 'llvm/docs/Frontend')
-rw-r--r--llvm/docs/Frontend/PerformanceTips.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/docs/Frontend/PerformanceTips.rst b/llvm/docs/Frontend/PerformanceTips.rst
index 53ab11b430c..efc4d1c280f 100644
--- a/llvm/docs/Frontend/PerformanceTips.rst
+++ b/llvm/docs/Frontend/PerformanceTips.rst
@@ -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.
OpenPOWER on IntegriCloud