Go to file
Max Kazantsev 85c988388a [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
clang [Driver] Don't pass default value to getCompilerRTArgString 2019-01-21 01:34:09 +00:00
clang-tools-extra [clang-tidy] misc-non-private-member-variables-in-classes: ignore implicit methods 2019-01-20 14:28:27 +00:00
compiler-rt [fuzzer] Fix test checks broken after license header update 2019-01-21 02:22:06 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
libcxx Fix aligned allocation availability XFAILs after D56445. 2019-01-20 01:21:35 +00:00
libcxxabi Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
libunwind Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
lld Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
lldb Fix test after AST dump output change 2019-01-20 23:46:30 +00:00
llgo [llgo]: fix compilation under current llvm 2019-01-21 04:36:43 +00:00
llvm [SCEV][NFC] Introduces expression sizes estimation 2019-01-21 06:19:50 +00:00
openmp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
parallel-libs Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
polly Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
pstl Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
.arcconfig Add an .arcconfig for the top of the git monorepo. 2019-01-11 16:27:14 +00:00
README.md

README.md

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.