[all-commits] [llvm/llvm-project] 58f3b0: [CodeGen] Optimize/simplify finalizeBundle. NFC (#...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Tue Aug 26 23:54:24 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58f3b0dd8d7b2e09d82dae95908cf34ef50468af
      https://github.com/llvm/llvm-project/commit/58f3b0dd8d7b2e09d82dae95908cf34ef50468af
  Author: Björn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2025-08-27 (Wed, 27 Aug 2025)

  Changed paths:
    M llvm/lib/CodeGen/MachineInstrBundle.cpp

  Log Message:
  -----------
  [CodeGen] Optimize/simplify finalizeBundle. NFC (#155448)

When tracking defs in finalizeBundle two sets are used. LocalDefs is
used to track defined virtual and physical registers, while LocalDefsP
is used to track defined register units for the physical registers.

This patch moves the updates of LocalDefsP to only iterate over regunits
when a new physical register is added to LocalDefs. When the physical
register already is present in LocalDefs, then the corresponding
register units are present in LocalDefsP. So it was a waste of time to
add them to the set again.



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