aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-06-25 09:23:24 +0200
committerGitHub <noreply@github.com>2024-06-25 09:23:24 +0200
commit174f80c6030f9bc96df6ae8daeb4d6bce3f36fbb (patch)
treea9b4c0a445bbf43eff652bbe04947227ab8ceaa9 /clang/lib/CodeGen/CodeGenModule.cpp
parent8153773b23032177546944ec2524dce131b8a46e (diff)
downloadllvm-174f80c6030f9bc96df6ae8daeb4d6bce3f36fbb.zip
llvm-174f80c6030f9bc96df6ae8daeb4d6bce3f36fbb.tar.gz
llvm-174f80c6030f9bc96df6ae8daeb4d6bce3f36fbb.tar.bz2
[DomTree] Avoid duplicate hash lookups in runDFS() (NFCI) (#96460)
runDFS() currently performs three hash table lookups. One in the main loop, one when checking whether a successor has already been visited and another when adding parent and reverse children to the successor. We can avoid the two additional lookups by making the parent number part of the stack, and then making the parent / reverse children update part of the main loop. The main loop already has a check for already visited nodes, so we don't have to check this in advance -- we can simply push the node to the worklist and skip it later.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions