Commits

Erik Eckstein committed 0dd045ca04d
Add a stack promotion optimization. It promotes allocations of native swift objects and array buffers to the stack if it is possible. The SIL StackPromotion pass is the main part of the optimization. For details see comments there. Unfortunately we need an additional LLVM pass to handle array buffers, which is not very nice. I hope that we can get rid of it in future (again: for details see the comments in StackPromotion.cpp) The optimization gives performance improvements in some benchmarks, mostly related to array literals: ArrayLiteral: +12% Combos: +16% DictionaryLiteral: + 37% RIPEMD: +10% StringBuilder: +27% StringInterpolation: +11% And last but not least the new benchmark which is dedicated to test stack promotion: ObjectAllocation: +52%