[all-commits] [llvm/llvm-project] e3ec05: [pseudo] Track heads as GSS nodes, rather than as ...
Sam McCall via All-commits
all-commits at lists.llvm.org
Thu Jun 23 08:27:29 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e3ec054dfdf48f19cb6726cb3f4965b9ab320ed9
https://github.com/llvm/llvm-project/commit/e3ec054dfdf48f19cb6726cb3f4965b9ab320ed9
Author: Sam McCall <sam.mccall at gmail.com>
Date: 2022-06-23 (Thu, 23 Jun 2022)
Changed paths:
M clang-tools-extra/pseudo/include/clang-pseudo/GLR.h
M clang-tools-extra/pseudo/include/clang-pseudo/grammar/LRTable.h
M clang-tools-extra/pseudo/lib/GLR.cpp
M clang-tools-extra/pseudo/lib/grammar/LRTable.cpp
M clang-tools-extra/pseudo/unittests/GLRTest.cpp
Log Message:
-----------
[pseudo] Track heads as GSS nodes, rather than as "pending actions".
IMO this model is simpler to understand (borrowed from the LR0 patch D127357).
It also makes error recovery easier to implement, as we have a simple list of
head nodes lying around to recover from when needed.
(It's not quite as nice as LR0 in this respect though).
It's slightly slower (2.24 -> 2.12 MB/S on my machine = 5%) but nothing close
to as bad as LR0.
However
- I think we'd have to eat a litle performance loss otherwise to implement
error recovery.
- this frees up some complexity budget for optimizations like fastpath push/pop
(this + fastpath is already faster than head)
- I haven't changed the data structure here and it's now pretty dumb, we can
make it faster
Differential Revision: https://reviews.llvm.org/D128297
More information about the All-commits
mailing list