1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
Go to file
Reid Kleckner f0451463da Fix conditional tail call branch folding when both edges are the same
The conditional tail call logic did the wrong thing when both
destinations of a conditional branch were the same:

BB#1: derived from LLVM BB %entry
    Live Ins: %EFLAGS
    Predecessors according to CFG: BB#0
        JE_1 <BB#5>, %EFLAGS<imp-use,kill>
        JMP_1 <BB#5>

BB#5: derived from LLVM BB %sw.epilog
    Predecessors according to CFG: BB#1
        TCRETURNdi64 <ga:@mergeable_conditional_tailcall>, 0, ...

We would fold the JE_1 to a TCRETURNdi64cc, and then remove our BB#5
successor. Then BB#5 would be deleted as it had no predecessors, leaving
a dangling "JMP_1 <BB#5>" reference behind to cause assertions later.

This patch checks that both conditional branch destinations are
different before doing the transform. The standard branch folding logic
is able to remove both the JMP_1 and the JE_1, and for my test case we
end up forming a better conditional tail call later.

Fixes PR33980

llvm-svn: 309422
2017-07-28 19:48:40 +00:00
bindings [OCaml] Fix undefined reference to LLVMDumpType() with NDEBUG 2017-07-27 21:13:25 +00:00
cmake [CMake] NFC. Add intrinsics_gen target to CMake Exports 2017-07-28 15:33:35 +00:00
docs [docs] change a few code-blocks to llvm from text 2017-07-26 14:11:23 +00:00
examples Defeat another -Wunused-but-set-variable warning 2017-07-19 15:06:31 +00:00
include [GVN] Recommit the patch "Add phi-translate support in scalarpre" 2017-07-28 15:47:25 +00:00
lib Fix conditional tail call branch folding when both edges are the same 2017-07-28 19:48:40 +00:00
projects Add temporary workaround to allow in-tree libc++ builds on Windows 2017-05-11 01:44:30 +00:00
resources
runtimes [CMake] Remove redundant logic in runtimes/CMakeList.txt 2017-07-24 17:26:28 +00:00
test Fix conditional tail call branch folding when both edges are the same 2017-07-28 19:48:40 +00:00
tools [llvm-pdbutil] Clean up ExitOnError usage to add ": " to our errors 2017-07-27 23:13:18 +00:00
unittests [TargetParser] Use enum classes for various ARM kind enums. 2017-07-27 16:27:56 +00:00
utils [lit] Dump some FileCheck inputs to try to debug some failing tests 2017-07-28 16:24:18 +00:00
.arcconfig project_id is from another era in phabricator land and does not provide any value. 2016-09-27 15:47:29 +00:00
.clang-format
.clang-tidy .clang-tidy: correct style name is 'camelBack' not 'lowerCase'. 2016-09-13 19:04:26 +00:00
.gitignore gitignore: Ignore .vs folder (VS2017 config files) 2017-04-08 00:16:58 +00:00
CMakeLists.txt Un-revert "Teach the CMake build system to run lit's test suite. These can be run" 2017-07-27 19:18:35 +00:00
CODE_OWNERS.TXT Remove the BBVectorize pass. 2017-06-30 07:09:08 +00:00
configure Remove autoconf support 2016-01-26 21:29:08 +00:00
CREDITS.TXT Another test commit 2017-07-01 03:24:06 +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. Added a blank line. 2017-03-06 20:45:33 +00:00
RELEASE_TESTERS.TXT [RelTest] Diana is doing both releases now 2017-07-14 08:33:52 +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.