llvm.org GIT mirror llvm / 94bd029
[PerformanceTips] Italics are *word*, not _word_ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235827 91177308-0d34-0410-b5e6-96231b3b80d8 Philip Reames 4 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
141141 this guidance is that a unified return block with high in-degree is fine.
142142
143143 #. When checking a value against a constant, emit the check using a consistent
144 comparison type. The GVN pass _will_ optimize redundant equalities even if
144 comparison type. The GVN pass *will* optimize redundant equalities even if
145145 the type of comparison is inverted, but GVN only runs late in the pipeline.
146146 As a result, you may miss the opportunity to run other important
147147 optimizations. Improvements to EarlyCSE to remove this issue are tracked in
148148 Bug 23333.
149149
150 #. Avoid using arithmetic intrinsics unless you are _required_ by your source
150 #. Avoid using arithmetic intrinsics unless you are *required* by your source
151151 language specification to emit a particular code sequence. The optimizer
152152 is quite good at reasoning about general control flow and arithmetic, it is
153153 not anywhere near as strong at reasoning about the various intrinsics. If
154154 profitable for code generation purposes, the optimizer will likely form the
155 intrinsics itself late in the optimization pipeline. It is _very_ rarely
155 intrinsics itself late in the optimization pipeline. It is *very* rarely
156156 profitable to emit these directly in the language frontend. This item
157157 explicitly includes the use of the :ref:`overflow intrinsics `.
158158