[all-commits] [llvm/llvm-project] 2deebc: [RFC] Add and sort decl to maintain order instead ...

Kugan via All-commits all-commits at lists.llvm.org
Tue May 3 09:09:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2deebc0048f92811dc92c7e41d357683b84febf7
      https://github.com/llvm/llvm-project/commit/2deebc0048f92811dc92c7e41d357683b84febf7
  Author: Kugan Vivekanandarajah <kugan at fb.com>
  Date:   2022-05-03 (Tue, 03 May 2022)

  Changed paths:
    M clang/lib/Serialization/ASTWriter.cpp

  Log Message:
  -----------
  [RFC] Add and sort decl to maintain order instead of inserting in order

ASTWriter::associateDeclWithFile shows a lot in clangd perf profile due to O(n^2) behaviour in insertion of DeclIDs in SortedFileDeclIDs. Instead of doing that, this patch just appends it to the DeclIDs vector and sorts them at the end.

Reviewed By: akyrtzi

Differential Revision: https://reviews.llvm.org/D124840




More information about the All-commits mailing list