[LLVMdev] RFC - Profile Guided Optimization in LLVM

Chandler Carruth chandlerc at google.com
Wed Jun 12 15:05:14 PDT 2013


On Wed, Jun 12, 2013 at 2:55 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:

> That sounds plausible to me. It seems like we might need a way of
> representing call graph profiling in addition to the existing branch
> probabilities?
>

Agreed. An important consideration here is WPO vs. LTO vs. TU-at-a-time
call graphs.


> FWIW, the greedy register allocator’s live range splitting algorithm is
> designed to consume profile information so it can push spill code into cold
> blocks. The primary interface is SpillPlacement::getBlockFrequency() which
> currently returns an estimate based on loop depth only.
>

It doesn't use MachineBlockFrequency? If it does, it will get a lot more
than loop depth: __builtin_expect, cold function attribute, and static
branch heuristics. If it doesn't it should, and then it will immediately
benefit from this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130612/a851059d/attachment.html>


More information about the llvm-dev mailing list