[all-commits] [llvm/llvm-project] 673f47: [llvm] Use *Set::insert_range (NFC) (#133353)

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


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

  Changed paths:
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
    M llvm/lib/IR/SafepointIRVerifier.cpp
    M llvm/lib/ProfileData/SampleProf.cpp
    M llvm/lib/Transforms/Scalar/JumpThreading.cpp
    M llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/lib/Transforms/Vectorize/VPlanSLP.h
    M llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
    M llvm/utils/TableGen/Common/CodeGenRegisters.cpp

  Log Message:
  -----------
  [llvm] Use *Set::insert_range (NFC) (#133353)

We can use *Set::insert_range to collapse:

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

down to:

  Set.insert_range(llvm::make_first_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