This patch is to fix the compile time and memory consumption regression reported by Joerg. The regression is caused by my previous commit r215343.
In that commit, lowering lattice value 'overdefined' was introduced in LazyValueInfoCache::solveBlockValue, which is to expose more optimization opportunities to jump threading, but Joerg's new test case can expose regressions for this commit.
The solution in this patch is by introducing a threshold to control the count of lowering overdefined value. I tried Joerg's case, and got the following data with different threshold value,
Threshold UserTime MaxRSS
10 13.70 974664
100 13.44 974744
1000 13.73 974768
1500 13.74 974772
2000 14.05 974760
2500 14.93 1056600
5000 18.19 1220628
10000 22.43 1875788
Based on this data, I choose 1500 as threshold. I also checked SPEC2000/INT, and got the following data,
Threshold UserTime MaxRSS
10 129.60 71508
1500 130.45 71484
Review the patch, please!
Thanks,
-Jiangning
Typo. Maybe with the changes suggsted by Hal use just:
// Experimentally derived threshold for additional lowering lattice values per block