[PATCH] D13543: [LVI/CVP] Teach LVI about range metadata

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 22:23:44 PDT 2015


If folks are uncomfortable with the CVP change, I could restructure it 
to only try to simplify icmps feeding return instructions.  That should 
trigger far less often, still be useable for writing tests, and get most 
of the actual performance benefit.  I'll probably stick with the current 
change if no one objects; just throwing out the alternative for discussion.

Philip

On 10/07/2015 07:36 PM, Philip Reames wrote:
> reames created this revision.
> reames added reviewers: hfinkel, chenli, sanjoy.
> reames added a subscriber: llvm-commits.
>
> Somewhat shockingly for an analysis pass which is computing constant ranges, LVI did not understand the ranges provided by range metadata.
>
> As part of this change, I included a change to CVP primarily because doing so made it much easier to write small self contained test cases.  CVP was previously only handling the non-local operand case, but given that LVI can sometimes figure out information about instructions standalone, I don't see any reason to restrict this.
>
> Note that this patch continues a somewhat bad practice in LVI.  In many cases, we know facts about values, and separate context sensitive facts about values.  LVI makes no effort to distinguish and will frequently cache the same value fact repeatedly for different contexts. I would like to change this, but that's a large enough change that I want it to go in separately with clear documentation of what's changing.  Other examples of this include the non-null handling, and arguments.
>
> As a meta comment: the entire motivation of this change was being able to write smaller (aka reasonable sized) test cases for a future patch teaching LVI about select instructions.
>
>
>
> http://reviews.llvm.org/D13543
>
> Files:
>    lib/Analysis/LazyValueInfo.cpp
>    lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
>    test/Transforms/CorrelatedValuePropagation/range.ll
>



More information about the llvm-commits mailing list