1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib
Artur Pilipenko c5d63dfc6a [Guards] Introduce loop-predication pass
This patch introduces guard based loop predication optimization. The new LoopPredication pass tries to convert loop variant range checks to loop invariant by widening checks across loop iterations. For example, it will convert

  for (i = 0; i < n; i++) {
    guard(i < len);
    ...
  }

to

  for (i = 0; i < n; i++) {
    guard(n - 1 < len);
    ...
  }

After this transformation the condition of the guard is loop invariant, so loop-unswitch can later unswitch the loop by this condition which basically predicates the loop by the widened condition:

  if (n - 1 < len)
    for (i = 0; i < n; i++) {
      ...
    } 
  else
    deoptimize

This patch relies on an NFC change to make ScalarEvolution::isMonotonicPredicate public (revision 293062).

Reviewed By: sanjoy

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

llvm-svn: 293064
2017-01-25 16:00:44 +00:00
..
Analysis Mark @llvm.powi.* as safe to speculatively execute. 2017-01-25 09:32:30 +00:00
AsmParser ASMParser: use range-based for loops (NFC) 2016-12-27 18:35:22 +00:00
Bitcode [ThinLTO] Fix lazy-loading of MDString instruction attachments 2017-01-20 20:29:16 +00:00
CodeGen Fix buildbot failures introduced by 293036 2017-01-25 09:10:07 +00:00
DebugInfo [pdb] Write the Named Stream mapping to Yaml and binary. 2017-01-20 22:42:09 +00:00
Demangle Demangle: correct demangling for CV-qualified functions 2017-01-24 20:04:58 +00:00
ExecutionEngine RuntimeDyldELF: add LDST128_ABS_LO12_NC reloc 2017-01-23 13:52:08 +00:00
Fuzzer [libFuzzer] mutate empty input using the regular mutators (instead of a custom dummy one). This way when we mutate an empty input there is a chance we will get a dictionary word 2017-01-23 22:52:13 +00:00
IR Do not verify dominator tree if it has no roots 2017-01-25 07:58:10 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LibDriver LibDriver: Allow resource files to be archive members. 2016-12-15 19:37:46 +00:00
LineEditor
Linker [ThinLTO] Import only necessary DICompileUnit fields 2016-12-12 16:09:30 +00:00
LTO [LTO] Teach lib/LTO about the new pass manager. 2017-01-24 00:58:24 +00:00
MC [CodeView] Fix off-by-one error in def range gap emission 2017-01-24 16:57:55 +00:00
Object Fix llvm-objdump so it picks a good CPU based for Mach-O files 2017-01-24 23:41:04 +00:00
ObjectYAML Add LC_BUILD_VERSION load command 2017-01-23 20:07:55 +00:00
Option
Passes [Guards] Introduce loop-predication pass 2017-01-25 16:00:44 +00:00
ProfileData [WebAssembly] Add triple support for the new wasm object format 2017-01-17 20:34:09 +00:00
Support [Support] Use O_CLOEXEC only when declared 2017-01-24 10:57:01 +00:00
TableGen [Hexagon, TableGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-04 02:02:05 +00:00
Target [AArch64] Minor code refactoring. NFC. 2017-01-25 15:56:59 +00:00
Transforms [Guards] Introduce loop-predication pass 2017-01-25 16:00:44 +00:00
XRay Avoid std::errc::protocol_* to appease mingw 2017-01-12 18:33:14 +00:00
CMakeLists.txt [XRay] Define the library for XRay trace logs 2017-01-11 06:39:09 +00:00
LLVMBuild.txt