llvm-6502/lib/Transforms/Utils
Juergen Ributzka d0995fb982 [SwitchLowering] Fix the "fixPhis" function.
Switch statements may have more than one incoming edge into the same BB if they
all have the same value. When the switch statement is converted these incoming
edges are now coming from multiple BBs. Updating all incoming values to be from
a single BB is incorrect and would generate invalid LLVM IR.

The fix is to only update the first occurrence of an incoming value. Switch
lowering will perform subsequent calls to this helper function for each incoming
edge with a new basic block - updating all edges in the process.

This fixes rdar://problem/18916275.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221627 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-10 21:05:27 +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 Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
BreakCriticalEdges.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
BuildLibCalls.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 05:25:25 +00:00
BypassSlowDivision.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
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 [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
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 [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
FlattenCFG.cpp utils: Fix segfault in flattencfg 2014-08-13 20:31:53 +00:00
GlobalStatus.cpp Remove dangling initializers in GlobalDCE 2014-08-25 17:51:14 +00:00
InlineFunction.cpp Revert "Transforms: reapply SVN r219899" 2014-11-04 02:02:14 +00:00
InstructionNamer.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 09:10:37 +00:00
IntegerDivision.cpp Fix heap-use-after-free bug in expandSDiv when the operands are 2014-11-05 21:28:24 +00:00
LCSSA.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
LLVMBuild.txt
Local.cpp IR: MDNode => Value: Instruction::getAllMetadataOtherThanDebugLoc() 2014-11-03 18:13:57 +00:00
LoopSimplify.cpp Revert earlier change removing setPreservesCFG from instcombine (r221223) and 2014-11-04 23:02:09 +00:00
LoopUnroll.cpp LoopUnroll: Create sub-loops in LoopInfo 2014-10-07 21:19:00 +00:00
LoopUnrollRuntime.cpp Use a loop to simplify the runtime unrolling prologue. 2014-09-29 11:15:00 +00:00
LowerExpectIntrinsic.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
LowerInvoke.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
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 [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 09:10:37 +00:00
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 Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
SimplifyCFG.cpp IR: MDNode => Value: Instruction::getMetadata() 2014-11-01 00:10:31 +00:00
SimplifyIndVar.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
SimplifyInstructions.cpp Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
SimplifyLibCalls.cpp Handle sqrt() shrinking in SimplifyLibCalls like any other call 2014-10-23 21:52:45 +00:00
SSAUpdater.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
SymbolRewriter.cpp Fix extra semicolon warning. NFC. 2014-11-10 17:37:53 +00:00
UnifyFunctionExitNodes.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
Utils.cpp Pass to emit DWARF path discriminators. 2014-03-03 20:06:11 +00:00
ValueMapper.cpp IR: MDNode => Value: Instruction::getAllMetadata() 2014-11-01 00:26:42 +00:00