llvm-project/llvm
James Molloy 11a1936b70 [SimplifyCFG] Rewrite SinkThenElseCodeToEnd
The new version has several advantages:
  1) IMSHO it's more readable and neater
  2) It handles loads and stores properly
  3) It can handle any number of incoming blocks rather than just two. I'll be taking advantage of this in a followup patch.

With this change we can now finally sink load-modify-store idioms such as:

    if (a)
      return *b += 3;
    else
      return *b += 4;

    =>

    %z = load i32, i32* %y
    %.sink = select i1 %a, i32 5, i32 7
    %b = add i32 %z, %.sink
    store i32 %b, i32* %y
    ret i32 %b

When this works for switches it'll be even more powerful.

llvm-svn: 279229
2016-08-19 10:10:27 +00:00
..
bindings
cmake [CMake] Make llvm-config implicit dependency for subprojects 2016-08-18 21:41:21 +00:00
docs Fix link quotes on AArch64's CompilerWriterInfo section. 2016-08-18 22:10:06 +00:00
examples Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
include [PM] Make the the new pass manager support fully generic extra arguments 2016-08-19 09:45:16 +00:00
lib [SimplifyCFG] Rewrite SinkThenElseCodeToEnd 2016-08-19 10:10:27 +00:00
projects
resources
runtimes [CMake] Add variables for tracking which runtimes are included 2016-08-18 22:18:11 +00:00
test [SimplifyCFG] Rewrite SinkThenElseCodeToEnd 2016-08-19 10:10:27 +00:00
tools llvm-objdump: Add Hexagon printer changes for -S/-l options 2016-08-18 21:50:13 +00:00
unittests [PM] Fix a compile error with GCC. NFC. 2016-08-19 09:53:10 +00:00
utils Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [CMake] Silence message on multi-configuration generators 2016-08-18 18:17:28 +00:00
CODE_OWNERS.TXT test commit 2016-08-02 19:25:17 +00:00
CREDITS.TXT Shamelessly add myself to CREDITS.TXT 2016-08-04 16:28:22 +00:00
LICENSE.TXT Remove autoconf references from LICENSE.TXT 2016-08-12 20:11:03 +00:00
LLVMBuild.txt
README.txt Revert rL277454 2016-08-02 13:26:07 +00:00
RELEASE_TESTERS.TXT Adding RELEASE_TESTERS.TXT 2016-07-21 16:46:44 +00:00
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.