Hello,<div><br></div><div>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.</div>
<div><br></div><div><br></div><div>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.</div>
<div><br></div><div>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?</div>