Commit Graph

6 Commits

Author SHA1 Message Date
Nadav Rotem
680c565af5 Refactor the code that checks if a function is marked with noopt semantics. NFC.
Swift SVN r27485
2015-04-20 17:27:31 +00:00
Erik Eckstein
af49ec17d2 Removed unused empty comment lines.
Swift SVN r27478
2015-04-20 07:24:43 +00:00
Nadav Rotem
926042ff81 Add @semantics("optimize.never") to disable optimizations of a specific function.
This commit adds a flag to disable optimizations on a specific functions. The
primary motivation of this patch is to allow the optimizer developers to reduce
testcasese by disabling optimizations of parts of the code without having to
recompile the compiler or inspect SIL. The annotations  "inline(never)"
and "optimize.none" can go a long way.

The second motivation for this patch is to allow our internal adopters to work
around compiler bugs.

rar://19745484

Usage:

@semantics("optimize.never")
public func miscompile() { ... }

Swift SVN r27475
2015-04-20 05:06:55 +00:00
Erik Eckstein
115090d6f7 Re-apply r27361: A new SIL pass for static analysis of array properties.
...with a fix for the compiler crash in external projects.
rdar://problem/20579035



Swift SVN r27427
2015-04-17 08:18:29 +00:00
Mark Lacey
0b423c1844 Revert "A new SIL pass for static analysis of array properties."
This reverts commit r27361. It may have broken some of the external
projects we test.

Swift SVN r27426
2015-04-17 06:19:59 +00:00
Erik Eckstein
6cfb3716bf A new SIL pass for static analysis of array properties.
The GlobalPropertyOpt pass performs a static analysis over the whole module.
If it can prove that an array property call (_getArrayPropertyIsNativeNoTypeCheck) always yiels true,
then it replaces the call with a literal-true.

The pass runs on the high-level SIL using the array semantics calls.
Currently it only handles the isNativeNoTypeCheck array property, but in future it might handle additinal properties
(therefore I chose this general name for it).

It gives +24% on DeltaBlue.




Swift SVN r27361
2015-04-16 17:28:14 +00:00