[all-commits] [llvm/llvm-project] f61c29: [NARY-REASSOCIATE] Simplify traversal logic by pos...

llvmbot via All-commits all-commits at lists.llvm.org
Fri Dec 4 01:23:20 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f61c29b3a725a620c67355a519788a96be5d5651
      https://github.com/llvm/llvm-project/commit/f61c29b3a725a620c67355a519788a96be5d5651
  Author: Evgeniy Brevnov <ybrevnov at azul.com>
  Date:   2020-12-04 (Fri, 04 Dec 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/NaryReassociate.cpp
    M llvm/test/Transforms/NaryReassociate/pr24301.ll

  Log Message:
  -----------
  [NARY-REASSOCIATE] Simplify traversal logic by post deleting dead instructions

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.

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D88285




More information about the All-commits mailing list