[PATCH] D36656: [SCCP] Propagate integer range information in IPSCCP (WIP).

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 20 11:16:19 PDT 2017


fhahn updated this revision to Diff 111895.
fhahn added a comment.

Updated the patch to use LVILatticeValue (which I moved to a separate header file for now, I'd move it out in a separate patch if we decide to use it) for tracking function parameter values and updated tryToReplaceWithConstant to use range information to removed ICmp instructions.

I think it makes sense to use LVILatticeValue for parameters, as it already contains most of the functionality needed

This patch only uses constant ranges for function parameters. This is good enough to fix PR33253, but I think using constant range for all values in the solver would make it more useful for real programs.


https://reviews.llvm.org/D36656

Files:
  include/llvm/Analysis/ValueLattice.h
  include/llvm/IR/ConstantRange.h
  lib/IR/ConstantRange.cpp
  lib/Transforms/Scalar/SCCP.cpp
  test/Transforms/SCCP/ip-constan-ranges.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36656.111895.patch
Type: text/x-patch
Size: 16925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170820/fd5c5343/attachment.bin>


More information about the llvm-commits mailing list