[PATCH] D51431: [WIP][IPSCCP] Add lattice value for != constant and propagate nonnull.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 13:49:47 PDT 2018


fhahn added a comment.

In https://reviews.llvm.org/D51431#1217705, @xbolva00 wrote:

> Does this patch + https://reviews.llvm.org/D50039 optimizes following code?
>
> int l  = strlen(s);
>  if (!s) <-- remove this condition
>
>   return -1;
>
> return len;


I've put together another POC patch based on this one to optimize the code you mentioned: https://reviews.llvm.org/D51505. It's not really ready for being reviewed, but it should give an idea how we might be able to handle this. Do you have any motivating benchmarks/use cases for this in particular?


https://reviews.llvm.org/D51431





More information about the llvm-commits mailing list