| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 306702
|
|
|
|
|
|
|
|
|
| |
We weren't actually checking for duplicated stores, as the condition
was always actually false. This was found by Coverity, and I have
no clue how to trigger this in real-world code (although I
tried for a bit).
llvm-svn: 305867
|
|
|
|
| |
llvm-svn: 305707
|
|
|
|
| |
llvm-svn: 305657
|
|
|
|
|
|
| |
due to other limitations, i believe. This also means i can't make a test for it.
llvm-svn: 305415
|
|
|
|
| |
llvm-svn: 305262
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. When there is no perfect iteration order, we can't let phi nodes
put themselves in terms of things that come later in the iteration
order, or we will endlessly cycle (the normal RPO algorithm clears the
hashtable to avoid this issue).
2. We are sometimes erasing the wrong expression (causing pessimism)
because our equality says loads and stores are the same.
We introduce an exact equality function and use it when erasing to
make sure we erase only identical expressions, not equivalent ones.
llvm-svn: 304807
|
|
|
|
|
|
| |
generate a phi of ops, which we don't currently support.
llvm-svn: 304272
|
|
|
|
|
|
| |
testing.
llvm-svn: 304195
|
|
|
|
|
|
| |
tables sometimes.
llvm-svn: 304194
|
|
|
|
| |
llvm-svn: 304029
|
|
|
|
|
|
| |
Fix PR33120 and others by eliminating self-cycles a different way.
llvm-svn: 303875
|
|
|
|
|
|
|
|
|
|
| |
Otherwise we don't revisit an instruction that could be simplified,
and when we verify, we discover there's something that changed, i.e.
what we had wasn't a maximal fixpoint.
Fixes PR32836.
llvm-svn: 303715
|
|
|
|
| |
llvm-svn: 303521
|
|
|
|
| |
llvm-svn: 303520
|
|
|
|
| |
llvm-svn: 303519
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the case where we have an operand defined by a lod of the
same memory location. Historically this was a VariableExpression
because we wanted to make sure they ended up in the same class,
but if we create the right expression, they end up in the same
class anyway.
Fixes PR32897. Thanks to Dan for the detailed discussion and the
fix suggestion.
llvm-svn: 303475
|
|
|
|
|
|
|
|
|
|
| |
This was here because we don't want to switch leaders too much,
in order to avoid fixpoint(ing) issue, but it's not sure if it
matters in practice.
A first step towards fixing PR32897.
llvm-svn: 303473
|
|
|
|
|
|
|
|
|
|
| |
This is a complicated bug involving two issues:
1. What do we do with phi nodes when we prove all arguments are not
live?
2. When is it safe to use value leaders to determine if we can ignore
an argumnet?
llvm-svn: 303453
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
NewGVN: Handle equivalence between phi of ops and op of phis.
This makes our GVN mostly-complete. It would be complete, modulo some
deliberate choices we make. This means it detects roughly all herband
equivalences in polynomial time, including cases notoriously hard for
other GVN's to detect. It also detects a very large swath of the
cases we currently rely on instcombine to detect that involve folding
upwards through phis.
Fixes PR 31125, 31463, PR 31868
Reviewers: davide
Subscribers: Prazek, llvm-commits
Differential Revision: https://reviews.llvm.org/D32151
llvm-svn: 303444
|
|
|
|
| |
llvm-svn: 303443
|
|
|
|
|
|
|
| |
(or non-store, more in general). Fixes PR33086. Caught by the
store verifier.
llvm-svn: 303406
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can have cycles between PHIs and this causes singleReachablePhi()
to call itself indefintely (until we run out of stack). The proper
solution would be that of computing SCCs, but it's not worth for
now, so just keep a visited set and give up when we find a cycle.
Thanks to Dan for the discussion/help with this.
Fixes PR33014.
llvm-svn: 303393
|
|
|
|
|
|
|
| |
This time with an additional fix, i.e. we remove the dead
@llvm.ssa.copy instruction.
llvm-svn: 303385
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D32060
llvm-svn: 303227
|
|
|
|
|
|
| |
enabled, to avoid unused code warnings.
llvm-svn: 303201
|
|
|
|
|
|
| |
from the ExpressionToClass mapping.
llvm-svn: 303200
|
|
|
|
|
|
| |
since it was already looked up when it was created
llvm-svn: 303144
|
|
|
|
| |
llvm-svn: 303143
|
|
|
|
|
|
| |
It's breaking the bots.
llvm-svn: 303142
|
|
|
|
|
|
|
|
| |
Fixes PR32945.
Differential Revision: https://reviews.llvm.org/D33226
llvm-svn: 303141
|
|
|
|
| |
llvm-svn: 303107
|
|
|
|
|
|
|
|
|
|
|
|
| |
verifyMemoryCongruency() filters out trivially dead MemoryDef(s),
as we find them immediately dead, before moving from TOP to a new
congruence class.
This fixes the same problem for PHI(s) skipping MemoryPhis if all
the operands are dead.
Differential Revision: https://reviews.llvm.org/D33044
llvm-svn: 303100
|
|
|
|
|
|
|
| |
While debugging a predicate info problem, I noticed this was missing
a newline, making the debug output slightly less readable.
llvm-svn: 302908
|
|
|
|
| |
llvm-svn: 302906
|
|
|
|
|
|
|
|
|
|
| |
This code was missing a check for stores, so we were thinking the
congruency class didn't have any memory members, and reset the
memory leader.
Differential Revision: https://reviews.llvm.org/D33056
llvm-svn: 302905
|
|
|
|
|
|
|
| |
This is nice as is, but it will be used in my next patch to
fix a bug. Suggested by Daniel Berlin.
llvm-svn: 302714
|
|
|
|
| |
llvm-svn: 302579
|
|
|
|
|
|
|
|
| |
non-determinism.
Thanks to Eli for pointing out in a post-commit review comment.
llvm-svn: 302566
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The way we currently define congruency for two PHIExpression(s) is:
1) The operands to the phi functions are congruent
2) The PHIs are defined in the same BasicBlock.
NewGVN works under the assumption that phi operands are in predecessor
order, or at least in some consistent order. OTOH, is valid IR:
patatino:
%meh = phi i16 [ %0, %winky ], [ %conv1, %tinky ]
%banana = phi i16 [ %0, %tinky ], [ %conv1, %winky ]
br label %end
and the in-memory representations of the two SSA registers have an
inconsistent order. This violation of NewGVN assumptions results into
two PHIs found congruent when they're not. While we think it's useful
to have always a consistent order enforced, let's fix this in NewGVN
sorting uses in predecessor order before creating a PHI expression.
Differential Revision: https://reviews.llvm.org/D32990
llvm-svn: 302552
|
|
|
|
| |
llvm-svn: 302550
|
|
|
|
| |
llvm-svn: 302173
|
|
|
|
| |
llvm-svn: 301974
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the testcase attached, we believe %tmp1 implies %tmp4.
where:
br i1 %tmp1, label %bb2, label %bb7
br i1 %tmp4, label %bb5, label %bb7
because Wwhile looking at PredicateInfo stuffs we end up calling
isImpliedTrueByMatchingCmp() with the arguments backwards.
Differential Revision: https://reviews.llvm.org/D32718
llvm-svn: 301849
|
|
|
|
| |
llvm-svn: 301673
|
|
|
|
| |
llvm-svn: 301466
|
|
|
|
|
|
| |
return false. Merge the appropriate if statements so it doesn't happen again.
llvm-svn: 300584
|
|
|
|
| |
llvm-svn: 300565
|
|
|
|
|
|
|
|
| |
have >1 value, unless we can prove the phi node is cycle free.
Fixes PR 32607.
llvm-svn: 300299
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and to expose a handle to represent the actual case rather than having
the iterator return a reference to itself.
All of this allows the iterator to be used with common STL facilities,
standard algorithms, etc.
Doing this exposed some missing facilities in the iterator facade that
I've fixed and required some work to the actual iterator to fully
support the necessary API.
Differential Revision: https://reviews.llvm.org/D31548
llvm-svn: 300032
|