1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/lib/Transforms
Hans Wennborg f5c5f6e123 Switch-to-lookup tables: Don't require a result for the default
case when the lookup table doesn't have any holes.

This means we can build a lookup table for switches like this:

  switch (x) {
    case 0: return 1;
    case 1: return 2;
    case 2: return 3;
    case 3: return 4;
    default: exit(1);
  }

The default case doesn't yield a constant result here, but that doesn't matter,
since a default result is only necessary for filling holes in the lookup table,
and this table doesn't have any holes.

This makes us transform 505 more switches in a clang bootstrap, and shaves 164 KB
off the resulting clang binary.

llvm-svn: 199025
2014-01-12 00:44:41 +00:00
..
Hello Set LLVM_EXPORTED_SYMBOL_FILE in CMakeLists whose corresponding Makefiles do so. 2013-12-29 23:06:49 +00:00
InstCombine Fix a bug about generating undef operand when optimising shuffle vector and insert element in instruction combine. 2014-01-08 03:06:15 +00:00
Instrumentation Move the LLVM IR asm writer header files into the IR directory, as they 2014-01-07 12:34:26 +00:00
IPO Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
ObjCARC Correct word hyphenations 2013-12-05 05:44:44 +00:00
Scalar Extend and simplify the sample profile input file. 2014-01-10 23:23:51 +00:00
Utils Switch-to-lookup tables: Don't require a result for the default 2014-01-12 00:44:41 +00:00
Vectorize LoopVectorizer: Enable strided memory accesses versioning per default 2014-01-11 20:40:34 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile