Commit Graph

203 Commits

Author SHA1 Message Date
Nadav Rotem
0271c34d77 Devirtualize: teach the class_method devirtualization type-search procedure to look into apply instructions.
In many cases these calls are constructors that were too big to be inlined.

We now devirtualize this code:

class ABC {
 init() { /* Don't inline */ }
 func member() { }
}

func foo() {
  var x = ABC()
  x.member()
}



Swift SVN r12223
2014-01-13 09:32:54 +00:00
Nadav Rotem
32f47906bd Refactor findClassTypeForOperand. NFC.
Swift SVN r12222
2014-01-13 07:56:48 +00:00
Nadav Rotem
970c387c34 Refactor devirt related optimizations from sil-combine into a new pass.
The reason is that I would like to add more sophisticated analysis and a
chache, which does not fit into sil-combine very well.



Swift SVN r12221
2014-01-13 07:34:25 +00:00