[PATCH] D38085: Use the basic cost if a GEP is not used as addressing mode
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 20 08:58:40 PDT 2017
junbuml created this revision.
Herald added a subscriber: javed.absar.
Currently, getGEPCost() returns TCC_FREE whenever a GEP is a legal addressing mode in the target.
However, since it doesn't check its actual users, it will return FREE even in cases
where the GEP cannot be folded away as a part of actual addressing mode.
For example, if an user of the GEP is a call instruction taking the GEP as a parameter,
then the GEP may not be folded in isel.
https://reviews.llvm.org/D38085
Files:
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Analysis/TargetTransformInfoImpl.h
include/llvm/CodeGen/BasicTTIImpl.h
lib/Analysis/TargetTransformInfo.cpp
lib/Transforms/Scalar/NaryReassociate.cpp
lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
test/Analysis/CostModel/AArch64/gep.ll
test/Analysis/CostModel/X86/vector_gep.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38085.116005.patch
Type: text/x-patch
Size: 9876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170920/273b082f/attachment.bin>
More information about the llvm-commits
mailing list