[all-commits] [llvm/llvm-project] 3745a2: [clang][bytecode][NFC] Cache the BuiltinID in Func...

Timm Baeder via All-commits all-commits at lists.llvm.org
Fri Aug 30 16:51:20 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3745a2e8ab10029f8f401f5ff3c3c76c12e94822
      https://github.com/llvm/llvm-project/commit/3745a2e8ab10029f8f401f5ff3c3c76c12e94822
  Author: Timm Baeder <tbaeder at redhat.com>
  Date:   2024-08-31 (Sat, 31 Aug 2024)

  Changed paths:
    M clang/lib/AST/ByteCode/ByteCodeEmitter.cpp
    M clang/lib/AST/ByteCode/Function.cpp
    M clang/lib/AST/ByteCode/Function.h

  Log Message:
  -----------
  [clang][bytecode][NFC] Cache the BuiltinID in Function (#106745)

FunctionDecl::getBuiltinID() is surprisingly slow and we tend to call it
quite a bit, especially when interpreting builtin functions. Caching the
BuiltinID here reduces the time I need to compile the
floating_comparison namespace from builtin-functions.cpp from 7.2s to
6.3s locally.



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