This is a new pass that reduces code size by outlining at the IR level.
This is the work of River Riddle
https://github.com/River707/llvm.git, outliner branch
With some cleanup and minor fixes.
The discussion on llvm-dev of this can be found here
River's presentation at the 2017 llvm dev conf
More recent rebases for master and release_70 to llvm can be found