[PATCH] D88285: [NARY-REASSOCIATE] Simplify traversal logic by post deleting dead instructions
Evgeniy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 2 02:26:15 PST 2020
ebrevnov added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/NaryReassociate.cpp:244
+
+ const SCEV *OrigSCEV = SE->getSCEV(OrigI);
+ if (Instruction *NewI = tryReassociate(OrigI)) {
----------------
mkazantsev wrote:
> This is unused outside if, please move def closer to use.
Actually, it is used in else part.
================
Comment at: llvm/lib/Transforms/Scalar/NaryReassociate.cpp:277
+ SeenExprs[OrigSCEV].push_back(WeakTrackingVH(NewI));
+ } else {
+ SeenExprs[OrigSCEV].push_back(WeakTrackingVH(OrigI));
----------------
mkazantsev wrote:
> nit: `{ }` not needed.
Ok
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88285/new/
https://reviews.llvm.org/D88285
More information about the llvm-commits
mailing list