Commit Graph

12 Commits

Author SHA1 Message Date
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
practicalswift
6f5940e49d Fix typo: entires → entries 2015-12-14 00:11:42 +01:00
Erik Eckstein
f40f3a93a0 New implementation of dead function elimination, which includes dead method elimination.
If vtable or witness methods are never called, e.g. because they are completely devirtualized,
then they are removed from the tables and eliminated.

Another improvement of the new algorithm is that it is able to eliminate dead function cycles
(e.g. A() calls B() and vice versa).



Swift SVN r22969
2014-10-27 16:41:02 +00:00
Michael Gottesman
67351cf0a2 Since SILVTables and SILWitnessTables are bump ptr allocated, we need to call their destructor when we remove them so that the functions they reference have a decremented ref count.
Swift SVN r16171
2014-04-10 22:10:59 +00:00
Michael Gottesman
9dd5fa3fcf Add in some comments to SILVTable. NFC.
Swift SVN r15562
2014-03-27 19:49:00 +00:00
Michael Gottesman
c4f407b058 Fix whitespace errors. NFC.
Swift SVN r15548
2014-03-27 03:56:34 +00:00
Michael Gottesman
fb8b3f3649 Remove unnecessary include of std::string. NFC.
Swift SVN r15546
2014-03-27 03:52:00 +00:00
Nadav Rotem
3355cf7bfa VTables should be accessed by reference.
Swift SVN r11691
2013-12-28 09:00:12 +00:00
Joe Groff
c76548916e SIL: Have VTables and WitnessTables bump the reference counts of SILFunctions.
Fixes <rdar://problem/15725600>.

Swift SVN r11666
2013-12-27 05:59:19 +00:00
Joe Groff
0ff977d407 Add a 'WitnessMethod' enumerator to AbstractCC.
We'll use this to represent the slightly-different polymorphic calling convention used for passing Self into protocol witnesses.

Swift SVN r10898
2013-12-06 01:32:35 +00:00
Joe Groff
aca3bd52ac SILGen: Build SILVTables while visiting classes.
When we walk a ClassDecl, generate its vtable, first pulling in decls from its ancestor classes, then overlaying overridden or new decls as we discover them.

Swift SVN r8947
2013-10-06 01:02:14 +00:00
Joe Groff
b4f85653e6 SIL: Introduce SILVTables.
These will provide a SIL-level representation of class_method dispatch, mapping from dynamically-dispatched SILDeclRefs to SILFunctions so that devirtualization passes will be able to promote a class_method for a statically-known type to a function_ref without going all the way back to the AST.

Swift SVN r8943
2013-10-05 21:58:58 +00:00