[all-commits] [llvm/llvm-project] 4e069d: [NFC][BlockFrequency] Move operator definitions in...
Dhruv Chawla via All-commits
all-commits at lists.llvm.org
Tue Jun 13 04:25:50 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4e069d9cf910967c16fa6929cd15ccc20082533e
https://github.com/llvm/llvm-project/commit/4e069d9cf910967c16fa6929cd15ccc20082533e
Author: Dhruv Chawla <44582521+dc03 at users.noreply.github.com>
Date: 2023-06-13 (Tue, 13 Jun 2023)
Changed paths:
M llvm/include/llvm/Support/BlockFrequency.h
M llvm/lib/Support/BlockFrequency.cpp
Log Message:
-----------
[NFC][BlockFrequency] Move operator definitions into header
While BlockFrequency::operator+= is a very simple operation, it's
definition is present in another TU which means that it doesn't get
inlined in non-LTO builds. This means that there is some performance
left on the table in those builds, as this operator is called many
times.
This patch moves that operator (and a few others) into the
BlockFrequency.h header which gives a small speedup (~0.1%):
https://llvm-compile-time-tracker.com/compare.php?from=6ee594be53e7efaa12086ad20f0d0268092a4c73&to=6ac6cd99e211fae5ae5de41ad608604aa22f1882&stat=instructions%3Au
Differential Revision: https://reviews.llvm.org/D152781
More information about the All-commits
mailing list