search for: blockfrequencyimpl

Displaying 9 results from an estimated 9 matches for "blockfrequencyimpl".

2013 Jan 23
2
[LLVMdev] BlockFrequencyImpl asserts on multiple edges between same MBBs with different weights in LLVM 3.2
We are developing a new backend for a custom processor using LLVM. After updating to LLVM 3.2, we run into an assertion in BlockFrequencyImpl.h. The offending test-case looks basically like this: for ( ... ) { switch (i) { case 100: // do something break; case 102: // do something else break; case 103: // do some more break; case 104: // now something different break; default: // handle other case...
2013 Jan 23
0
[LLVMdev] BlockFrequencyImpl asserts on multiple edges between same MBBs with different weights in LLVM 3.2
On Jan 23, 2013, at 12:36 PM, Stefan Hepp <stefan at stefant.org> wrote: > However, an alternative option could be to simply disallow different edge weights for edges with the same source and destination, or to make the call to getEdgeFreq(Pred,BB) in BlockFrequencyImpl distinguish between the edges, which would eliminate the need for an additional PtrSet, but is not that easy to implement. Hi Stefan, The MachineBasicBlock CFG is supposed to be a proper graph without duplicate edges, unlike the LLVM IR CFG. I thought I had cleaned up all the cases where we crea...
2013 Jan 24
1
[LLVMdev] BlockFrequencyImpl asserts on multiple edges between same MBBs with different weights in LLVM 3.2
Hi, On 01/23/2013 11:30 PM, Jakob Stoklund Olesen wrote: > If you can find the place that creates the duplicate MBB edge, that would be great. > Found it :) It happens in lib/CodeGen/IfConversion.cpp at the very end in MergeBlocks. I attached a small patch that should resolve that issue. Our tests now compile sucessfully even without my previous patch. regards, Stefan --------------
2011 Oct 20
0
[LLVMdev] Question regarding basic-block placement optimization
...for this computation? We intended to add a function that computes this and saturates on overflow etc. Overflow is handled transparently in the overloaded BlockFrequency::operator*(BranchProbability). But you could use the existing API anyway by adding a helper to MachineBlockFrequencyInfo calling BlockFrequencyImpl::getEdgeFreq(Src,Dst). >> Still, for the test cases that don't tickle the iteration bug, it generates beautiful, well laid out code. =] > > I am sure others have strong opinions about the algorithm ;-) I may be one of those others ;-). Although handling SCCs (loops) probably save...
2015 Jan 08
4
[LLVMdev] Separating loop nests based on profile information?
...(frequency of the loop header combined with probability of the cold > region). Let me ask a basic question: what do BlockFrequency and BranchProbability compute and roughly what mental cost model should I have? Once I have a BlockFrequency, what does it mean? Some of this is documented in BlockFrequencyImpl.h, but the high level bits are mostly missing. Particularly for BranchProbability. I chose to write a custom analysis in large part because I didn't understand the existing analysis and my (possibly completely wrong) perception is that they're overly precise/expensive for what I need....
2011 Oct 19
3
[LLVMdev] Question regarding basic-block placement optimization
On Oct 19, 2011, at 5:50 AM, Chandler Carruth wrote: > Ok, wow that wasn't hard at all. Awesome ;-) > This is still *very* much a rough draft, but it's probably better to review that the previous patch. One big caveat, I know I have an iteration bug in here somewhere that is inf-looping. Just ran out of steam debugging it, will pick it back up again later today to shake it out.
2011 Oct 20
2
[LLVMdev] Question regarding basic-block placement optimization
...ended to add a function that > computes this and saturates on overflow etc. > > Overflow is handled transparently in the overloaded > BlockFrequency::operator*(BranchProbability). But you could use the existing > API anyway by adding a helper to MachineBlockFrequencyInfo calling > BlockFrequencyImpl::getEdgeFreq(Src,Dst). > Yea, this should be handled by the BlockFrequency object correctly here, but if you'd rather see the helper I can add that. Was just keeping this patch more focused on the pass. > >> Still, for the test cases that don't tickle the iteration bug, it &g...
2015 Jan 08
9
[LLVMdev] Separating loop nests based on profile information?
I've been playing with approaches to getting better optimization of loops which contain infrequently executed slow paths. I've gotten as far as throwing together a proof of concept implementation of a profile guided optimization to separate a single loop with multiple latches into a loop nest, but I want to get feedback from interested parties before investing much more effort. The
2014 Mar 07
2
[LLVMdev] [RFC] BlockFrequency is the wrong metric; we need a new one
On Feb 4, 2014, at 4:36 PM, Andrew Trick <atrick at apple.com> wrote: > > On Feb 4, 2014, at 4:07 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > >> >> On Feb 3, 2014, at 12:13 AM, Andrew Trick <atrick at apple.com> wrote: >> >>> On Feb 2, 2014, at 6:55 PM, Chandler Carruth <chandlerc at gmail.com> wrote: >>>