Commit Graph

111 Commits

Author SHA1 Message Date
Arnold Schwaighofer
a934abf2a8 Remove type check workaround for invalid casts
The stdlib has been fixed and no longer produces invalid casts.

rdar://18151953

Swift SVN r22498
2014-10-03 17:01:07 +00:00
Erik Eckstein
48e4c951e0 Remove dead arrays which are constrcuted with _allocateUninitialized
This fixes the performance regressions in Richards and some other benchmarks.



Swift SVN r22465
2014-10-02 14:08:49 +00:00
Joe Groff
a3126706da SIL: Eliminate the dead 'alloc_array' insn.
Swift SVN r22292
2014-09-26 02:28:10 +00:00
Roman Levenstein
a81a99776f Improve optimization of builtin operations that may overflow. Remove overflow checks if it can be proven that no overflow can happen.
Swift SVN r21874
2014-09-11 16:00:54 +00:00
Joe Groff
e004ad7df4 SIL: Carry AST types through init_existential instructions.
This is necessary to be able to properly stash values with nontrivial lowerings, such as metatypes and functions, inside existential containers. Modify SILGen to lower values to the proper abstraction level before storing them in an existential container. Part of the fix for rdar://problem/18189508, though runtime problems still remain when trying to actually dynamicCast out a metatype from an Any container.

Swift SVN r21830
2014-09-10 05:56:36 +00:00
Roman Levenstein
f0b3b52f8d [sil-combine] Implement (thick_to_objc_metatype (metatype @thick)) -> (metatype @objc_metatype) optimization
rdar://17290993

Swift SVN r21772
2014-09-08 09:52:46 +00:00
Roman Levenstein
84582fa201 [sil-combine] (retain/release (objc_(existential_)metatype_to_object)) -> no-op.
Related to radr://17291031

Swift SVN r21630
2014-09-01 16:14:48 +00:00
Michael Gottesman
b411c1084a Revert "[sil-combine] Strip off ref count identiy preserving operations from retain_value and release_value."
This reverts commit r21567.

The reason I wanted to do this is that I thought it would be easier for other
people to scan for matching retains, releases. I am pretty fast at such scanning
given I have had a little practice at doing so ; ), but I have noticed that for
other people it takes longer. I was hoping that canonicalizing retain_value,
release_value to be on what the ARC optimizer considers to be the “root” of the
allocation would make that easier. Now that I think about it though:

1. The value is dubious since it won’t help us to optimize programs any better.
2. It could actually hurt optimization by getting in the way of SROA and friends
by creating uses on larger structs.

Given that it /might/ hurt optimization, I am just going to revert this. There
is no point in taking such a risk.

Swift SVN r21596
2014-08-29 23:35:24 +00:00
Michael Gottesman
9a0df28082 [sil-combine] Strip off ref count identiy preserving operations from retain_value and release_value.
Swift SVN r21567
2014-08-29 06:12:32 +00:00
Michael Gottesman
3fa1ed3057 [sil-combine] Make some code more readable by extracting reused values into their own locals. NFC.
Swift SVN r21566
2014-08-29 06:12:31 +00:00
Michael Gottesman
6d5094bacb [sil-combine] Split SILCombine into SILCombine.cpp, SILCombiner.h, and SILCombinerVisitors.cpp.
rdar://18164766

Swift SVN r21541
2014-08-28 21:27:54 +00:00