[PATCH] [TTI/CostModel] improve TTI::getGEPCost and use it in CostModel::getInstructionCost
Jingyue Wu
jingyue at google.com
Sun Jun 7 22:32:05 PDT 2015
Some changes
1. strip pointer casts before checking whether Ptr is a GlobalValue
2. support Ptr == nullptr
3. getGEPCost still takes ArrayRef<const Value *> as operands
4. in the direction of supporting opaque pointer types, getGEPCost takes the source pointer element type as a parameter.
5. fixed partial.ll. With the new getGEPCost, the loop size in @test1 is 13 and thus the loop can be partially unrolled. Added extra instructions so that the loop size remains 16.
http://reviews.llvm.org/D9819
Files:
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Analysis/TargetTransformInfoImpl.h
lib/Analysis/CostModel.cpp
lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
test/Analysis/CostModel/ARM/gep.ll
test/Analysis/CostModel/no_info.ll
test/Transforms/LoopUnroll/X86/partial.ll
test/Transforms/LoopVectorize/X86/metadata-enable.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9819.27278.patch
Type: text/x-patch
Size: 17675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150608/8a34b18b/attachment.bin>
More information about the llvm-commits
mailing list