[PATCH] D30059: Refactor InlinCost.cpp in preparation for estimated speedup heuristic.

Easwaran Raman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 17:27:43 PST 2017


eraman created this revision.

This includes the following refactoring that is useful for a subsequent patch that adds a new inlining heuristic:

- Factor out the code in instruction visitors that checks if an instruction evaluates to a constant.
- Add a method to accumulate the cost of inlining.
- Make isGEPOffsetConstant (which is called once) into a lambda.
- Move a block of code in visitSwitchInst to a lambda.

Some of these may not make much sense standalone, but are useful for the subsequent patch (to be posted shortly)


https://reviews.llvm.org/D30059

Files:
  lib/Analysis/InlineCost.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30059.88809.patch
Type: text/x-patch
Size: 16586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170217/0f5d69a3/attachment.bin>


More information about the llvm-commits mailing list