[PATCH] D78376: [SCCP] Use range imposed by condition as upper bound for widening.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 17 09:09:53 PDT 2020
fhahn created this revision.
fhahn added reviewers: efriedma, mssimpso, davide.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
In some cases we can do better than going to overdefined when widening.
The range imposed by a condition for example provides an upper bound on
the range of a value. Instead of widening to overdefined we can widen to
that range.
We have to ensure that the upper bound contains the merge result,
otherwise the merge step would not be monotone any longer.
This improves the number of instructions removed for some programs
Tests: 237
Same hash: 219 (filtered out)
Remaining: 18
Metric: sccp.IPNumInstRemoved
Program base p1 diff
test-suite...ks/Prolangs-C/agrep/agrep.test 40.00 57.00 42.5%
test-suite...cations/hexxagon/hexxagon.test 30.00 36.00 20.0%
test-suite...langs-C/football/football.test 85.00 96.00 12.9%
test-suite...rks/FreeBench/pifft/pifft.test 26.00 28.00 7.7%
test-suite...CFP2000/188.ammp/188.ammp.test 67.00 71.00 6.0%
test-suite...000/197.parser/197.parser.test 59.00 61.00 3.4%
test-suite.../CINT2000/254.gap/254.gap.test 158.00 162.00 2.5%
test-suite...pplications/treecc/treecc.test 66.00 67.00 1.5%
test-suite...TimberWolfMC/timberwolfmc.test 67.00 68.00 1.5%
test-suite...CFP2000/177.mesa/177.mesa.test 202.00 204.00 1.0%
test-suite...lications/ClamAV/clamscan.test 902.00 910.00 0.9%
test-suite...6/482.sphinx3/482.sphinx3.test 137.00 138.00 0.7%
test-suite.../CINT2000/176.gcc/176.gcc.test 1118.00 1123.00 0.4%
test-suite.../CINT2006/403.gcc/403.gcc.test 3831.00 3847.00 0.4%
test-suite.../Benchmarks/Bullet/bullet.test 320.00 321.00 0.3%
test-suite...000/255.vortex/255.vortex.test 3805.00 3809.00 0.1%
test-suite...:: External/Povray/povray.test 1537.00 1538.00 0.1%
test-suite...006/453.povray/453.povray.test 1772.00 1773.00 0.1%
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78376
Files:
llvm/include/llvm/Analysis/ValueLattice.h
llvm/lib/Transforms/Scalar/SCCP.cpp
llvm/test/Transforms/SCCP/widening.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78376.258342.patch
Type: text/x-patch
Size: 7629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200417/51c25db6/attachment.bin>
More information about the llvm-commits
mailing list