[all-commits] [llvm/llvm-project] 1617f9: [Analysis] Use *Set::insert_range (NFC) (#132878)

Kazu Hirata via All-commits all-commits at lists.llvm.org
Tue Mar 25 07:52:00 PDT 2025


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

  Changed paths:
    M llvm/lib/Analysis/CGSCCPassManager.cpp
    M llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp
    M llvm/lib/Analysis/InlineCost.cpp
    M llvm/lib/Analysis/MemorySSAUpdater.cpp
    M llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
    M llvm/lib/Analysis/StackSafetyAnalysis.cpp
    M llvm/lib/Analysis/SyntheticCountsUtils.cpp

  Log Message:
  -----------
  [Analysis] Use *Set::insert_range (NFC) (#132878)

We can use *Set::insert_range to collapse:

  for (auto Elem : Range)
    Set.insert(E);

down to:

  Set.insert_range(Range);

In some cases, we can further fold that into the set declaration.



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