[all-commits] [llvm/llvm-project] d6d824: [LTO] Use DenseSet in computeLTOCacheKey (NFC) (#1...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Wed Aug 21 07:20:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d6d8243dcd4ea768549904036ed31b8e59e14c73
      https://github.com/llvm/llvm-project/commit/d6d8243dcd4ea768549904036ed31b8e59e14c73
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M llvm/include/llvm/LTO/LTO.h
    M llvm/lib/LTO/LTO.cpp

  Log Message:
  -----------
  [LTO] Use DenseSet in computeLTOCacheKey (NFC) (#105466)

The two instances of std::set are used only for membership checking
purposes in computeLTOCacheKey.  We do not need std::set's strengths
like iterators staying valid or the ability to traverse in a sorted
order.  This patch changes them to DenseSet.

While I am at it, this patch replaces count with contains for slightly
increased readability.



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