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

Eric Christopher echristo at apple.com
Wed Mar 7 14:08:06 PST 2012


On Mar 7, 2012, at 5:38 AM, Chandler Carruth <chandlerc at gmail.com> wrote:

> 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.
> 

I like these two in general. I worry a bit about the lack of Science!(tm) to see how we're doing on code size or performance etc after. Have any numbers from the test suite?

> 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?

... only 2 patches were attached :)

-eric



More information about the llvm-commits mailing list