[all-commits] [llvm/llvm-project] 63a8ca: [LegacyPM] Call getPassName only when needed

aengelke via All-commits all-commits at lists.llvm.org
Wed Apr 12 09:36:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 63a8ca3fe97d36ccd263f7d4ac18a9942b4d0333
      https://github.com/llvm/llvm-project/commit/63a8ca3fe97d36ccd263f7d4ac18a9942b4d0333
  Author: Alexis Engelke <engelke at in.tum.de>
  Date:   2023-04-12 (Wed, 12 Apr 2023)

  Changed paths:
    M llvm/lib/IR/LegacyPassManager.cpp

  Log Message:
  -----------
  [LegacyPM] Call getPassName only when needed

Even when time tracing is disabled, getPassName is currently still
called. This adds an avoidable virtual function call for each pass.
Fetching the pass name only when required slightly improves
compile-time (particularly when LLVM is built without LTO).

Reviewed By: nikic, MaskRay

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




More information about the All-commits mailing list