llvm-6502/test
Sanjoy Das 148e8c9b8b Add a new pass "inductive range check elimination"
IRCE eliminates range checks of the form

  0 <= A * I + B < Length

by splitting a loop's iteration space into three segments in a way
that the check is completely redundant in the middle segment.  As an
example, IRCE will convert

  len = < known positive >
  for (i = 0; i < n; i++) {
    if (0 <= i && i < len) {
      do_something();
    } else {
      throw_out_of_bounds();
    }
  }

to

  len = < known positive >
  limit = smin(n, len)
  // no first segment
  for (i = 0; i < limit; i++) {
    if (0 <= i && i < len) { // this check is fully redundant
      do_something();
    } else {
      throw_out_of_bounds();
    }
  }
  for (i = limit; i < n; i++) {
    if (0 <= i && i < len) {
      do_something();
    } else {
      throw_out_of_bounds();
    }
  }


IRCE can deal with multiple range checks in the same loop (it takes
the intersection of the ranges that will make each of them redundant
individually).

Currently IRCE does not do any profitability analysis.  That is a
TODO.

Please note that the status of this pass is *experimental*, and it is
not part of any default pass pipeline.  Having said that, I will love
to get feedback and general input from people interested in trying
this out.

This pass was originally r226201.  It was reverted because it used C++
features not supported by MSVC 2012.

Differential Revision: http://reviews.llvm.org/D6693



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226238 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-16 01:03:22 +00:00
..
Analysis [PM] Port domtree to the new pass manager (at last). 2015-01-14 10:19:28 +00:00
Assembler IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
Bindings IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
Bitcode Revert Don't create new comdats in CodeGen 2015-01-15 16:14:34 +00:00
BugPoint IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
CodeGen R600/SI: Add patterns for v_cvt_{flr|rpi}_i32_f32 2015-01-15 23:58:35 +00:00
DebugInfo IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
ExecutionEngine [MCJIT] Remove a few redundant MCJIT tests, and drop the extraneous datalayout 2015-01-08 18:52:15 +00:00
Feature IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
FileCheck
Instrumentation IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
Integer
JitListener IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
Linker IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
LTO Put this test's input in the Inputs directory where it belongs, rather than 2015-01-12 08:50:47 +00:00
MC [Hexagon] Adding new-value store and bit reverse instructions. 2015-01-15 23:10:29 +00:00
Object Fix edge case when Start overflowed in 32 bit mode 2015-01-15 23:50:44 +00:00
Other [PM] Port TargetLibraryInfo to the new pass manager, provided by the 2015-01-15 11:39:46 +00:00
SymbolRewriter
TableGen
tools Add the option, -archive-headers, used with -macho to print the Mach-O archive headers to llvm-objdump. 2015-01-15 23:19:11 +00:00
Transforms Add a new pass "inductive range check elimination" 2015-01-16 01:03:22 +00:00
Unit
Verifier Rename llvm.recoverframeallocation to llvm.framerecover 2015-01-13 01:51:34 +00:00
YAMLParser
.clang-format
CMakeLists.txt Revert r224149, llvm-dsymutil was already here. 2014-12-12 21:25:07 +00:00
lit.cfg llvm/test/lit.cfg: have_ld_plugin_support(): Use decode() for stdout. 2015-01-05 14:18:04 +00:00
lit.site.cfg.in [lit] Make config.llvm_lib_dir available on cmake, too. 2014-12-30 03:24:11 +00:00
Makefile [lit] Make config.llvm_lib_dir available on cmake, too. 2014-12-30 03:24:11 +00:00
Makefile.tests
TestRunner.sh