[llvm-commits] PATCH: Add a function splitting pass to LLVM which extracts cold regions into their own functions

Chandler Carruth chandlerc at gmail.com
Sat May 5 00:54:05 PDT 2012


Hello folks!

I wanted to start the initial review on a pass I've been working on. It's
essentially doing hot/cold partitioning, cold region extraction, function
splitting, or cold region outlining. Whatever terminology you would like,
you get the idea. It's a really simple pass, built entirely out of all the
existing infrastructure (some of which I've been cleaning up to let
everything fall out this easily).

While this won't do a whole lot of interesting things on its own, I'm
preparing to tweak the inline cost heuristics in a way that will allow this
to form the essence of partial inlining. We can run this before inlining,
splitting large cold regions of code into separate functions, and then be
able to inline the remainder more easily.

I haven't run benchmarks, and this patch doesn't turn the pass on, I just
want to get initial feedback, and get the code into the shape where I can
put it in-tree, and then look at turning it on if benchmarks prove positive.

Comments? Also, is there a better pass name? Duncan had suggested
cold-code-extract, not sure if thats better or not...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120505/8621b06e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: function-splitting.patch
Type: application/octet-stream
Size: 12548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120505/8621b06e/attachment.obj>


More information about the llvm-commits mailing list