[PATCH] D13088: [InlineCost] Adjust inlining cost for implicit null checks

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 17:36:24 PDT 2015


reames added a comment.

A a meta level, I feel this this patch is approaching the icmp part the wrong way.  Rather than trying to determine if a particular comparison is a implicit null check, we should check to see if a particular *branch* is likely implicit and if so, discount the cost of both the branch and the icmp.  I'm also not sure it's far to entirely discount the cost of both.  We can't from the IR guarantee that the check will actually be made implicit.

Also, can you add a bit of context to your description of the change?  I know what an implicit null check is, but not everyone will.

Chandler, since you're sure to have strong opinions, what do you feel is the right approach for framing this?


http://reviews.llvm.org/D13088





More information about the llvm-commits mailing list