search for: getedgeweight

Displaying 7 results from an estimated 7 matches for "getedgeweight".

2018 Aug 15
2
Queries Regarding Usage of PGOInstrumentation Passes instead of Deprecated ProfileInfo
...The code snippet in my pass looks something like this. BasicBlock *header = loop->getHeader(); ProfileInfo &pi = getAnalysis< ProfileInfo >(); for(pred_iterator i=pred_begin(header), e=pred_end(header); i!=e; ++i) { BasicBlock *pred = *i; const double edgeCount = *pi.getEdgeWeight*( ProfileInfo::Edge(pred,header) ); */* Some code */* } Now, since ProfileInfo has been deprecated and we have PGOInstrumentation passes along with BranchProbability and BlockFrequency, I wish to update the above snippet, in particular, obtaining the edge weights (highlighted in the code abo...
2018 Aug 15
3
Queries Regarding Usage of PGOInstrumentation Passes instead of Deprecated ProfileInfo
...gt; BasicBlock *header = loop->getHeader(); >> ProfileInfo &pi = getAnalysis< ProfileInfo >(); >> for(pred_iterator i=pred_begin(header), e=pred_end(header); i!=e; ++i) >> { >> BasicBlock *pred = *i; >> >> const double edgeCount = *pi.getEdgeWeight*( ProfileInfo::Edge(pred,header) ); >> */* Some code */* >> } >> >> Now, since ProfileInfo has been deprecated and we have PGOInstrumentation >> passes along with BranchProbability and BlockFrequency, I wish to update >> the above snippet, in particular, ob...
2013 Jan 23
2
[LLVMdev] BlockFrequencyImpl asserts on multiple edges between same MBBs with different weights in LLVM 3.2
...e, and another one for the jump handling the case when the index is not in the jumptable. For some reason, our backend assigns those edges different weights (let's say 24 for the default edge and 16 for the others). In LLVM 3.1, getSumForBlock in lib/CodeGen/MachineBranchProbability.cpp used getEdgeWeight(MBB*, MBB*), which always return the weight of the first edge to the default block, i.e., it calculated the sum of the weights as 24+16+24+16+16 = 96. In LLVM 3.2 getSumForBlock was changed to use getEdgeWeight(MBB*, MBB::succ_iterator), causing it to calculate the sum of weights now correctly...
2018 Aug 15
2
Queries Regarding Usage of PGOInstrumentation Passes instead of Deprecated ProfileInfo
...>>>> ProfileInfo &pi = getAnalysis< ProfileInfo >(); >>>> for(pred_iterator i=pred_begin(header), e=pred_end(header); i!=e; ++i) >>>> { >>>> BasicBlock *pred = *i; >>>> >>>> const double edgeCount = *pi.getEdgeWeight*( ProfileInfo::Edge(pred,header) ); >>>> */* Some code */* >>>> } >>>> >>>> Now, since ProfileInfo has been deprecated and we have >>>> PGOInstrumentation passes along with BranchProbability and BlockFrequency, >>>> I wis...
2009 Aug 08
0
[LLVMdev] Profiling in LLVM Patch Followup 1
...:set<const BasicBlock*> ProcessedPreds; > - ProcessedPreds.insert(FirstPred); > - ProcessedPreds.insert(SecondPred); > - ProcessedPreds.insert(ThirdPred); > + double Count = 0; > for (; PI != PE; ++PI) > - if (ProcessedPreds.insert(*PI).second) > - Count += getEdgeWeight(*PI, BB); > + if (ProcessedPreds.insert(*PI).second) { > + double w = getEdgeWeight(getEdge(*PI, BB)); > + if (w == MissingValue) { > + Count = MissingValue; break; Please break the line before 'break'. This code also makes me thing MissingValue should be r...
2009 Aug 08
6
[LLVMdev] Profiling in LLVM Patch Followup 1
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Daniel Dunbar wrote: > Thanks, applied as r78247. Next? :) Oh my, first he is lagging and now it's all a hurry :-) Okay, here comes the next one. I'm taking a short vacation next week so I will try to prepare 1 or 2 of the next patches so that you can work on them as you have time. Greetings, Andi - --
2009 Aug 08
0
[LLVMdev] Profiling in LLVM Patch Followup 1
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! Andreas Neustifter wrote: > Daniel Dunbar wrote: >> Thanks, applied as r78247. Next? :) > > Oh my, first he is lagging and now it's all a hurry :-) > > Okay, here comes the next one. > > I'm taking a short vacation next week so I will try to prepare 1 or 2 of > the next patches so that you can work on them