FunctionSummary {
36llvm::SmallBitVector VisitedBasicBlocks;
39 unsignedTotalBasicBlocks : 30;
43 unsignedInlineChecked : 1;
46 unsignedMayInline : 1;
49 unsignedTimesInlined : 32;
52: TotalBasicBlocks(0), InlineChecked(0), MayInline(0),
56 usingMapTy = llvm::DenseMap<const Decl *, FunctionSummary>;
61MapTy::iterator I = Map.find(
D);
65 usingKVPair = std::pair<const Decl *, FunctionSummary>;
67I = Map.insert(KVPair(
D, FunctionSummary())).first;
68assert(I != Map.end());
74I->second.InlineChecked = 1;
75I->second.MayInline = 1;
80I->second.InlineChecked = 1;
81I->second.MayInline = 0;
89MapTy::const_iterator I = Map.find(
D);
90 if(I != Map.end() && I->second.InlineChecked)
91 returnI->second.MayInline;
97llvm::SmallBitVector &Blocks = I->second.VisitedBasicBlocks;
98assert(
ID< TotalIDs);
99 if(TotalIDs > Blocks.size()) {
100Blocks.resize(TotalIDs);
101I->second.TotalBasicBlocks = TotalIDs;
107MapTy::const_iterator I = Map.find(
D);
109 returnI->second.VisitedBasicBlocks.count();
114MapTy::const_iterator I = Map.find(
D);
116 returnI->second.TimesInlined;
122I->second.TimesInlined++;
127MapTy::const_iterator I = Map.find(
D);
129 return((I->second.VisitedBasicBlocks.count() * 100) /
130I->second.TotalBasicBlocks);
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Decl - This represents one declaration (or definition), e.g.
unsigned getTotalNumBasicBlocks()
std::optional< bool > mayInline(const Decl *D)
unsigned getTotalNumVisitedBasicBlocks()
void markVisitedBasicBlock(unsigned ID, const Decl *D, unsigned TotalIDs)
void markMayInline(const Decl *D)
unsigned getPercentBlocksReachable(const Decl *D)
Get the percentage of the reachable blocks.
unsigned getNumTimesInlined(const Decl *D)
void markShouldNotInline(const Decl *D)
void markReachedMaxBlockCount(const Decl *D)
unsigned getNumVisitedBasicBlocks(const Decl *D)
MapTy::iterator findOrInsertSummary(const Decl *D)
void bumpNumTimesInlined(const Decl *D)
llvm::DenseSet< const Decl * > SetOfConstDecls
std::deque< Decl * > SetOfDecls
The JSON file list parser is used to communicate input to InstallAPI.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4