Commit Graph

64 Commits

Author SHA1 Message Date
Nadav Rotem
52ea0c6c48 Revert "Remove one invocation of the ARC optimizer."
This reverts commit 0515889cf0.

I made a mistake and did not catch this regression when I measured the change on
my local machine. The regression was detected by our automatic performance
tests. Thank you @slavapestov for identifying the commit.
2016-01-28 21:03:10 -08:00
Nadav Rotem
0515889cf0 Remove one invocation of the ARC optimizer.
Removing one of the invocation of the ARC optimizer. I did not measure any
regressions on the performance test suite (using -O), but I did see a
reduction in compile time on rdar://24350646.
2016-01-26 15:51:25 -08:00
Mark Lacey
c37697d38e Add the stand-alone generic specializer pass back to the pipeline.
On the whole it looks like this currently benefits performance.

As with the devirtualization pass, once the updated inliner is
committed, the position of this pass in the pipeline will change.
2016-01-08 08:21:00 -08:00
Mark Lacey
57abe19198 Add the stand-alone devirtualizer pass back to the pipeline.
It looks like this has minimal performance impact either way. Once the
changes to make the inliner a function pass are committed, the position
of this in the pipeline will change.
2016-01-08 00:40:03 -08:00
Mark Lacey
176ba99c84 Don't run the stand-alone devirtualization and specialization passes.
They aren't needed at the moment, and running the specialization pass
early might have resulted in some performance regressions.

We can add these back in (and in the appropriate place in the pipeline)
when the changes to unbundle this functionality from the inliner goes in.
2016-01-07 10:36:28 -08:00
practicalswift
1339b5403b Consistent use of header comment format.
Correct format:
//===--- Name of file - Description ----------------------------*- Lang -*-===//
2016-01-04 13:26:31 +01:00
Mark Lacey
149e1e4059 Fix 80-column violations. 2016-01-03 13:15:56 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Mark Lacey
70938b1aee Add a stand-alone devirtualizer pass.
Add back a stand-alone devirtualizer pass, running prior to generic
specialization. As with the stand-alone generic specializer pass, this
may add functions to the pass manager's work list.

This is another step in unbundling these passes from the performance
inliner.
2015-12-21 23:42:37 -08:00
Mark Lacey
faba6e56b7 Add a stand-alone generic specializer pass.
Begin unbundling devirtualization, specialization, and inlining by
recreating the stand-alone generic specializer pass.

I've added a use of the pass to the pipeline, but this is almost
certainly not going to be the final location of where it runs. It's
primarily there to ensure this code gets exercised.

Since this is running prior to inlining, it changes the order that some
functions are specialized in, which means differences in the order of
output of one of the tests (one which similarly changed when
devirtualization, specialization, and inlining were bundled together).
2015-12-18 14:08:56 -08:00
Arnold Schwaighofer
edf9ca06fc Unroll loops with known short trip count
This enables array value propagation in array literal loops like:

for e in [2,3,4] {
  r += e
}

Allowing us to completely get rid of the array.

rdar://19958821
SR-203
2015-12-14 12:03:42 -08:00
Arnold Schwaighofer
6662e7432a Reapply Add a pass to propagate constant array values to array subscript calls
This reverts commit 82ff59c0b9.

Original commit message:

This allows us to compile the function:

func valueArray() -> Int{
  var a = [1,2,3]
  var r = a[0] + a[1] + a[2]
  return r
}

Down to just a return of the value 6. And should eventually allow us to remove
the overhead of vararg calls.

rdar://19958821
2015-12-14 12:03:41 -08:00
practicalswift
fdeb03033c Fix typo: classsic → classic 2015-12-14 00:11:23 +01:00
Andrew Trick
739b0e9c56 Reorganize SILOptimizer directories for better discoverability.
(libraries now)

It has been generally agreed that we need to do this reorg, and now
seems like the perfect time. Some major pass reorganization is in the
works.

This does not have to be the final word on the matter. The consensus
among those working on the code is that it's much better than what we
had and a better starting point for future bike shedding.

Note that the previous organization was designed to allow separate
analysis and optimization libraries. It turns out this is an
artificial distinction and not an important goal.
2015-12-11 15:14:23 -08:00