[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 4 02:04:46 PST 2024
Pol Marcet =?utf-8?q?Sardà ?= <polmarcetsarda at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/76825 at github.com>
================
@@ -95,8 +103,23 @@ std::pair<ASTNode, ASTNode> ClangASTNodesEmitter::EmitNode(raw_ostream &OS,
if (!Base.isAbstract())
First = Last = Base;
+ auto comp = [this](ASTNode LHS, ASTNode RHS) {
+ auto LHSPriorized = PrioritizedClasses.count(LHS) > 0;
----------------
Endilll wrote:
```suggestion
auto LHSPrioritized = PrioritizedClasses.count(LHS) > 0;
```
https://github.com/llvm/llvm-project/pull/76825
More information about the cfe-commits
mailing list