[all-commits] [llvm/llvm-project] b9dec5: [NFC] Remove goto in PromoteMem2Reg::RenamePass (#...

Vitaly Buka via All-commits all-commits at lists.llvm.org
Tue Jun 3 09:14:26 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9dec5aa793fbdb3b5db6b240f28bd18f13dbc9e
      https://github.com/llvm/llvm-project/commit/b9dec5aa793fbdb3b5db6b240f28bd18f13dbc9e
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2025-06-03 (Tue, 03 Jun 2025)

  Changed paths:
    M llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp

  Log Message:
  -----------
  [NFC] Remove goto in PromoteMem2Reg::RenamePass (#142454)

'goto' is essentially a shortcut for push/pop for worklist.
It can be expensive if we copy vectors, but if we move them, it
should not be an issue.

Without 'goto' it's easier to reason about the
code, when `PromoteMem2Reg::RenamePass` processes
exactly one edge at a time.

There is out of order processing of the first
successor, I keep it just to make this patch pure NFC. I'll
remove this in follow up patches.

For #142461



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