This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Make value simplify stronger
AbandonedPublic

Authored by jdoerfert on Oct 13 2019, 11:42 PM.

Details

Summary

NOTE: This patch will be split in pieces.
NOTE: This is still under testing on the test-suite and tests need to be

     updated after intermediate changes.

This patch makes value simplify stronger and consolidates features 
present in AAReturnedValuesImpl before. The new algorithm does not try
to find a single value which is "simplified" but instead collects all
potential values.

In addition, this patch adds simple constant folding and instruction
folding logic.

The reason for this patch was the Adobe-C++/loop_unroll.cpp benchmark in
the test suite. The compile time with the old implementation was bad. A
test case in the spirit of loop_unroll.cpp was added here.

TODO: Other AAs and Attributor routines could use AAValueSimplify when
      they look at values. Similar to the select folding now in
      genericValueTraversal.

Use update_test_checks for value_simplify.ll with the following patches
applied and function signature printing enabled: D68851, D68850, D68819

Diff Detail

Event Timeline

jdoerfert created this revision.Oct 13 2019, 11:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2019, 11:42 PM
jdoerfert edited the summary of this revision. (Show Details)Dec 8 2019, 10:02 PM
jdoerfert updated this revision to Diff 232757.Dec 8 2019, 10:04 PM
jdoerfert edited the summary of this revision. (Show Details)

The first version was broken, really broken. This actually passed all the test
suite test (and SPEC2006) when I did the eval for the LLVM-DEV. However, it
needs to be rebased properly and split.

Build result: FAILURE - Could not check out parent git hash "abffc7ed485859ac07ff447576b6e795f43a8e08". It was not found in the repository. Did you configure the "Parent Revision" in Phabricator properly? Trying to apply the patch to the master branch instead...

ERROR: arc patch failed with error code 1. Check build log for details.
Log files: console-log.txt, CMakeCache.txt

jdoerfert abandoned this revision.Aug 29 2020, 2:22 PM

Interesting ideas will be picked up, this code is dead though.