[all-commits] [llvm/llvm-project] e1e5ed: Update ModuleSummaryIndexBitcodeReader::makeCallLi...

Jan Voung via All-commits all-commits at lists.llvm.org
Thu Jun 20 18:04:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e1e5ed5893c50918dc9b6b56acfe6242f03354dc
      https://github.com/llvm/llvm-project/commit/e1e5ed5893c50918dc9b6b56acfe6242f03354dc
  Author: Jan Voung <jvoung at gmail.com>
  Date:   2024-06-20 (Thu, 20 Jun 2024)

  Changed paths:
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp

  Log Message:
  -----------
  Update ModuleSummaryIndexBitcodeReader::makeCallList reserve amount (#95461)

Tighten the reserve() to `Record.size() / 2` instead of `Record.size()`
in the HasProfile/HasRelBF cases. For the uncommon old profile format
cases we leave it as is, but those should be rare and not worth
optimizing.
This reduces peak memory during ThinLTO indexing by ~3% in one example.

Alternatively, we could make the branching for reserve more complex and
try to cover every case.



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