1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

19 Commits

Author SHA1 Message Date
Daniel Dunbar
8adb7774dc Reapply r97010, the speculative revert failed.
llvm-svn: 97036
2010-02-24 08:48:04 +00:00
Daniel Dunbar
8b33ce41d0 Speculatively revert r97010, "Add an argument to PHITranslateValue to specify
the DominatorTree. ...", in hopes of restoring poor old PPC bootstrap.

llvm-svn: 97027
2010-02-24 06:55:22 +00:00
Bob Wilson
437d85dd57 Add an argument to PHITranslateValue to specify the DominatorTree. If this
argument is non-null, pass it along to PHITranslateSubExpr so that it can
prefer using existing values that dominate the PredBB, instead of just
blindly picking the first equivalent value that it finds on a uselist.
Also when the DominatorTree is specified, have PHITranslateValue filter
out any result that does not dominate the PredBB.  This is basically just
refactoring the check that used to be in GetAvailablePHITranslatedSubExpr
and also in GVN.

Despite my initial expectations, this change does not affect the results
of GVN for any testcases that I could find, but it should help compile time.
Before this change, if PHITranslateSubExpr picked a value that does not
dominate, PHITranslateWithInsertion would then insert a new value, which GVN
would later determine to be redundant and would replace.  By picking a good
value to begin with, we save GVN the extra work of inserting and then
replacing a new value.

llvm-svn: 97010
2010-02-24 01:39:00 +00:00
David Greene
693db7a309 Change dbgs() back to errs() as Chris requested.
llvm-svn: 92085
2009-12-23 23:27:15 +00:00
David Greene
28b8bcd98d Convert debug messages to use dbgs(). Generally this means
s/errs/dbgs/g except for certain special cases.

llvm-svn: 92046
2009-12-23 21:06:14 +00:00
Chris Lattner
2f9b661ab8 Add a minor optimization: if we haven't changed the operands of an
add, there is no need to scan the world to find the same add again.
This invalidates the previous testcase, which wasn't wonderful anyway,
because it needed a run of instcombine to permute the use-lists in 
just the right way to before GVN was run (so it was really fragile).
Not a big loss.

llvm-svn: 90973
2009-12-09 17:27:45 +00:00
Chris Lattner
e05f9a128c fix PR5733, a case where we'd replace an add with a lexically identical
binary operator that wasn't an add.  In this case, a xor.  Whoops.

llvm-svn: 90971
2009-12-09 17:18:49 +00:00
Chris Lattner
9c2474e272 fix a nasty variable that was shadowing the real CurBB but with the wrong value.
llvm-svn: 90920
2009-12-09 01:19:16 +00:00
Chris Lattner
3211af28ba fix many input tracking bugs.
llvm-svn: 90915
2009-12-09 00:56:14 +00:00
Chris Lattner
c457aaea0d fix PHI translation to take the PHI out of the instinputs set and add
the translated value back to it if an instruction.

llvm-svn: 90909
2009-12-09 00:18:13 +00:00
Chris Lattner
b0d20540ad instructions defined in CurBB may be intermediate nodes of the computation.
llvm-svn: 90908
2009-12-09 00:10:55 +00:00
Chris Lattner
83cb0b1450 add dumping and sanity checking support.
llvm-svn: 90906
2009-12-09 00:01:00 +00:00
Chris Lattner
604cebbfc1 make sure that PHITransAddr keeps its 'InstInputs' list up to
date when instsimplify kicks in.

llvm-svn: 90901
2009-12-08 23:42:51 +00:00
Chris Lattner
8cc673c6a0 fix a typo (and -> add) and fix GetAvailablePHITranslatedSubExpr to not
side-effect the current object.

llvm-svn: 90837
2009-12-08 06:06:26 +00:00
Chris Lattner
3d338590d6 fix typo
llvm-svn: 90793
2009-12-07 19:52:57 +00:00
Chris Lattner
9ed7e3ffb9 add accessor, improve comment.
llvm-svn: 90792
2009-12-07 19:45:30 +00:00
Chris Lattner
233d9bf82d add support for phi translation and incorpation of new expression.
llvm-svn: 90782
2009-12-07 19:04:49 +00:00
Chris Lattner
0a810a827f checkpoint of the new PHITransAddr code, still not done and not used by
anything.

llvm-svn: 90779
2009-12-07 18:36:53 +00:00
Chris Lattner
167f1dc040 add the start of a class used to handle phi translation in memdep and
gvn (this is just a skeleton so far).  This will ultimately be used
to fix a nasty miscompilation with GVN.

llvm-svn: 90518
2009-12-04 02:10:16 +00:00