[patch] Add more loop simplification passes to LTO
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Apr 14 09:16:49 PDT 2014
On 2014 Apr 10, at 13:25, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> On Apr 9, 2014, at 10:10, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
>
>> Some coworkers were trying LTO and noticed that not as many loops
>> where being optimized when a function was inlined in LTO instead of
>> during at regular build when the function was made inline.
>>
>> In the end, the problem was really simple, we are not running indvars
>> or -loop-deletion in lto. This patch then seems fairly analogous to
>> r202051.
>>
>> I haven't run the test-suite to benchmark this (I don't have in my
>> macbook air), but do you guys think this patch is reasonable? If so I
>> can benchmark and commit it when I get home (April 20th) if no one
>> beats me to it .
>>
>
> Nice find!
>
> I plan to benchmark this over the weekend... if someone gets to it
> first, let me know.
Gerolf volunteered offline to check results on ARM64, but in the
meantime I ran LNT --large with 5 sample points on x86-64 using
r206149 and -O3 -flto:
Performance Regressions - Execution Time:
Δ Previous Current σ Benchmark
3.79% 2.1767 2.2591 0.0052 MultiSource/Benchmarks/TSVC/InductionVariable-flt/InductionVariable-flt
3.74% 3.5570 3.6901 0.0084 SingleSource/Benchmarks/CoyoteBench/almabench
1.81% 16.0277 16.3184 0.0850 MultiSource/Applications/lua/lua
Performance Improvements - Execution Time:
Δ Previous Current σ Benchmark
-19.91% 0.4034 0.3231 0.0013 SingleSource/Benchmarks/Dhrystone/dry
-14.11% 0.8462 0.7268 0.0007 MultiSource/Benchmarks/Ptrdist/ks/ks
-7.51% 4.9761 4.6026 0.0060 MultiSource/Applications/hexxagon/hexxagon
-4.25% 1.6009 1.5328 0.0011 MultiSource/Benchmarks/TSVC/ControlLoops-flt/ControlLoops-flt
-3.49% 2.5562 2.4670 0.0019 MultiSource/Benchmarks/TSVC/Reductions-dbl/Reductions-dbl
-3.14% 2.1693 2.1011 0.0061 MultiSource/Benchmarks/TSVC/ControlLoops-dbl/ControlLoops-dbl
-1.88% 4.8174 4.7267 0.0051 MultiSource/Benchmarks/TSVC/Reductions-flt/Reductions-flt
-1.31% 0.8478 0.8367 0.0028 MultiSource/Benchmarks/TSVC/Equivalencing-flt/Equivalencing-flt
-1.29% 2.9246 2.8869 0.0052 MultiSource/Benchmarks/TSVC/ControlFlow-dbl/ControlFlow-dbl
-1.28% 2.9317 2.8941 0.0044 MultiSource/Benchmarks/sim/sim
-1.07% 1.2226 1.2095 0.0032 MultiSource/Applications/viterbi/viterbi
Results look good to me. If no one has any objections, I'll
commit Rafael's patch when I get a chance.
More information about the llvm-commits
mailing list