Commit Graph

11 Commits

Author SHA1 Message Date
Arnold Schwaighofer
d6b13f99f6 Add documentation to the cast optimizer change 2018-06-12 16:02:33 -07:00
Arnold Schwaighofer
e8b5f1c892 CastOptimizer: A load store to the existential box is not valid on address only types
rdar://40949457
2018-06-11 11:17:04 -07:00
Doug Gregor
4b5abbddbc [SIL] Teach *ApplyInst to traffic in SubstitutionMap.
Push SubstitutionMaps through most of SILGen and the SIL optimizers
that involve the various *ApplyInsts.
2018-05-11 13:18:06 -07:00
David Zarzycki
8c0c55539f [SIL] NFC: Rename misleading getSwiftRValueType() to getASTType()
Reference storage types are not RValues. Also, use more SILType helper
methods to avoid line wrap.
2018-05-04 08:14:38 -04:00
Slava Pestov
175b40919f AST: Fewer headers include Expr.h, Module.h, Stmt.h 2018-04-26 22:55:26 -07:00
Huon Wilson
c08085f359 [SILOptimizer] Don't optimize casts to protocols with a conditional conformance.
The conformance existing isn't enough to be sure the cast will succeed,
there may be dynamic information, so we just assume they're always
dynamic and always "MaySucceed".

Fixes rdar://problem/38694450.
2018-03-28 14:58:13 +11:00
Michael Gottesman
e567bc9028 [+0-all-args] Enable +0 normal arguments.
rdar://34222540
2018-03-19 20:25:31 -07:00
Mark Lacey
d63bb3fc53 Remove most uses of OptionalTypeKind.
What remains are places where we are conflating optionality with
either nullability or failability.
2018-02-10 16:24:09 -08:00
Mark Lacey
b4b66bc8e8 Replace getAnyOptionalObjectType with getOptionalObjectType. 2018-02-05 23:59:00 -08:00
Erik Eckstein
f06fcd268b cast optimizer: don't create a critical edge where it's not allowed
https://bugs.swift.org/browse/SR-6773
rdar://problem/36602263
2018-01-24 16:56:48 -08:00
Michael Gottesman
dfd40e4443 [cast-optimizer] Move the cast optimizer into its own .cpp file.
Local.cpp was ~3k lines of which 1.5k (i.e. 1/2) was the cast optimizer. This
commit extracts the cast optimizer into its own .cpp and .h file. It is large
enough to stand on its own and allows for Local.cpp to return to being a small
group of helper functions.

I am making some changes in this area due to the change in certain function
conventions caused by the +0-normal-arg work. I am just trying to leave the area
a little cleaner than before.
2018-01-13 18:26:22 -08:00