[PATCH] D21183: Better selection of common base address in constant hoisting
Sjoerd Meijer via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 9 07:36:25 PDT 2016
SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: jmolloy, mcrosier, ributzka.
SjoerdMeijer added a subscriber: llvm-commits.
Herald added a subscriber: aemerson.
This implements a more optimal algorithm for selecting a base constant in constant hoisting. It not only takes into account the number of uses of constants, but now also the resulting integer range of the offsets. Thus, the algorithm maximizes the number of uses within an integer range that will enable more efficient code generation. On ARM, for example, this will enable code size optimisations because less negative offsets will be created. Negative offsets/immediates are not supported by Thumb1 thus preventing more compact instruction encoding.
http://reviews.llvm.org/D21183
Files:
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Analysis/TargetTransformInfoImpl.h
lib/Analysis/TargetTransformInfo.cpp
lib/Target/ARM/ARMTargetTransformInfo.cpp
lib/Target/ARM/ARMTargetTransformInfo.h
lib/Transforms/Scalar/ConstantHoisting.cpp
test/Transforms/ConstantHoisting/ARM/const-addr-no-neg-offset.ll
test/Transforms/ConstantHoisting/PowerPC/masks.ll
test/Transforms/ConstantHoisting/X86/phi.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21183.60170.patch
Type: text/x-patch
Size: 15863 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160609/a699a116/attachment.bin>
More information about the llvm-commits
mailing list