1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Go to file
Bjorn Pettersson cf2613b8b2 [BranchFolding] Salvage DBG_VALUE instructions from empty blocks
Summary:
This patch will introduce copying of DBG_VALUE instructions
from an otherwise empty basic block to predecessor/successor
blocks in case the empty block is eliminated/bypassed. It
is currently only done in one identified situation in the
BranchFolding pass, before optimizing on empty block.
It can be seen as a light variant of the propagation done
by the LiveDebugValues pass, which unfortunately is executed
after the BranchFolding pass.

We only propagate (copy) DBG_VALUE instructions in a limited
number of situations:
 a) If the empty BB is the only predecessor of a successor
    we can copy the DBG_VALUE instruction to the beginning of
    the successor (because the DBG_VALUE instruction is always
    part of the flow between the blocks).
 b) If the empty BB is the only successor of a predecessor
    we can copy the DBG_VALUE instruction to the end of the
    predecessor (because the DBG_VALUE instruction is always
    part of the flow between the blocks). In this case we add
    the DBG_VALUE just before the first terminator (assuming
    that the terminators do not impact the DBG_VALUE).

A future solution, to handle more situations, could perhaps
be to run the LiveDebugValues pass before branch folding?

This fix is related to PR37234. It is expected to resolve
the problem seen, when applied together with the fix in
SelectionDAG from here: https://reviews.llvm.org/D46129

Reviewers: #debug-info, aprantl, rnk

Reviewed By: #debug-info, aprantl

Subscribers: ormris, gbedwell, llvm-commits

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

llvm-svn: 331183
2018-04-30 14:37:46 +00:00
bindings [bindings] Fix dibuilder go bindings after r331114. 2018-04-30 12:48:45 +00:00
cmake [cmake] Make linker detection take flags into account 2018-04-26 06:04:46 +00:00
docs NFC - Typo fixes lib/VMCore -> lib/IR 2018-04-30 10:18:11 +00:00
examples s/LLVM_ON_WIN32/_WIN32/, llvm 2018-04-29 00:45:03 +00:00
include [SelectionDAG] Improve selection of DBG_VALUE using a PHI node result 2018-04-30 14:37:39 +00:00
lib [BranchFolding] Salvage DBG_VALUE instructions from empty blocks 2018-04-30 14:37:46 +00:00
projects [cmake] Support moving debuginfo-tests to llvm/projects 2017-12-12 17:06:08 +00:00
resources
runtimes [CMake] Enable warnings for runtimes 2018-04-27 15:10:50 +00:00
test [BranchFolding] Salvage DBG_VALUE instructions from empty blocks 2018-04-30 14:37:46 +00:00
tools [llvm-mca] Support for in-order CPU for -instruction-tables testing. 2018-04-30 12:05:34 +00:00
unittests s/LLVM_ON_WIN32/_WIN32/, llvm 2018-04-29 00:45:03 +00:00
utils NFC - Typo fixes lib/VMCore -> lib/IR 2018-04-30 10:18:11 +00:00
.arcconfig [llvm] Set up .arcconfig to point to Diffusion L repository 2018-01-12 15:37:41 +00:00
.clang-format
.clang-tidy
.gitattributes [MC] Fix regression tests on Windows when git “core.autocrlf” is set to true. 2017-11-17 21:59:43 +00:00
.gitignore gitignore: Ignore .vs folder (VS2017 config files) 2017-04-08 00:16:58 +00:00
CMakeLists.txt Remove LLVM_INSTALL_CCTOOLS_SYMLINKS 2018-04-24 15:41:02 +00:00
CODE_OWNERS.TXT [CODE_OWNERS] Update my email address. 2018-04-23 19:09:49 +00:00
configure
CREDITS.TXT Update my email address and description. 2018-04-29 01:13:57 +00:00
LICENSE.TXT Bump year to 2017 in LICENSE.txt 2017-01-12 18:02:42 +00:00
llvm.spec.in
LLVMBuild.txt
README.txt Test commit access 2017-08-18 02:39:28 +00:00
RELEASE_TESTERS.TXT Update my email addresses, NFC. 2017-10-26 10:16:54 +00:00

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.