[all-commits] [llvm/llvm-project] 589593: [RISCV][VLOpt] Reorganize visit order and worklist...

Philip Reames via All-commits all-commits at lists.llvm.org
Wed Jan 22 10:42:37 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 589593254eede2f624f29390dc1018725e536505
      https://github.com/llvm/llvm-project/commit/589593254eede2f624f29390dc1018725e536505
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2025-01-22 (Wed, 22 Jan 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp

  Log Message:
  -----------
  [RISCV][VLOpt] Reorganize visit order and worklist management (#123973)

This implements a suggestion by Craig in PR #123878. We can move the
worklist management out of the per-instruction work and do it once at
the end of scanning all the instructions. This should reduce repeat
visitation of the same instruction when no changes can be made.

Note that this does not remove the inherent O(N^2) in the algorithm.
We're still potentially visiiting every user of every def.

I also included a guard for unreachable blocks since that had been
mentioned as a possible cause. It seems we've rulled that out, but
guarding for this case is still a good idea.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list