This is an archive of the discontinued LLVM Phabricator instance.

[CVP] Handle calls with void return value. No need to create CVPLattice state for it.
ClosedPublic

Authored by trentxintong on Jul 9 2018, 7:33 AM.

Details

Summary

Tests: 10
Metric: compile_time

Program unpatch-result patch-result diff

Bullet/bullet 32.39 30.54 -5.7%
SPASS/SPASS 18.14 17.25 -4.9%
mafft/pairlocalalign 12.10 11.64 -3.8%
ClamAV/clamscan 19.21 19.63 2.2%
7zip/7zip-benchmark 49.55 48.85 -1.4%
kimwitu++/kc 15.68 15.87 1.2%
lencod/lencod 21.13 21.34 1.0%
consumer-typeset/consumer-typeset 13.65 13.62 -0.2%
tramp3d-v4/tramp3d-v4 29.88 29.92 0.1%
sqlite3/sqlite3 18.48 18.46 -0.1%

unpatch-result  patch-result       diff

count 10.000000 10.000000 10.000000
mean 23.022000 22.712400 -0.011671
std 11.362831 11.094183 0.027338
min 12.104000 11.640000 -0.057298
25% 16.299000 16.214000 -0.032282
50% 18.844000 19.048000 -0.001350
75% 27.689000 27.774000 0.007752
max 49.552000 48.852000 0.021861

I also tested only this pass by concatenating all the code from the
llvm/lib/Analysis/ folder and do clang -g followed by opt. I get close to 20% speedup
for the pass. I expect a majority of the gain come from skipping the dbg intrinsics.

Before patch (opt -time-passes -called-value-propagation):

-------------------------------------------------------------------------

... Pass execution timing report ...

Total Execution Time: 3.8303 seconds (3.8279 wall clock)

---User Time--- --System Time-- --User+System-- ---Wall Time--- ---
Name ---
2.0768 ( 57.3%) 0.0990 ( 48.0%) 2.1757 ( 56.8%) 2.1757 ( 56.8%) Bitcode
Writer
0.8444 ( 23.3%) 0.0600 ( 29.1%) 0.9044 ( 23.6%) 0.9044 ( 23.6%) Called
Value Propagation
0.7031 ( 19.4%) 0.0472 ( 22.9%) 0.7502 ( 19.6%) 0.7478 ( 19.5%) Module
Verifier
3.6242 (100.0%) 0.2062 (100.0%) 3.8303 (100.0%) 3.8279 (100.0%) Total

After patch (opt -time-passes -called-value-propagation):

-------------------------------------------------------------------------

... Pass execution timing report ...

Total Execution Time: 3.6605 seconds (3.6579 wall clock)

---User Time--- --System Time-- --User+System-- ---Wall Time--- ---
Name ---
2.0716 ( 59.7%) 0.0990 ( 52.5%) 2.1705 ( 59.3%) 2.1706 ( 59.3%) Bitcode
Writer
0.7144 ( 20.6%) 0.0300 ( 15.9%) 0.7444 ( 20.3%) 0.7444 ( 20.4%) Called
Value Propagation
0.6859 ( 19.8%) 0.0596 ( 31.6%) 0.7455 ( 20.4%) 0.7429 ( 20.3%) Module
Verifier
3.4719 (100.0%) 0.1886 (100.0%) 3.6605 (100.0%) 3.6579 (100.0%) Total

Diff Detail

Repository
rL LLVM

Event Timeline

trentxintong created this revision.Jul 9 2018, 7:33 AM
davide accepted this revision.Jul 9 2018, 7:53 AM
davide added inline comments.
lib/Transforms/IPO/CalledValuePropagation.cpp
289–290 ↗(On Diff #154601)

Can you expand this comment a bit? Otherwise, lgtm.

This revision is now accepted and ready to land.Jul 9 2018, 7:53 AM
This revision was automatically updated to reflect the committed changes.