llvm-project/llvm/lib
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
..
Analysis [PM] Rework the new PM support for building the ModuleSummaryIndex to 2016-08-19 07:49:19 +00:00
AsmParser [LLVM] Fix some Clang-tidy modernize-use-using and Include What You Use warnings 2016-08-18 17:56:27 +00:00
Bitcode Constify some path in the bitcode writer (NFC) 2016-08-19 06:06:18 +00:00
CodeGen [CodeGen] Fix a trivial type conversion bug dating back to pre-2008 2016-08-19 08:38:50 +00:00
DebugInfo [LLVM] Fix some Clang-tidy modernize-use-using and Include What You Use warnings 2016-08-18 17:56:27 +00:00
ExecutionEngine [RuntimeDyld] Add support for ELF R_ARM_REL32 and R_ARM_GOT_PREL. 2016-08-19 01:15:39 +00:00
Fuzzer [libFuzzer] add more __attribute__((visibility("default"))) 2016-08-18 20:52:52 +00:00
IR Add a version of Intrinsic::getName which is more efficient when there are no overloads. 2016-08-18 18:30:54 +00:00
IRReader Remove autoconf support 2016-01-26 21:29:08 +00:00
LTO [PM] Rework the new PM support for building the ModuleSummaryIndex to 2016-08-19 07:49:19 +00:00
LibDriver Object: Replace NewArchiveIterator with a simpler NewArchiveMember class. NFCI. 2016-06-29 22:27:42 +00:00
LineEditor Fix Clang-tidy modernize-deprecated-headers warnings in some files; other minor fixes. 2016-03-28 17:40:08 +00:00
Linker Linker: Avoid some ridiculous indentation by using a temporary. NFC 2016-08-15 22:41:42 +00:00
MC Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
Object Replace "fallthrough" comments with LLVM_FALLTHROUGH 2016-08-17 05:10:15 +00:00
ObjectYAML [macho2yaml] Don't write empty linkedit data 2016-08-17 21:46:04 +00:00
Option Replace "fallthrough" comments with LLVM_FALLTHROUGH 2016-08-17 05:10:15 +00:00
Passes [PM] Make the the new pass manager support fully generic extra arguments 2016-08-19 09:45:16 +00:00
ProfileData Use range algorithms instead of unpacking begin/end 2016-08-11 21:15:00 +00:00
Support Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
TableGen Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
Target [XRay] Synthesize a reference to the xray_instr_map 2016-08-19 04:44:30 +00:00
Transforms [SimplifyCFG] Rewrite SinkThenElseCodeToEnd 2016-08-19 10:10:27 +00:00
CMakeLists.txt Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
LLVMBuild.txt Add LLVMBuild for ObjectYAML. 2016-03-01 21:29:33 +00:00