[all-commits] [llvm/llvm-project] c9197b: [AMDGPU] Use MapVector instead of DenseMap (NFC) (...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Thu Mar 27 20:34:44 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c9197b27b484713c312c16cad12f9b518c1323c5
      https://github.com/llvm/llvm-project/commit/c9197b27b484713c312c16cad12f9b518c1323c5
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-03-27 (Thu, 27 Mar 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp

  Log Message:
  -----------
  [AMDGPU] Use MapVector instead of DenseMap (NFC) (#133356)

This patch combines:

  DenseMap<MachineBasicBlock *, bool> ReachableMap;
  SmallVector<MachineBasicBlock *, 4> ReachableOrdered;

into:

  MapVector<MachineBasicBlock *, bool> ReachableMap;

because we add elements to the two data structures in lockstep, and we
care about preserving the insertion order.

As a side benefit, we get to avoid hash lookups at:

  ReachableMap[MBB] = true;



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