hanchenye-llvm-project/llvm
Dean Michael Berris 22f2bcf4b9 [XRay] Detect loops in functions being lowered
Summary:
This is an implementation of the loop detection logic that XRay needs to
determine whether a function might take time at runtime. Without this
heuristic, XRay will tend to not instrument short functions that have
loops that might have runtime dependent on inputs or external values.

While this implementation doesn't do any further analysis than just
figuring out whether there is a loop in the MachineFunction being
code-gen'ed, we're paving the way for being able to perform more
sophisticated analysis of the function in the future (for example to
determine whether the trip count for the loop might be constant, and
make a decision on that instead). This enables us to cover more
functions with the default heuristics, and potentially identify ones
that have variable runtime latency just by looking for the presence of
loops.

Reviewers: chandlerc, rnk, pelikan

Subscribers: llvm-commits

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

llvm-svn: 302103
2017-05-04 01:24:26 +00:00
..
bindings [go bindings] Rmove duplicated conversion function definitions after r300843. 2017-04-20 19:06:11 +00:00
cmake Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake" 2017-05-03 17:22:23 +00:00
docs Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake" 2017-05-03 17:22:23 +00:00
examples Module::getOrInsertFunction is using C-style vararg instead of variadic templates. 2017-04-11 15:01:18 +00:00
include [SCEV] createAddRecFromPHI: Optimize for the most common case. 2017-05-03 23:53:38 +00:00
lib [XRay] Detect loops in functions being lowered 2017-05-04 01:24:26 +00:00
projects
resources
runtimes [CMake][runtimes] Use -nodefaultlibs for the runtimes build 2017-04-13 21:29:03 +00:00
test [XRay] Detect loops in functions being lowered 2017-05-04 01:24:26 +00:00
tools Remove unused private field. 2017-05-03 19:42:06 +00:00
unittests [AArch64] Make the TargetParser add CPU exts provided by the arch. 2017-05-03 20:33:58 +00:00
utils [IR] Abstract away ArgNo+1 attribute indexing as much as possible 2017-05-03 18:17:31 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore gitignore: Ignore .vs folder (VS2017 config files) 2017-04-08 00:16:58 +00:00
CMakeLists.txt CMake: Add LLVM_DYLIB_SYMBOL_VERSIONING option 2017-05-03 14:43:44 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

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.