1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/include/llvm/Analysis
Dale Johannesen 816f9bc81d Fix the time regression I introduced in 464.h264ref with
my earlier patch to this file.

The issue there was that all uses of an IV inside a loop
are actually references to Base[IV*2], and there was one
use outside that was the same but LSR didn't see the base
or the scaling because it didn't recurse into uses outside
the loop; thus, it used base+IV*scale mode inside the loop
instead of pulling base out of the loop.  This was extra bad
because register pressure later forced both base and IV into
memory.  Doing that recursion, at least enough
to figure out addressing modes, is a good idea in general;
the change in AddUsersIfInteresting does this.  However,
there were side effects....

It is also possible for recursing outside the loop to
introduce another IV where there was only 1 before (if
the refs inside are not scaled and the ref outside is).
I don't think this is a common case, but it's in the testsuite.
It is right to be very aggressive about getting rid of
such introduced IVs (CheckForIVReuse and the handling of
nonzero RewriteFactor in StrengthReduceStridedIVUsers).
In the testcase in question the new IV produced this way
has both a nonconstant stride and a nonzero base, neither
of which was handled before.  And when inserting 
new code that feeds into a PHI, it's right to put such 
code at the original location rather than in the PHI's 
immediate predecessor(s) when the original location is outside 
the loop (a case that couldn't happen before)
(RewriteInstructionToUseNewBase); better to avoid making
multiple copies of it in this case.

Also, the mechanism for keeping SCEV's corresponding to GEP's
no longer works, as the GEP might change after its SCEV
is remembered, invalidating the SCEV, and we might get a bad
SCEV value when looking up the GEP again for a later loop.  
This also couldn't happen before, as we weren't recursing
into GEP's outside the loop.

Also, when we build an expression that involves a (possibly
non-affine) IV from a different loop as well as an IV from
the one we're interested in (containsAddRecFromDifferentLoop),
don't recurse into that.  We can't do much with it and will
get in trouble if we try to create new non-affine IVs or something.

More testcases are coming.

llvm-svn: 62212
2009-01-14 02:35:31 +00:00
..
AliasAnalysis.h Update comments. There is no getArgumentAccesses. 2008-12-05 05:35:21 +00:00
AliasSetTracker.h
CallGraph.h Teach internalize to preserve the callgraph. 2008-10-03 07:36:09 +00:00
CFGPrinter.h
ConstantFolding.h
ConstantsScanner.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
DebugInfo.h Add classof() methods to support isa<> and other related facilities. 2009-01-12 21:38:43 +00:00
DominatorInternals.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
Dominators.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
EscapeAnalysis.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
FindUsedTypes.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
Interval.h
IntervalIterator.h
IntervalPartition.h Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
LibCallAliasAnalysis.h
LibCallSemantics.h
LoopInfo.h Fix the time regression I introduced in 464.h264ref with 2009-01-14 02:35:31 +00:00
LoopPass.h Fix typo. 2008-11-26 18:13:11 +00:00
LoopVR.h
MemoryDependenceAnalysis.h Implement initial support for PHI translation in memdep. This means that 2008-12-15 03:35:32 +00:00
Passes.h Add -print-dbginfo pass that prints LLVM IR with comments inserted to show 2008-12-16 09:09:19 +00:00
PostDominators.h Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
ProfileInfo.h
ProfileInfoLoader.h
ProfileInfoTypes.h
ScalarEvolution.h Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295, 2009-01-13 09:18:58 +00:00
ScalarEvolutionExpander.h Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295, 2009-01-13 09:18:58 +00:00
ScalarEvolutionExpressions.h Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295, 2009-01-13 09:18:58 +00:00
SparsePropagation.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
Trace.h
ValueTracking.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
Verifier.h