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