Commits

Arnold Schwaighofer committed 24d4d9d904e
SimplifyCFG: Implement general jumpthreading using the SSAUpdater simplifyInstruction conciously does not create constants (AFAIK) so we need to run instruction combine after simplify-cfg to enable more cfg simplification exposed by jumpthreading. We can revisit this decision in a follow-up commit if necessary (I believe it to be useful for simplifyInstruction to be able to create constants and for simplifycfg to use simplifyInstruction on the branch condition). O: benchmark , baserun0 , optrun0 , delta, speedup Fibonacci , 1473.00 , 1317.00 , 75.00 , 5.8% Histogram , 407.00 , 390.00 , 23.00 , 6.1% InsertionSort , 1273.00 , 1200.00 , 79.00 , 6.7% Life , 74.00 , 69.00 , 4.00 , 5.8% NestedLoop , 937.00 , 883.00 , 56.00 , 6.4% R17315246 , 8.00 , 801.00 , 793.00 , -99.0% SelectionSort , 1150.00 , 921.00 , 226.00 , 24.5% Ounchecked: Histogram , 394.00 , 342.00 , 51.00 , 15.0% InsertionSort , 1122.00 , 1024.00 , 85.00 , 8.3% Life , 57.00 , 44.00 , 9.00 , 20.9% SelectionSort , 1312.00 , 1060.00 , 246.00 , 23.3% The R17315246 regression is somewhat bad. We dependent on a loop form such that LLVM transforms the loop into an inner loop that just iterates from x to y and this is unrolled (good version) the slow version has a loop with cond_fail control flow and is not unrolled. The loop does nothing more than count up. I have not being able to narrow this down further. rdar://16821595 Swift SVN r21124