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

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 19:36:53 PDT 2015


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13543.36820.patch
Type: text/x-patch
Size: 5583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151008/24c464f6/attachment.bin>


More information about the llvm-commits mailing list