Recommit "[InlineCost] Use TTI to check if GEP is free."
authorHaicheng Wu <haicheng@codeaurora.org>
Fri, 20 Jan 2017 03:09:11 +0000 (03:09 +0000)
committerHaicheng Wu <haicheng@codeaurora.org>
Fri, 20 Jan 2017 03:09:11 +0000 (03:09 +0000)
commit1af1f071ea36208afd806ecb0205525fa5bd8225
tree766878187825a430fbd0b192f4251b2606b41742
parentf002264d499ec9b6c69ac1cdfa9b9bd783ad63c6
Recommit "[InlineCost] Use TTI to check if GEP is free."

This recommits r292526 which is reverted in r292529 after fixing the test case.

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: 292570
llvm/lib/Analysis/InlineCost.cpp
llvm/test/Transforms/Inline/gep-cost.ll [new file with mode: 0644]