Author: Sam McCall Date: 2022-06-23T20:34:11+02:00 New Revision: 768216cac0242db609fef55ea98283f57801fd18
URL: https://github.com/llvm/llvm-project/commit/768216cac0242db609fef55ea98283f57801fd18 DIFF: https://github.com/llvm/llvm-project/commit/768216cac0242db609fef55ea98283f57801fd18.diff LOG: [pseudo] Handle no-reductions-available on the fastpath. NFC This is a ~2% speedup. Added: Modified: clang-tools-extra/pseudo/lib/GLR.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/pseudo/lib/GLR.cpp b/clang-tools-extra/pseudo/lib/GLR.cpp index 8e6638bd3b89..1cee8f86e599 100644 --- a/clang-tools-extra/pseudo/lib/GLR.cpp +++ b/clang-tools-extra/pseudo/lib/GLR.cpp @@ -380,7 +380,7 @@ class GLRReduce { RID = A.getReduceRule(); } if (!RID.hasValue()) - return false; + return true; // no reductions available, but we've processed the head! const auto &Rule = Params.G.lookupRule(*RID); const GSS::Node *Base = Head; TempSequence.resize_for_overwrite(Rule.Size); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits