llvm-6502/lib/Transforms/Utils
Chandler Carruth d5a9ea8afe [LPM] A terribly simple fix to a terribly complex bug: PR18773.
The crux of the issue is that LCSSA doesn't preserve stateful alias
analyses. Before r200067, LICM didn't cause LCSSA to run in the LTO pass
manager, where LICM runs essentially without any of the other loop
passes. As a consequence the globalmodref-aa pass run before that loop
pass manager was able to survive the loop pass manager and be used by
DSE to eliminate stores in the function called from the loop body in
Adobe-C++/loop_unroll (and similar patterns in other benchmarks).

When LICM was taught to preserve LCSSA it had to require it as well.
This caused it to be run in the loop pass manager and because it did not
preserve AA, the stateful AA was lost. Most of LLVM's AA isn't stateful
and so this didn't manifest in most cases. Also, in most cases LCSSA was
already running, and so there was no interesting change.

The real kicker is that LCSSA by its definition (injecting PHI nodes
only) trivially preserves AA! All we need to do is mark it, and then
everything goes back to working as intended. It probably was blocking
some other weird cases of stateful AA but the only one I have is
a 1000-line IR test case from loop_unroll, so I don't really have a good
test case here.

Hopefully this fixes the regressions on performance that have been seen
since that revision.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201104 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 19:39:35 +00:00
..
ASanStackFrameLayout.cpp
BasicBlockUtils.cpp
BreakCriticalEdges.cpp [LPM] Fix PR18643, another scary place where loop transforms failed to 2014-01-29 13:16:53 +00:00
BuildLibCalls.cpp
BypassSlowDivision.cpp
CloneFunction.cpp
CloneModule.cpp
CMakeLists.txt
CmpInstAnalysis.cpp
CodeExtractor.cpp
DemoteRegToStack.cpp
FlattenCFG.cpp Fix known typos 2014-01-24 17:20:08 +00:00
GlobalStatus.cpp
InlineFunction.cpp
InstructionNamer.cpp
IntegerDivision.cpp
LCSSA.cpp [LPM] A terribly simple fix to a terribly complex bug: PR18773. 2014-02-10 19:39:35 +00:00
LLVMBuild.txt
Local.cpp
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
LowerExpectIntrinsic.cpp Lower llvm.expect intrinsic correctly for i1 2014-02-02 22:43:55 +00:00
LowerInvoke.cpp
LowerSwitch.cpp
Makefile
Mem2Reg.cpp
MetaRenamer.cpp
ModuleUtils.cpp Respect llvm.used in Internalize. 2013-07-25 03:23:25 +00:00
PromoteMemoryToRegister.cpp
SimplifyCFG.cpp Fix pr14893. 2014-01-28 16:56:46 +00:00
SimplifyIndVar.cpp
SimplifyInstructions.cpp
SimplifyLibCalls.cpp SimplifyLibCalls: Push TLI through the exp2->ldexp transform. 2014-02-04 20:27:23 +00:00
SpecialCaseList.cpp
SSAUpdater.cpp Remove some unused #includes 2014-02-01 13:12:54 +00:00
UnifyFunctionExitNodes.cpp
Utils.cpp
ValueMapper.cpp