Commit Graph

11 Commits

Author SHA1 Message Date
Arnold Schwaighofer
adbbb5b6b7 Codesign test/SILOptimizer 2018-08-10 06:58:40 -07:00
Dmitri Gribenko
486cab447d tests: replace 'rm -rf %t && mkdir -p %t' with '%empty-directory(%t)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Jordan Rose
e4118f19c8 Port tests to 'fileprivate'.
Similar to apple/swift#3753.

Groundwork for SE-0025 ('private' and 'fileprivate').
No intended functionality change.
2016-07-25 20:20:58 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
practicalswift
d00a5ef814 [gardening] Weekly gardening: typos, duplicate includes, header formatting, etc. 2016-03-24 22:41:10 +01:00
Roman Levenstein
3448b7c0f4 [let-properies-opt] Fix a bug which where a let property was wrongly considered to have a constant value.
The optimization pass was inspecting only init methods to determine if a given let property is defined
in the same way by all initializers. But this is not enough in certain cases, e.g. when some of the
initializers were inlined into the application code and the body of the inlined SIL function representing
such an initializer was removed afterwards by the dead function elimination pass. In such situations,
the Let Properties Optimization pass was assuming that there is only one initializer and considered the
constant let property value defined there as the only possible value of this let property. Therefore it
propagated it into let-property uses, which resulted in an incorrect code.

The right thing to do is to analyze all assignments to a given let property whether they are inside initializer
SIL functions or not. This makes sure that all possible values of a let property are analyzed and compared.
The propagation of a constant let property value can only happen if all found possible values are all the same.

Fixes SR-1026 and rdar://25303106
2016-03-23 22:29:56 -07:00
practicalswift
991b3fb2c4 [gardening] Fix recently introduced typo: "branchs" → "branches" 2016-03-02 09:39:15 +01:00
practicalswift
4fc77e48db [gardening] Fix recently introduced typo: "intialize" → "initialize" 2016-03-02 09:38:48 +01:00
practicalswift
00fc74f8d4 [gardening] Fix recently introduced typo: "multipe" → "multiple" 2016-03-02 09:38:17 +01:00
Roman Levenstein
4cedaa41fc Add an executable test for checking the correctness of let properties optimizations.
This is a follow-up commit for my previous bugfix in the let properties optimizations.
2016-03-01 16:14:50 -08:00