llvm-6502/lib/Transforms
Hans Wennborg 486270aee6 Build lookup tables for switches (PR884)
This adds a transformation to SimplifyCFG that attemps to turn switch
instructions into loads from lookup tables. It works on switches that
are only used to initialize one or more phi nodes in a common successor
basic block, for example:

  int f(int x) {
    switch (x) {
    case 0: return 5;
    case 1: return 4;
    case 2: return -2;
    case 5: return 7;
    case 6: return 9;
    default: return 42;
  }

This speeds up the code by removing the hard-to-predict jump, and
reduces code size by removing the code for the jump targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163302 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-06 09:43:28 +00:00
..
Hello Since the Hello pass is built as a loadable dynamic library, don't try to convert it to new-style registration yet. 2010-10-07 00:31:16 +00:00
InstCombine InstCombine: Fix comment to reflect the code. 2012-08-30 15:07:40 +00:00
Instrumentation [asan] fix lint 2012-09-05 09:00:18 +00:00
IPO Make MemoryBuiltins aware of TargetLibraryInfo. 2012-08-29 15:32:21 +00:00
Scalar Update function names to conform to guidelines. 2012-09-06 00:59:08 +00:00
Utils Build lookup tables for switches (PR884) 2012-09-06 09:43:28 +00:00
Vectorize Make MemoryBuiltins aware of TargetLibraryInfo. 2012-08-29 15:32:21 +00:00
CMakeLists.txt Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00
LLVMBuild.txt Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00
Makefile Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00