[PATCH] CSE on GEP indices
Jingyue Wu
jingyue at google.com
Thu Apr 24 22:51:26 PDT 2014
all comments addressed. PTAL
ConstantOffsetExtractor::find now traces into two more operators: sext and zext. For safety, we only traces into sext/zext when its operand is guaranteed not to overflow. e.g., we can safely transform "sext (add nsw a, 5)" into "add nsw (sext a), 5".
Added a new unit test in split-gep.ll to test the above transformation.
Passed "make -C test".
http://reviews.llvm.org/D3462
Files:
include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
include/llvm/Transforms/Scalar.h
lib/Target/NVPTX/NVPTXTargetMachine.cpp
lib/Transforms/Scalar/Scalar.cpp
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
test/Transforms/SeparateConstOffsetFromGEP/NVPTX/lit.local.cfg
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: D3462.8831.patch
Type: text/x-patch
Size: 35271 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140425/d1c95606/attachment.bin>
More information about the llvm-commits
mailing list