Commits

Andrew Trick committed 8882999b637
Add Array semantic model. This unblocks work on bounds and mutable check hoisting. Pete is also tuning -O3 Array performance, which should be done on top of this patch. Overall, this significantly improves performance, but there is one issue that causes regressions on Hash and QuickSort at -O3 only. This patch does not cause the performance issue. It is already a serious problem that needs to be fixed. This patch just adds a level of benign function calls that further exposes the existing performance problem. We are independently working on fixing this: <rdar://problem/17634697> Array access forces retain/release of storage object for each inlined call. -O3 | benchmark | baserun0 | baserun1 | baserun2 | optrun0 | optrun1 | optrun2 | delta | speedup | | Dictionary | 1072.00 | 1087.00 | 1099.00 | 1060.00 | 1132.00 | 1172.00 | 12.00 | 1.1% | | EditDistance | 1602.00 | 1612.00 | 1611.00 | 1646.00 | 1652.00 | 1678.00 | 44.00 | -2.7% | | ForLoops | 1511.00 | 1506.00 | 1519.00 | 1519.00 | 1521.00 | 1614.00 | 13.00 | -0.9% | | Forest | 1245.00 | 1233.00 | 1252.00 | 1233.00 | 1248.00 | 1245.00 | 0.00 | 0.0% | | GlobalClass | 3624.00 | 3571.00 | 3569.00 | 3533.00 | 3540.00 | 3548.00 | 36.00 | 1.0% | | Hash | 1855.00 | 1760.00 | 1796.00 | 2085.00 | 2160.00 | 2075.00 | 315.00 | -15.2% | | Histogram | 1695.00 | 1714.00 | 1763.00 | 1802.00 | 1865.00 | 1987.00 | 107.00 | -5.9% | | LinkedList | 1584.00 | 1594.00 | 1587.00 | 1576.00 | 1598.00 | 1652.00 | 8.00 | 0.5% | | NBody | 700.00 | 698.00 | 691.00 | 480.00 | 479.00 | 484.00 | 212.00 | 44.3% | | Phonebook | 1886.00 | 1814.00 | 1849.00 | 1823.00 | 1801.00 | 1836.00 | 13.00 | 0.7% | | QuickSort | 248.00 | 245.00 | 237.00 | 265.00 | 287.00 | 291.00 | 28.00 | -10.6% | | R17315246 | 541.00 | 545.00 | 549.00 | 551.00 | 561.00 | 578.00 | 10.00 | -1.8% | | RC4 | 1664.00 | 1781.00 | 1776.00 | 953.00 | 961.00 | 974.00 | 711.00 | 74.6% | | Rectangles | 739.00 | 725.00 | 734.00 | 724.00 | 719.00 | 729.00 | 6.00 | 0.8% | | SmallPT | 1421.00 | 1429.00 | 1406.00 | 574.00 | 589.00 | 599.00 | 832.00 | 144.9% | | StringWalk | 651.00 | 647.00 | 653.00 | 645.00 | 633.00 | 673.00 | 14.00 | 2.2% | | Total | 26525.00 | 26445.00 | 26593.00 | 24908.00 | 25227.00 | 25793.00 | 1537.00 | 6.2% | -Ofast | benchmark | baserun0 | baserun1 | baserun2 | optrun0 | optrun1 | optrun2 | delta | speedup | | Dictionary | 1103.00 | 1051.00 | 1047.00 | 1051.00 | 1033.00 | 1036.00 | 14.00 | 1.4% | | EditDistance | 1554.00 | 1493.00 | 1512.00 | 1524.00 | 1511.00 | 1524.00 | 18.00 | -1.2% | | ForLoops | 1644.00 | 1610.00 | 1612.00 | 1638.00 | 1628.00 | 1630.00 | 18.00 | -1.1% | | Forest | 1118.00 | 1066.00 | 1105.00 | 1062.00 | 1079.00 | 1076.00 | 4.00 | 0.4% | | GlobalClass | 2226.00 | 2204.00 | 2194.00 | 2248.00 | 2227.00 | 2234.00 | 33.00 | -1.5% | | Hash | 1006.00 | 967.00 | 975.00 | 998.00 | 996.00 | 1011.00 | 29.00 | -2.9% | | Histogram | 1324.00 | 1173.00 | 1225.00 | 1197.00 | 1183.00 | 1217.00 | 10.00 | -0.8% | | LinkedList | 1558.00 | 1552.00 | 1558.00 | 1560.00 | 1571.00 | 1558.00 | 6.00 | -0.4% | | NBody | 910.00 | 906.00 | 903.00 | 796.00 | 790.00 | 789.00 | 114.00 | 14.4% | | Phonebook | 1659.00 | 1649.00 | 1638.00 | 1846.00 | 1713.00 | 1613.00 | 25.00 | 1.5% | | QuickSort | 699.00 | 700.00 | 689.00 | 686.00 | 679.00 | 679.00 | 10.00 | 1.5% | | R17315246 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | * | | RC4 | 1281.00 | 1227.00 | 1234.00 | 1056.00 | 1051.00 | 1066.00 | 176.00 | 16.7% | | Rectangles | 726.00 | 772.00 | 738.00 | 737.00 | 727.00 | 721.00 | 5.00 | 0.7% | | SmallPT | 978.00 | 963.00 | 971.00 | 629.00 | 623.00 | 631.00 | 340.00 | 54.6% | | StringWalk | 456.00 | 462.00 | 450.00 | 467.00 | 461.00 | 445.00 | 5.00 | 1.1% | | Total | 22315.00 | 21688.00 | 21716.00 | 21589.00 | 21342.00 | 21294.00 | 394.00 | 1.9% | Swift SVN r19849