llvm-6502/lib/Transforms/Utils
Chandler Carruth 5ea4a54551 [LPM] Fix PR18616 where the shifts to the loop pass manager to extract
LCSSA from it caused a crasher with the LoopUnroll pass.

This crasher is really nasty. We destroy LCSSA form in a suprising way.
When unrolling a loop into an outer loop, we not only need to restore
LCSSA form for the outer loop, but for all children of the outer loop.
This is somewhat obvious in retrospect, but hey!

While this seems pretty heavy-handed, it's not that bad. Fundamentally,
we only do this when we unroll a loop, which is already a heavyweight
operation. We're unrolling all of these hypothetical inner loops as
well, so their size and complexity is already on the critical path. This
is just adding another pass over them to re-canonicalize.

I have a test case from PR18616 that is great for reproducing this, but
pretty useless to check in as it relies on many 10s of nested empty
loops that get unrolled and deleted in just the right order. =/ What's
worse is that investigating this has exposed another source of failure
that is likely to be even harder to test. I'll try to come up with test
cases for these fixes, but I want to get the fixes into the tree first
as they're causing crashes in the wild.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200273 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-28 01:25:38 +00:00
..
ASanStackFrameLayout.cpp [asan] fix ndebug build with strict warnings (-Wunused-variable) 2013-12-06 09:26:09 +00:00
BasicBlockUtils.cpp [PM] Split DominatorTree into a concrete analysis result object which 2014-01-13 13:07:17 +00:00
BreakCriticalEdges.cpp [PM] Split DominatorTree into a concrete analysis result object which 2014-01-13 13:07:17 +00:00
BuildLibCalls.cpp Enable double to float shrinking optimizations for binary functions like 'fmin/fmax'. Fix radar:15283121 2013-12-16 22:42:40 +00:00
BypassSlowDivision.cpp Bypass Slow Divides 2013-03-04 18:13:57 +00:00
CloneFunction.cpp Extend RemapInstruction and friends to take an optional new parameter, a ValueMaterializer. 2013-05-28 15:17:05 +00:00
CloneModule.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
CMakeLists.txt [asan] rewrite asan's stack frame layout 2013-12-06 09:00:17 +00:00
CmpInstAnalysis.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
CodeExtractor.cpp [cleanup] Move the Dominators.h and Verifier.h headers into the IR 2014-01-13 09:26:24 +00:00
DemoteRegToStack.cpp Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
FlattenCFG.cpp Fix known typos 2014-01-24 17:20:08 +00:00
GlobalStatus.cpp Handle calls and invokes in GlobalStatus. 2013-10-25 21:29:52 +00:00
InlineFunction.cpp Fix inlining to not lose the "cleanup" clause from landingpads 2013-12-08 00:51:21 +00:00
InstructionNamer.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
IntegerDivision.cpp Add support for software expansion of 64-bit integer division instructions. 2013-11-19 06:54:19 +00:00
LCSSA.cpp [LPM] Fix PR18616 where the shifts to the loop pass manager to extract 2014-01-28 01:25:38 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Local.cpp [PM] Split DominatorTree into a concrete analysis result object which 2014-01-13 13:07:17 +00:00
LoopSimplify.cpp [LPM] Make LoopSimplify no longer a LoopPass and instead both a utility 2014-01-23 11:23:19 +00:00
LoopUnroll.cpp [LPM] Fix PR18616 where the shifts to the loop pass manager to extract 2014-01-28 01:25:38 +00:00
LoopUnrollRuntime.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
LowerExpectIntrinsic.cpp Fix spelling intruction -> instruction. 2013-09-28 11:46:15 +00:00
LowerInvoke.cpp Remove several unused variables. 2013-10-01 13:32:03 +00:00
LowerSwitch.cpp Revert patches to add case-range support for PR1255. 2013-09-09 19:14:35 +00:00
Makefile
Mem2Reg.cpp [PM] Split DominatorTree into a concrete analysis result object which 2014-01-13 13:07:17 +00:00
MetaRenamer.cpp Add 'const' qualifier to some arrays. 2013-07-15 08:02:13 +00:00
ModuleUtils.cpp Respect llvm.used in Internalize. 2013-07-25 03:23:25 +00:00
PromoteMemoryToRegister.cpp [cleanup] Move the Dominators.h and Verifier.h headers into the IR 2014-01-13 09:26:24 +00:00
SimplifyCFG.cpp PGO branch weight: keep halving the weights until they can fit into 2014-01-27 23:39:03 +00:00
SimplifyIndVar.cpp [cleanup] Move the Dominators.h and Verifier.h headers into the IR 2014-01-13 09:26:24 +00:00
SimplifyInstructions.cpp [PM] Split DominatorTree into a concrete analysis result object which 2014-01-13 13:07:17 +00:00
SimplifyLibCalls.cpp Enable double to float shrinking optimizations for binary functions like 'fmin/fmax'. Fix radar:15283121 2013-12-16 22:42:40 +00:00
SpecialCaseList.cpp Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
SSAUpdater.cpp Basic blocks typically have few predecessors. Use a SmallDenseMap to 2013-10-14 16:05:55 +00:00
UnifyFunctionExitNodes.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
Utils.cpp Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
ValueMapper.cpp Extend RemapInstruction and friends to take an optional new parameter, a ValueMaterializer. 2013-05-28 15:17:05 +00:00