projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28e312c
)
[NFC] Comment in MLInlineAdvisor as to why use std::map for FPICache
author
Mircea Trofin
<mtrofin@google.com>
Mon, 7 Nov 2022 19:10:58 +0000
(11:10 -0800)
committer
Mircea Trofin
<mtrofin@google.com>
Mon, 7 Nov 2022 19:10:58 +0000
(11:10 -0800)
llvm/include/llvm/Analysis/MLInlineAdvisor.h
patch
|
blob
|
history
diff --git
a/llvm/include/llvm/Analysis/MLInlineAdvisor.h
b/llvm/include/llvm/Analysis/MLInlineAdvisor.h
index
3db948d
..
7535464
100644
(file)
--- a/
llvm/include/llvm/Analysis/MLInlineAdvisor.h
+++ b/
llvm/include/llvm/Analysis/MLInlineAdvisor.h
@@
-69,6
+69,9
@@
private:
getSkipAdviceIfUnreachableCallsite(CallBase &CB);
void print(raw_ostream &OS) const override;
+ // Using std::map to benefit from its iterator / reference non-invalidating
+ // semantics, which make it easy to use `getCachedFPI` results from multiple
+ // calls without needing to copy to avoid invalidation effects.
mutable std::map<const Function *, FunctionPropertiesInfo> FPICache;
LazyCallGraph &CG;