Skip to content

LLVM time trace demangling resulted in a significant (10%?) compile time regression #102222

Closed
@rnk

Description

@rnk

In PR #87626 / 0fa20c5 LLVM began demangling function names when tracing optimization passes. Demangling C++ symbols can be really expensive, and on first glance, it seems we redo this work every time we remangle the same original symbol. There may be some opportunity to improve performance here:

  • Can we memoize the names? Storing the demangled names once and keying them on Function* might speed things up, and it could also reduce memory usage, given that .symtab can often end up being a significant fraction of final object file size (20+%).
  • Are we being lazy enough? Are we sure we are defering the work of demangling the name until after we've confirmed that we time trace scope passes the minimum time trace granularity?

CC @jamieschmeiser @Trass3r

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions