[llvm-commits] PATCH: Refactoring and simplification of inline cost computation w.r.t. alloca arguments

Chandler Carruth chandlerc at gmail.com
Wed Mar 7 05:38:46 PST 2012


Hello,

The first patch is a pure refactoring designed to ease the upcoming work
I'm doing on responding to paired alloca arguments to functions in the
inline cost assessment. It also (IMO) make the code more cohesive as the
counting is entirely specific to the function info the cost analyzer is
tracking.


The second patch is a requested change / refactoring from Nick. When
talking with him, he indicated that his comments about the handling of icmp
instructions in inline cost counting were wrong, and that we should in fact
be accounting for all of the icmp reductions regardless of whether SROA
would fire for an alloca pointer in that argument. This patch factors all
of this logic out into separate functions with clear names, and changes the
logic to eagerly compute reductions for icmp instructions, and to ensure we
look at all icmp instructions in the function even if SROA is not viable.

This last patch I'm a bit hesitant about. I don't have any test cases for
it, and during my changes I made several typos and bugs that didn't
actually cause any tests to fail. I feel like the testing here is... rather
lighter than it should be. I don't want to commit this one without test
cases, can anyone provide some?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120307/6a1b066c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Rotate-two-of-the-functions-used-to-count-bonuses-fo.patch
Type: text/x-patch
Size: 6305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120307/6a1b066c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Undo-a-previous-restriction-on-the-inline-cost-calcu.patch
Type: text/x-patch
Size: 12131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120307/6a1b066c/attachment-0001.bin>


More information about the llvm-commits mailing list