Chandler Carruth
2013-Jun-12 22:05 UTC
[LLVMdev] RFC - Profile Guided Optimization in LLVM
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>
Chandler Carruth
2013-Jun-12 22:05 UTC
[LLVMdev] RFC - Profile Guided Optimization in LLVM
On Wed, Jun 12, 2013 at 3:05 PM, Chandler Carruth <chandlerc at google.com>wrote:> 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?Err, MachineBlockFrequencyInfo -- the analysis pass. Sorry. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130612/9bb1a359/attachment.html>
Jakob Stoklund Olesen
2013-Jun-12 22:10 UTC
[LLVMdev] RFC - Profile Guided Optimization in LLVM
On Jun 12, 2013, at 3:05 PM, Chandler Carruth <chandlerc at google.com> wrote:> > 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.It predates the block frequency interface. It just needs to be hooked up, patches welcome. It would also be nice to remove the floating point computations from the spill placement code. Thanks, /jakob
Chandler Carruth
2013-Jun-12 22:15 UTC
[LLVMdev] RFC - Profile Guided Optimization in LLVM
On Wed, Jun 12, 2013 at 3:10 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:> It predates the block frequency interface. It just needs to be hooked up, > patches welcome. It would also be nice to remove the floating point > computations from the spill placement code.Cool, if Diego doesn't beat me to it, I may send you a patch as that seems easy and obviously beneficial. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130612/09e7857c/attachment.html>
Seemingly Similar Threads
- [LLVMdev] RFC - Profile Guided Optimization in LLVM
- [LLVMdev] RFC - Profile Guided Optimization in LLVM
- [LLVMdev] RFC - Profile Guided Optimization in LLVM
- [LLVMdev] RFC - Profile Guided Optimization in LLVM
- [LLVMdev] RFC - Profile Guided Optimization in LLVM