[all-commits] [llvm/llvm-project] d3d2ea: [PartialInlining] Use DenseSet instead of DenseMap...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Fri Feb 14 02:34:07 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d3d2ea67585f119c99af66a343f19f237891890e
      https://github.com/llvm/llvm-project/commit/d3d2ea67585f119c99af66a343f19f237891890e
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-02-14 (Fri, 14 Feb 2025)

  Changed paths:
    M llvm/lib/Transforms/IPO/PartialInlining.cpp

  Log Message:
  -----------
  [PartialInlining] Use DenseSet instead of DenseMap (NFC) (#127170)

This patch changes the type of VisitedMap to DenseSet from DenseMap
because the value side of the map is always "true".

Technically:

  if (VisitedMap[*SI])

inserts "false" as a value, but the value is immediately overridden
with:

  VisitedMap[*SI] = true;

While we are at it, this patch removes the repeated hash lookups
around the "if" statement.



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