llvm-6502/include/llvm/Analysis
Chandler Carruth 6b980541df Refactor the interface to recursively simplifying instructions to be tad
bit simpler by handling a common case explicitly.

Also, refactor the implementation to use a worklist based walk of the
recursive users, rather than trying to use value handles to detect and
recover from RAUWs during the recursive descent. This fixes a very
subtle bug in the previous implementation where degenerate control flow
structures could cause mutually recursive instructions (PHI nodes) to
collapse in just such a way that From became equal to To after some
amount of recursion. At that point, we hit the inf-loop that the assert
at the top attempted to guard against. This problem is defined away when
not using value handles in this manner. There are lots of comments
claiming that the WeakVH will protect against just this sort of error,
but they're not accurate about the actual implementation of WeakVHs,
which do still track RAUWs.

I don't have any test case for the bug this fixes because it requires
running the recursive simplification on unreachable phi nodes. I've no
way to either run this or easily write an input that triggers it. It was
found when using instruction simplification inside the inliner when
running over the nightly test-suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153393 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-24 21:11:24 +00:00
..
AliasAnalysis.h Move isKnownNonNull from private implementation detail of BasicAA to a public 2012-02-25 10:56:28 +00:00
AliasSetTracker.h Make aliasesPointer and aliasesUnknownInst public members of AliasSet. 2012-02-10 15:52:37 +00:00
BlockFrequencyImpl.h Add some constantness to BranchProbabilityInfo and BlockFrequnencyInfo. 2011-12-20 20:03:10 +00:00
BlockFrequencyInfo.h Add some constantness to BranchProbabilityInfo and BlockFrequnencyInfo. 2011-12-20 20:03:10 +00:00
BranchProbabilityInfo.h
CallGraph.h
CaptureTracking.h Move includes to the .cpp file. 2012-01-17 22:16:31 +00:00
CFGPrinter.h Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012: 2012-03-08 07:06:20 +00:00
CodeMetrics.h Pull the implementation of the code metrics out of the inline cost 2012-03-16 05:51:52 +00:00
ConstantFolding.h Split the interesting bits of ConstantFoldLoadThroughGEPConstantExpr 2012-01-24 05:43:50 +00:00
ConstantsScanner.h
DebugInfo.h Remove tabs. 2012-02-08 00:17:07 +00:00
DIBuilder.h Add support for runtime languages on our forward declarations. 2012-02-20 18:04:14 +00:00
DominanceFrontier.h Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:50:00 +00:00
DominatorInternals.h Change the Dominators recalculate() function to only rely on GraphTraits 2011-12-05 19:17:04 +00:00
Dominators.h Change the implementation of dominates(inst, inst) to one based on what the 2012-02-26 02:19:19 +00:00
DomPrinter.h
DOTGraphTraitsPass.h
FindUsedTypes.h
InlineCost.h Start removing the use of an ad-hoc 'never inline' set and instead 2012-03-16 06:10:13 +00:00
InstructionSimplify.h Refactor the interface to recursively simplifying instructions to be tad 2012-03-24 21:11:24 +00:00
Interval.h
IntervalIterator.h Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
IntervalPartition.h Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
IVUsers.h Cleanup IVUsers::addUsersIfInteresting. 2012-03-22 17:47:33 +00:00
LazyValueInfo.h
LibCallAliasAnalysis.h
LibCallSemantics.h
Lint.h
Loads.h enhance jump threading to preserve TBAA information when PRE'ing loads, 2012-03-13 18:07:41 +00:00
LoopDependenceAnalysis.h
LoopInfo.h Simplify more DenseMap.find users. 2012-01-04 21:41:24 +00:00
LoopIterator.h
LoopPass.h
MemoryBuiltins.h
MemoryDependenceAnalysis.h
Passes.h
PathNumbering.h
PathProfileInfo.h
PHITransAddr.h
PostDominators.h
ProfileInfo.h Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
ProfileInfoLoader.h
ProfileInfoTypes.h
RegionInfo.h
RegionIterator.h
RegionPass.h
RegionPrinter.h
ScalarEvolution.h Clarified the SCEV getSmallConstantTripCount interface with in-your-face comments. 2012-01-11 06:52:55 +00:00
ScalarEvolutionExpander.h SCEVExpander fixes. Affects LSR and indvars. 2012-01-20 07:41:13 +00:00
ScalarEvolutionExpressions.h Remove dead code. Improve llvm_unreachable text. Simplify some control flow. 2012-02-19 11:37:01 +00:00
ScalarEvolutionNormalization.h
SparsePropagation.h
Trace.h
ValueTracking.h reapply the patches reverted in r149470 that reenable ConstantDataArray, 2012-02-05 02:29:43 +00:00
Verifier.h