Commits

Michael Gottesman committed b6f8bd9a555
Initial simple cost based performance inliner. This is a very initial version mostly to get machinery in place before we start considering more interesting things. Specifically we do not: 1. Inline functions with any substitutions. 2. Inline functions that are not thin. 3. Inline functions in any recursive manner (i.e. we just follow the call tree and inline until we run out of cost). 4. Remove functions that we have completely inlined as a good citizen should. Additionally the cost model is purposely simplistic and assumes that every SIL instruction is one to one with an LLVM instruction (when many do not become any LLVM instruction and others become 2). The idea is simply to put a cost on the total increase in code size we allow due to inlining in a specific function. Thus we just continually inline until we run out our inlining budget. Even with the current limitations we inline 1248 apply inst in the stdlib when setting a cost threshold of 225. Swift SVN r11596