Recommit "[InlineCost] Use TTI to check if GEP is free." #2
authorHaicheng Wu <haicheng@codeaurora.org>
Fri, 20 Jan 2017 16:36:34 +0000 (16:36 +0000)
committerHaicheng Wu <haicheng@codeaurora.org>
Fri, 20 Jan 2017 16:36:34 +0000 (16:36 +0000)
commit8f34ae2aae4025d041d5358f00affecd92aa8cae
treeee9aeb14cfbad2edb9c3c632c7dfd35c8549ff56
parent56fb6fef50070d92d3137bcf912580f607e465b8
Recommit "[InlineCost] Use TTI to check if GEP is free." #2

This is the second attemp to recommit r292526.

The original summary:

Currently, a GEP is considered free only if its indices are all constant.
TTI::getGEPCost() can give target-specific more accurate analysis. TTI is
already used for the cost of many other instructions.

llvm-svn: 292616
llvm/lib/Analysis/InlineCost.cpp
llvm/test/Transforms/Inline/gep-cost.ll [new file with mode: 0644]