Fork of llvm with experimental commits and workarounds for RPCS3
Go to file
Max Kazantsev f0c38d90c7 [SCEV][NFC] Introduces expression sizes estimation
This patch introduces the field `ExpressionSize` in SCEV. This field is
calculated only once on SCEV creation, and it represents the complexity of
this SCEV from arithmetical point of view (not from the point of the number
of actual different SCEV nodes that are used in the expression). Roughly
saying, it is the number of operands and operations symbols when we print this
SCEV.

A formal definition is following: if SCEV `X` has operands
  `Op1`, `Op2`, ..., `OpN`,
then
  Size(X) = 1 + Size(Op1) + Size(Op2) + ... + Size(OpN).
Size of SCEVConstant and SCEVUnknown is one.

Expression size may be used as a universal way to limit SCEV transformations
for huge SCEVs. Currently, we have a bunch of options that represents various
limits (such as recursion depth limit) that may not make any sense from the
point of view of a LLVM users who is not familiar with SCEV internals, and all
these different options pursue one goal. A more general rule that may
potentially allow us to get rid of this redundancy in options is "do not make
transformations with SCEVs of huge size". It can apply to all SCEV traversals
and transformations that may need to visit a SCEV node more than once, hence
they are prone to combinatorial explosions.

This patch only introduces SCEV sizes calculation as NFC, its utilization will
be introduced in follow-up patches.

Differential Revision: https://reviews.llvm.org/D35989
Reviewed By: reames

llvm-svn: 351725
2019-01-21 06:19:50 +00:00
benchmarks
bindings Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
cmake [AVR] Allow AVR to be explicitly set as the default target triple 2019-01-20 11:12:39 +00:00
docs Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> 2019-01-20 21:19:56 +00:00
examples Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
include [SCEV][NFC] Introduces expression sizes estimation 2019-01-21 06:19:50 +00:00
lib [SCEV][NFC] Introduces expression sizes estimation 2019-01-21 06:19:50 +00:00
projects Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
resources
runtimes
test [RISCV] Add R_RISCV_RELAX relocation to all possible relax candidates. 2019-01-21 05:27:09 +00:00
tools Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> 2019-01-20 21:19:56 +00:00
unittests [SCEV][NFC] Introduces expression sizes estimation 2019-01-21 06:19:50 +00:00
utils make XFAIL, REQUIRES, and UNSUPPORTED support multi-line expressions 2019-01-20 00:51:02 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore Git ignore CLion project configuration files. NFC 2019-01-02 19:58:07 +00:00
CMakeLists.txt Revert r351324 "Build LLVM-C.dll by default on windows and enable in release package" 2019-01-16 12:36:28 +00:00
CODE_OWNERS.TXT [llvm-mca] Move llvm-mca library to llvm/lib/MCA. 2018-12-17 08:08:31 +00:00
configure
CREDITS.TXT Remove a period from CREDITS.TXT (testing email change). NFC 2019-01-19 09:07:38 +00:00
LICENSE.TXT Install new LLVM license structure and new developer policy. 2019-01-19 06:14:24 +00:00
llvm.spec.in Update structured references to the license to the new license. 2019-01-19 11:30:51 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
README.txt
RELEASE_TESTERS.TXT Update the list of platforms & archs 2018-12-16 14:47:16 +00:00

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.