[PATCH] D126723: [pseudo] GC GSS nodes, reuse them with a freelist

2022-06-08 Thread Sam McCall via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG94b2ca18c10b: [pseudo] GC GSS nodes, reuse them with a freelist (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D126723: [pseudo] GC GSS nodes, reuse them with a freelist

2022-06-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/pseudo/lib/GLR.cpp:78 +// We need to copy the list: Roots is consumed by the GC. +Roots = NewHeads; +GSS.gc(std::move(Roots)); hokein wrote: > nit: I'd rather pass the NewHeads as a vector

[PATCH] D126723: [pseudo] GC GSS nodes, reuse them with a freelist

2022-06-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/pseudo/lib/GLR.cpp:78 +// We need to copy the list: Roots is consumed by the GC. +Roots = NewHeads; +GSS.gc(std::move(Roots)); -

[PATCH] D126723: [pseudo] GC GSS nodes, reuse them with a freelist

2022-06-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added inline comments. Comment at: clang-tools-extra/pseudo/lib/GLR.cpp:391 + llvm::ArrayRef Parents) { + ++NodeCount; + Node *Result = new (allocate(Parents.size())) hokein wrot

[PATCH] D126723: [pseudo] GC GSS nodes, reuse them with a freelist

2022-06-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 434103. sammccall marked 6 inline comments as done. sammccall added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126723/new/ https://reviews.llvm.org/D126723 Files: clang-tools

[PATCH] D126723: [pseudo] GC GSS nodes, reuse them with a freelist

2022-06-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/pseudo/lib/GLR.cpp:87 NewHeads.clear(); +MaybeGC(); glrReduce(PendingReduce, Params, sammccall wrote: > hokein wrote: > > I would just call it before the `NewHeads.clear()`, and run the `gc

[PATCH] D126723: [pseudo] GC GSS nodes, reuse them with a freelist

2022-06-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/pseudo/lib/GLR.cpp:15 #include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/StringExtras.h" hokein wrote: > an off-topic comment: we only use the function in debug bran

[PATCH] D126723: [pseudo] GC GSS nodes, reuse them with a freelist

2022-06-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Nice! I really like the form it goes now. Comment at: clang-tools-extra/pseudo/include/clang-pseudo/GLR.h:82 // FIXME: Most nodes live a fairly short time, and are simply discarded. // Is it worth refcounting them (we have empty padding) and

[PATCH] D126723: [pseudo] GC GSS nodes, reuse them with a freelist

2022-05-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 433201. sammccall added a comment. remove dead variable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126723/new/ https://reviews.llvm.org/D126723 Files: clang-tools-extra/pseudo/include/clang-pseudo/GLR.h

[PATCH] D126723: [pseudo] GC GSS nodes, reuse them with a freelist

2022-05-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added subscribers: usaxena95, kadircet. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, alextsao1999, ilya-biryukov. Herald added a project: clang-tools-extra