[all-commits] [llvm/llvm-project] 0f0509: [Serialization] Do less redundant work computing a...

Sam McCall via All-commits all-commits at lists.llvm.org
Fri Sep 22 02:23:25 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f05096540bc90125df47983d7013dd440617055
      https://github.com/llvm/llvm-project/commit/0f05096540bc90125df47983d7013dd440617055
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2023-09-22 (Fri, 22 Sep 2023)

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

  Log Message:
  -----------
  [Serialization] Do less redundant work computing affecting module maps (#66933)

We're traversing the same chains of module ancestors and include
locations repeatedly, despite already populating sets that can detect
it!

This is a problem because translateFile() is expensive. I think we can
avoid it entirely, but this seems like an improvement either way.

I removed a callback indirection rather than giving it a more
complicated
signature, and accordingly renamed the lambdas to be more concrete.




More information about the All-commits mailing list