[PATCH] D130523: [pseudo] Perform unconstrained recovery prior to completion.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 28 07:11:39 PDT 2022


hokein added inline comments.


================
Comment at: clang-tools-extra/pseudo/lib/GLR.cpp:621
     // Consume the token.
     glrShift(Heads, Terminals[I], Params, Lang, NextHeads);
 
----------------
hokein wrote:
> I think we can move the Line634 `Heads.resize(HeadsPartition)` before the `glrShift()` as we only do shift on the nearly-created heads, we might gain some performance back.
oops, my previous comment is incorrect, here we want the second part of the partition; while on recovery, we want the first part of partition.

we can pass `llvm::ArrayRef<const GSS::Node *>(Heads).drop_front(HeadsPartition);` as the Heads to `glrShift`.




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130523/new/

https://reviews.llvm.org/D130523



More information about the cfe-commits mailing list