[PATCH] D88285: [NARY-REASSOCIATE] Simplify traversal logic by post deleting dead instructions

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 01:42:30 PDT 2020


ebrevnov created this revision.
Herald added subscribers: llvm-commits, javed.absar, hiraditya.
Herald added a project: LLVM.
ebrevnov requested review of this revision.

Currently we delete optimized instructions as we go. That has several negative consequences. First it complicates traversal logic itself. Second if newly generated instruction has been deleted the traversal is repeated from scratch.

But real motivation for the change is upcoming change with support for min/max reassociation. Here we employ SCEV expander to generate code. As a result newly generated instructions may be inserted not right before original instruction (because SCEV may do hoisting) and there is no way to know 'next' instruction.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88285

Files:
  llvm/lib/Transforms/Scalar/NaryReassociate.cpp
  llvm/test/Transforms/NaryReassociate/pr24301.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88285.294249.patch
Type: text/x-patch
Size: 5199 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200925/48f22ecd/attachment.bin>


More information about the llvm-commits mailing list