aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2022-06-23 20:33:26 +0200
committerSam McCall <sam.mccall@gmail.com>2022-06-23 20:34:11 +0200
commit768216cac0242db609fef55ea98283f57801fd18 (patch)
tree2d7177dbce1e9b232071dec7444cc90cc661e224
parent3b6edef15d2718bd020db6515d670e87f21835af (diff)
downloadllvm-768216cac0242db609fef55ea98283f57801fd18.zip
llvm-768216cac0242db609fef55ea98283f57801fd18.tar.gz
llvm-768216cac0242db609fef55ea98283f57801fd18.tar.bz2
[pseudo] Handle no-reductions-available on the fastpath. NFC
This is a ~2% speedup.
-rw-r--r--clang-tools-extra/pseudo/lib/GLR.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/pseudo/lib/GLR.cpp b/clang-tools-extra/pseudo/lib/GLR.cpp
index 8e6638b..1cee8f8 100644
--- a/clang-tools-extra/pseudo/lib/GLR.cpp
+++ b/clang-tools-extra/pseudo/lib/GLR.cpp
@@ -380,7 +380,7 @@ private:
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);