search for: getbfi

Displaying 5 results from an estimated 5 matches for "getbfi".

Did you mean: get_fb
2019 Jan 13
2
Problem using BlockFrequencyInfo's getBlockProfileCount
...n someone provide an example on how to use BlockFrequencyInfo correctly? Example code: for (auto& F : M) {     if (F.isDeclaration()) {         continue;     }     auto& bfiPass = getAnalysis<BlockFrequencyInfoWrapperPass>(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";     } } l...
2015 Dec 07
4
[LLVMdev] Path forward on profile guided inlining?
...ager (including those run by the > function pass manager run under CGSCC pass manager) might affect the > computed BFI for the functions in the SCC. > > When the new PM infrastructure and a CGSCC based BFI analysis is in place, > the transition should be easy assuming it will provide getBFI(Function *) > and invalidateBFI(Function *) interfaces. BFI for a function is computed at > most twice in this approach. Thoughts? > > > Thanks, > Easwaran > > >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at...
2015 Dec 11
2
[LLVMdev] Path forward on profile guided inlining?
...pass manager too, so there is no conflict here. The BFI book-keeping by inliner can be removed with pass manager change is in place. David >> >> When the new PM infrastructure and a CGSCC based BFI analysis is in place, >> the transition should be easy assuming it will provide getBFI(Function *) >> and invalidateBFI(Function *) interfaces. BFI for a function is computed at >> most twice in this approach. Thoughts? >> >> >> Thanks, >> Easwaran >> >>> >>> _______________________________________________ >>> LLVM...
2015 Dec 11
5
[LLVMdev] Path forward on profile guided inlining?
...ass manager change is in place. > > Thanks for the clarification. > >> >> David >> >> >>>> When the new PM infrastructure and a CGSCC based BFI analysis is in >>>> place, >>>> the transition should be easy assuming it will provide getBFI(Function >>>> *) >>>> and invalidateBFI(Function *) interfaces. BFI for a function is computed >>>> at >>>> most twice in this approach. Thoughts? >>>> >>>> >>>> Thanks, >>>> Easwaran >>>> &g...
2017 Jun 15
7
[RFC] Profile guided section layout
...+ + llvm::DenseMap<std::pair<StringRef, StringRef>, uint64_t> Counts; + + 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 *Calle...