[PATCH] Partially revert r210444 due to performance regression
Jingyue Wu
jingyue at google.com
Wed Jul 16 11:52:37 PDT 2014
Hi meheff, eliben,
Converting outermost zext(a) to sext(a) causes worse code when the
computation of zext(a) could be reused. For example, after converting
... = array[zext(a)]
... = array[zext(a) + 1]
to
... = array[sext(a)]
... = array[zext(a) + 1],
the program computes sext(a), which is actually unnecessary. I added one
test in split-gep-and-gvn.ll to illustrate this scenario.
Also, with r211281 and r211084, we annotate more "nuw" tags to
computation involving CUDA intrinsics such as threadIdx.x. These
annotations help with splitting GEP a lot, rendering the benefit we get
from this reverted optimization only marginal.
http://reviews.llvm.org/D4542
Files:
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep-and-gvn.ll
test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4542.11519.patch
Type: text/x-patch
Size: 9167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140716/7b974bf6/attachment.bin>
More information about the llvm-commits
mailing list