[PATCH] D51396: [Constant Hoisting] Hoisting Constant GEP Expressions
Z. Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 28 17:44:04 PDT 2018
zzheng created this revision.
zzheng added reviewers: efriedma, t.p.northover, javed.absar, wmi, SjoerdMeijer, mehdi_amini.
Leverage existing logic in constant hoisting pass so that constant gep expressions
sharing the same base global variable are transformed into the form of
[Base + Offset], where Base is a constant gep and Offset is an integer.
This transformation can effectively reduce constant pool entries in the backend.
Repository:
rL LLVM
https://reviews.llvm.org/D51396
Files:
include/llvm/Transforms/Scalar/ConstantHoisting.h
lib/Transforms/Scalar/ConstantHoisting.cpp
test/Transforms/ConstantHoisting/AArch64/const-hoist-gep.ll
test/Transforms/ConstantHoisting/ARM/const-hoist-gep.ll
test/Transforms/ConstantHoisting/ARM/same-offset-multi-types.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51396.162999.patch
Type: text/x-patch
Size: 26415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180829/3cd93aee/attachment.bin>
More information about the llvm-commits
mailing list