llvm-mirror/lib
Hans Wennborg 6b07d4afc7 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.

llvm-svn: 163302
2012-09-06 09:43:28 +00:00
..
Analysis JumpThreading: when default destination is the destination of some cases in a 2012-09-05 23:45:58 +00:00
Archive Mark checkSignature const, and in turn stop casting away const from 2012-09-05 22:09:23 +00:00
AsmParser [ms-inline asm] Enumerate the InlineAsm dialects and rename the nsdialect to 2012-09-05 19:00:49 +00:00
Bitcode [ms-inline asm] Enumerate the InlineAsm dialects and rename the nsdialect to 2012-09-05 19:00:49 +00:00
CodeGen Add a new optimization pass: Stack Coloring, that merges disjoint static allocations (allocas). Allocas are known to be 2012-09-06 09:17:37 +00:00
DebugInfo Stop casting away const qualifier needlessly. 2012-09-05 22:26:57 +00:00
ExecutionEngine Stop casting away const qualifier needlessly. 2012-09-05 22:26:57 +00:00
Linker Move the "findUsedStructTypes" functionality outside of the Module class. 2012-08-03 00:30:35 +00:00
MC Constify subtarget info properly so that we dont cast away the const in 2012-09-05 21:43:57 +00:00
Object Reverting r 160419. 2012-07-19 21:43:55 +00:00
Support Whitespace. 2012-09-06 03:02:56 +00:00
TableGen Tristate mayLoad, mayStore, and hasSideEffects. 2012-08-23 19:34:46 +00:00
Target Optimize codegen for VSETLNi{8,16,32} operating on Q registers. Degenerate to a VSETLN on D registers, instead of an (INSERT_SUBREG (VSETLN (EXTRACT_SUBREG ))) sequence to help the register coalescer. 2012-09-06 09:16:01 +00:00
Transforms Build lookup tables for switches (PR884) 2012-09-06 09:43:28 +00:00
VMCore Stop casting away const qualifier needlessly. 2012-09-05 22:26:57 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile