llvm-project/llvm
Kazu Hirata 0a0ccc85bb [ModuleInliner] Factor out common code in InlineOrder.cpp (NFC)
This patch factors out common code in InlineOrder.cpp.

Without this patch, the model is to ask classes like SizePriority and
CostPriority to compare a pair of call sites:

  bool hasLowerPriority(const CallBase *L, const CallBase *R) const override {

while these priority classes have their own caches of priorities:

  DenseMap<const CallBase *, PriorityT> Priorities;

This model results in a lot of duplicate code like hasLowerPriority
and updateAndCheckDecreased.

This patch changes the model so that priority classes just have two
methods to compute a priority for a given call site and to compare two
previously computed priorities (as opposed to call sites).

Facilities like hasLowerPriority and updateAndCheckDecreased move to
PriorityInlineOrder along with the map from call sites to their
priorities.  PriorityInlineOrder becomes a template class so that it
can accommodate different priority classes.

Differential Revision: https://reviews.llvm.org/D134149
2022-09-21 08:50:30 -07:00
..
benchmarks
bindings [ConstantExpr] Remove fneg expression 2022-09-08 10:24:55 +02:00
cmake Fix -fuse-ld to be linker flag in feature detection check 2022-09-21 04:01:57 +00:00
docs [LangRef][Docs] Align RST syntax for GC intrinsics 2022-09-21 16:46:33 +01:00
examples
include LICM: Pass through AssumptionCache 2022-09-21 09:16:17 -04:00
lib [ModuleInliner] Factor out common code in InlineOrder.cpp (NFC) 2022-09-21 08:50:30 -07:00
projects
resources
runtimes [NFC] Fix typo in comment 2022-09-20 17:22:08 -04:00
test [lit] Implement DEFINE and REDEFINE directives 2022-09-21 11:32:05 -04:00
tools [llvm-reduce] Update NoChunks initializer to be in line with AllChunks. 2022-09-21 15:50:30 +01:00
unittests Change isLittleEndian to follow llvm style and add an accessor 2022-09-20 17:00:47 -07:00
utils [lit] Implement DEFINE and REDEFINE directives 2022-09-21 11:32:05 -04:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Revert "[llvm] Remove libcxx, libcxxabi and libunwind from supported LLVM_ENABLE_PROJECTS" 2022-09-21 08:38:00 -04:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.