llvm-6502/lib/Transforms/Utils
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
..
AddDiscriminators.cpp Use DILexicalBlockFile, rather than DILexicalBlock, to track discriminator changes to ensure discriminator changes don't introduce new DWARF DW_TAG_lexical_blocks. 2014-08-21 22:45:21 +00:00
ASanStackFrameLayout.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
BasicBlockUtils.cpp Introduce llvm::SplitAllCriticalEdges 2014-11-19 00:17:31 +00:00
BreakCriticalEdges.cpp Introduce llvm::SplitAllCriticalEdges 2014-11-19 00:17:31 +00:00
BuildLibCalls.cpp Use nullptr instead of NULL for variadic sentinels 2014-11-13 22:55:19 +00:00
BypassSlowDivision.cpp
CloneFunction.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
CloneModule.cpp C API: Add LLVMCloneModule() 2014-10-01 17:14:57 +00:00
CMakeLists.txt Transforms: sort source files in build 2014-11-08 00:00:47 +00:00
CmpInstAnalysis.cpp
CodeExtractor.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
CtorUtils.cpp GlobalOpt: Preserve comdats of unoptimized initializers 2014-09-23 22:33:01 +00:00
DemoteRegToStack.cpp
FlattenCFG.cpp utils: Fix segfault in flattencfg 2014-08-13 20:31:53 +00:00
GlobalStatus.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
InlineFunction.cpp Revert "IR: MDNode => Value" 2014-11-11 21:30:22 +00:00
InstructionNamer.cpp
IntegerDivision.cpp Fix heap-use-after-free bug in expandSDiv when the operands are 2014-11-05 21:28:24 +00:00
LCSSA.cpp
LLVMBuild.txt
Local.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
LoopSimplify.cpp Revert earlier change removing setPreservesCFG from instcombine (r221223) and 2014-11-04 23:02:09 +00:00
LoopUnroll.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
LoopUnrollRuntime.cpp Fix a trip-count overflow issue in LoopUnroll. 2014-11-20 20:19:55 +00:00
LowerExpectIntrinsic.cpp
LowerInvoke.cpp
LowerSwitch.cpp [SwitchLowering] Fix the "fixPhis" function. 2014-11-10 21:05:27 +00:00
Makefile
Mem2Reg.cpp Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
MetaRenamer.cpp
ModuleUtils.cpp Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
PromoteMemoryToRegister.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
SimplifyCFG.cpp Peephole optimization in switch table lookup: reuse the guarding table comparison if possible. 2014-11-27 08:33:51 +00:00
SimplifyIndVar.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
SimplifyInstructions.cpp Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
SimplifyLibCalls.cpp Use nullptr instead of NULL for variadic sentinels 2014-11-13 22:55:19 +00:00
SSAUpdater.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
SymbolRewriter.cpp Remove redundant virtual on overriden functions. 2014-11-14 19:06:36 +00:00
UnifyFunctionExitNodes.cpp
Utils.cpp
ValueMapper.cpp Revert "IR: MDNode => Value" 2014-11-11 21:30:22 +00:00