[PATCH] D128297: [pseudo] Track heads as GSS nodes, rather than as "pending actions".
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 21 12:23:11 PDT 2022
sammccall created this revision.
sammccall added a reviewer: hokein.
Herald added a project: All.
sammccall requested review of this revision.
Herald added subscribers: cfe-commits, alextsao1999.
Herald added a project: clang-tools-extra.
IMO this model is simpler to understand (borrowed from the LR0 patch D127357 <https://reviews.llvm.org/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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128297
Files:
clang-tools-extra/pseudo/include/clang-pseudo/GLR.h
clang-tools-extra/pseudo/include/clang-pseudo/grammar/LRTable.h
clang-tools-extra/pseudo/lib/GLR.cpp
clang-tools-extra/pseudo/lib/grammar/LRTable.cpp
clang-tools-extra/pseudo/unittests/GLRTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128297.438798.patch
Type: text/x-patch
Size: 24008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220621/7fd23f5d/attachment-0001.bin>
More information about the cfe-commits
mailing list