[PATCH] D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment

2021-02-12 Thread Kristóf Umann 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 rG33e731e62dae: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that… (authored by Szelethus). Changed prior to commit:

[PATCH] D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment

2020-09-14 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/Analysis/CFG.h:1311 + + llvm::iterator_range nodes() { return *this; } + llvm::iterator_range const_nodes() const { return *this; } martong wrote: > Do we convert `this` to `CFGBlock *Entry` here?

[PATCH] D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment

2020-09-14 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > This problem only exists if we traverse a CFGBlock in order. And Liveness in > fact does it reverse order. So a distinct pass is indeed unnecessary, we can > note the appearance of the assignment by the time we reach the variable. Should this patch depend on

[PATCH] D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment

2020-09-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/LiveVariables.cpp:332 if (B->isAssignmentOp()) { if (!LV.killAtAssign) return; Nit: Maybe moving this to the front of the function would simplify the code a bit. Repository: rG

[PATCH] D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment

2020-09-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. LGTM! Looks a lot cleaner this way. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87518/new/ https://reviews.llvm.org/D87518

[PATCH] D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment

2020-09-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/LiveVariables.cpp:326 void TransferFunctions::VisitBinaryOperator(BinaryOperator *B) { + if (LV.killAtAssign && B->getOpcode() == BO_Assign) { +if (const auto *DR = dyn_cast(B->getLHS()->IgnoreParens())) {

[PATCH] D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment

2020-09-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/LiveVariables.cpp:326 void TransferFunctions::VisitBinaryOperator(BinaryOperator *B) { + if (LV.killAtAssign && B->getOpcode() == BO_Assign) { +if (const auto *DR = dyn_cast(B->getLHS()->IgnoreParens())) {

[PATCH] D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment

2020-09-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: xazax.hun, NoQ, vsavchenko, martong, balazske, baloghadamsoftware, steakhal. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin,