Displaying 7 results from an estimated 7 matches for "getblockprofilecount".
2019 Jan 13
2
Problem using BlockFrequencyInfo's getBlockProfileCount
...InfoWrapperPass>(F);
llvm::BlockFrequencyInfo* BFI = &bfiPass.getBFI();
//Works - shows all info I want
BFI->print(llvm::dbgs());
for (const llvm::BasicBlock& B : F) {
//Fails with SIGSEGV -> *getFunction() returns 0xa
dbgs() << BFI->getBlockProfileCount(&B).getValueOr(0) << "\n";
}
}
lib/Analysis/BlockFrequencyInfo.cpp#L211
return BFI->getBlockProfileCount(*getFunction(), BB);
2018 Aug 15
3
Queries Regarding Usage of PGOInstrumentation Passes instead of Deprecated ProfileInfo
...llowing queries.
>>
>> - How do I use the edge count and branch weights data obtained using
>> PGOInstrumentationUse in my pass and replace the *getEdgeWeight()*
>> from ProfileInfo?
>>
>>
> You can do
> BPI.getEdgeProbability(Src, Dest).scale(BFI.getBlockProfileCount(Src));
>
I tried doing this but there are some semantic issues that I'm facing.
There is a loop in my program which I know is a hot loop since it is the
only loop inside the function main() and essentially, all the computations
are performed within this function via function calls. However,...
2018 Aug 15
2
Queries Regarding Usage of PGOInstrumentation Passes instead of Deprecated ProfileInfo
...use the edge count and branch weights data obtained
>>>> using PGOInstrumentationUse in my pass and replace the
>>>> *getEdgeWeight()* from ProfileInfo?
>>>>
>>>>
>>> You can do
>>> BPI.getEdgeProbability(Src, Dest).scale(BFI.getBlockProfileCount(Src));
>>>
>>
>> I tried doing this but there are some semantic issues that I'm facing.
>> There is a loop in my program which I know is a hot loop since it is the
>> only loop inside the function main() and essentially, all the computations
>> are perform...
2018 Aug 15
2
Queries Regarding Usage of PGOInstrumentation Passes instead of Deprecated ProfileInfo
...yInfoWrapperPass >();au.addRequired<
BranchProbabilityInfoWrapperPass >();*
Now, I have the following queries.
- How do I use the edge count and branch weights data obtained using
PGOInstrumentationUse in my pass and replace the *getEdgeWeight()* from
ProfileInfo?
- If I call *getBlockProfileCount() *from the BlockFrequency pass, will
that give me the data read during PGOInstrumentationUse or data based on
static analysis? In other words, does the data obtained during
PGOInstrumentationUse "propagate" to BlockFrequency and BranchProbability?
Thank you.
Regards,
Malhar...
2016 Dec 02
4
Computing block profile weights
...the program's execution time spent in
this block".
Currently, I'm computing this using the block's frequency from
BlockFrequencyInfo, relative to the function's entry block frequency, and
scaled by the function's entry count. This is also the computation that's
done by getBlockProfileCount
<https://github.com/llvm-mirror/llvm/blob/master/lib/Analysis/BlockFrequencyInfoImpl.cpp#L540>
in
lib/Analysis/BlockFrequencyInfoImpl.cpp.
The problem is that this method can be extremely imprecise, because many
functions have an entry count of zero. The entry count is computed from the
numb...
2016 Apr 18
5
Move InlineCost.cpp out of Analysis?
> On Apr 18, 2016, at 2:07 PM, Hal Finkel via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> ----- Original Message -----
>> From: "Easwaran Raman" <eraman at google.com>
>> To: "via llvm-dev" <llvm-dev at lists.llvm.org>
>> Cc: "Chandler Carruth" <chandlerc at gmail.com>, "Hal Finkel" <hfinkel at
2017 Jun 15
7
[RFC] Profile guided section layout
...for (auto &F : M) {
+ if (F.isDeclaration())
+ continue;
+ getAnalysis<BranchProbabilityInfoWrapperPass>(F).getBPI();
+ auto &BFI = getAnalysis<BlockFrequencyInfoWrapperPass>(F).getBFI();
+ for (auto &BB : F) {
+ Optional<uint64_t> BBCount = BFI.getBlockProfileCount(&BB);
+ if (!BBCount)
+ continue;
+ for (auto &I : BB) {
+ auto *CI = dyn_cast<CallInst>(&I);
+ if (!CI)
+ continue;
+ Function *CalledF = CI->getCalledFunction();
+ if (!CalledF || CalledF->isIntrinsic())
+ cont...