llvm-6502/lib
Erik Eckstein c394c42d6d Peephole optimization in switch table lookup: reuse the guarding table comparison if possible.
This optimization tries to reuse the generated compare instruction, if there is a comparison against the default value after the switch.
Example:
    if (idx < tablesize)
       r = table[idx]; // table does not contain default_value
    else
       r = default_value;
    if (r != default_value)
       ...
Is optimized to:
    cond = idx < tablesize;
    if (cond)
       r = table[idx];
    else
       r = default_value;
    if (cond)
       ...
\endcode
Jump threading will then eliminate the second if(cond).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222872 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-27 08:33:51 +00:00
..
Analysis InstSimplify: Restore optimizations lost in r210006 2014-11-27 06:32:46 +00:00
AsmParser
Bitcode Add and use Type::subtypes. NFC. 2014-11-24 20:44:36 +00:00
CodeGen Converted back to Unix format (after my last commit 222632) 2014-11-23 15:21:53 +00:00
DebugInfo
ExecutionEngine Add LLVMObject to LLVMExecutionEngine. 2014-11-27 06:36:22 +00:00
IR Revert r220349 to re-instate r220277 with a fix for PR21330 -- quite 2014-11-25 08:20:27 +00:00
IRReader
LineEditor
Linker Set the body of a new struct as soon as it is created. 2014-11-25 15:33:40 +00:00
LTO
MC Reapply 222538 and update tests to explicitly request small code model 2014-11-25 13:37:55 +00:00
Object Object/COFF: Fix off-by-one error for object having lots of relocations 2014-11-26 22:17:25 +00:00
Option
ProfileData
Support [msan] Annotate zlib functions for MemorySanitizer. 2014-11-25 15:24:07 +00:00
TableGen
Target R600/SI: Use ZeroOrNegativeOneBooleanContent 2014-11-26 21:23:15 +00:00
Transforms Peephole optimization in switch table lookup: reuse the guarding table comparison if possible. 2014-11-27 08:33:51 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile