mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 18:26:37 +00:00
[llvm-profgen] Avoid repeated hash lookups (NFC) (#130466)
This commit is contained in:
parent
573df34ea0
commit
99d2b3b0aa
@ -165,14 +165,14 @@ uint64_t MissingFrameInferrer::computeUniqueTailCallPath(
|
||||
if (CurSearchingDepth == MaximumSearchDepth)
|
||||
return 0;
|
||||
|
||||
|
||||
if (!FuncToTailCallMap.count(From))
|
||||
auto It = FuncToTailCallMap.find(From);
|
||||
if (It == FuncToTailCallMap.end())
|
||||
return 0;
|
||||
|
||||
CurSearchingDepth++;
|
||||
Visiting.insert(From);
|
||||
uint64_t NumPaths = 0;
|
||||
for (auto TailCall : FuncToTailCallMap[From]) {
|
||||
for (auto TailCall : It->second) {
|
||||
NumPaths += computeUniqueTailCallPath(TailCall, To, Path);
|
||||
// Stop analyzing the remaining if we are already seeing more than one
|
||||
// reachable paths.
|
||||
|
Loading…
x
Reference in New Issue
Block a user