History log of /external/llvm/test/Transforms/GVN/condprop.ll
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
39f4e8d9cce22b60a3417a5f17c847fa5b1daebf 14-Jul-2013 Stephen Lin <stephenwlin@gmail.com> Update Transforms tests to use CHECK-LABEL for easier debugging. No functionality change.

This update was done with the following bash script:

find test/Transforms -name "*.ll" | \
while read NAME; do
echo "$NAME"
if ! grep -q "^; *RUN: *llc" $NAME; then
TEMP=`mktemp -t temp`
cp $NAME $TEMP
sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
while read FUNC; do
sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP
done
mv $TEMP $NAME
fi
done


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
190e5a3314808fc126f18119315ce986d0689089 04-Mar-2012 Duncan Sands <baldrick@free.fr> Nick pointed out on IRC that GVN's propagateEquality wasn't propagating
equalities into phi node operands for which the equality is known to
hold in the incoming basic block. That's because replaceAllDominatedUsesWith
wasn't handling phi nodes correctly in general (that this didn't give wrong
results was just luck: the specific way GVN uses replaceAllDominatedUsesWith
precluded wrong changes to phi nodes).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
2b4f4910458f9bfd15315444ed47b4f41473a93d 29-Feb-2012 Duncan Sands <baldrick@free.fr> Have GVN also do condition propagation when the right-hand side is not
a constant. This fixes PR1768.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
669011f50b8234bb4775d52a2d1e1ba5f6311e62 27-Feb-2012 Duncan Sands <baldrick@free.fr> When performing a conditional branch depending on the value of a comparison
%cmp (eg: A==B) we already replace %cmp with "true" under the true edge, and
with "false" under the false edge. This change enhances this to replace the
negated compare (A!=B) with "false" under the true edge and "true" under the
false edge. Reported to improve perlbench results by 1%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
33756f96d75e20d336f404debf701e8d6b4ecfc8 05-Feb-2012 Duncan Sands <baldrick@free.fr> Reduce the number of dom queries made by GVN's conditional propagation
logic by half: isOnlyReachableViaThisEdge was trying to be clever and
handle the case of a branch to a basic block which is contained in a
loop. This costs a domtree lookup and is completely useless due to
GVN's position in the pass pipeline: all loops have preheaders at this
point, which means it is enough for isOnlyReachableViaThisEdge to check
that Dst has only one predecessor. (I checked this theoretical argument
by running over the entire nightly testsuite, and indeed it is so!).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
3f329cb781492e19a72af267cd3b7c2d8307a818 07-Oct-2011 Duncan Sands <baldrick@free.fr> Teach GVN to also propagate switch cases. For example, in this code
switch (n) {
case 27:
do_something(x);
...
}
the call do_something(x) will be replaced with do_something(27). In
gcc-as-one-big-file this results in the removal of about 500 lines of
bitcode (about 0.02%), so has about 1/10 of the effect of propagating
branch conditions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
02b5e72ac6ec1fe81e1f73f85be436faa078eabf 05-Oct-2011 Duncan Sands <baldrick@free.fr> GVN does simple propagation of conditions: when it sees a conditional
branch "br i1 %x, label %if_true, label %if_false" then it replaces
"%x" with "true" in places only reachable via the %if_true arm, and
with "false" in places only reachable via the %if_false arm. Except
that actually it doesn't: if value numbering shows that %y is equal
to %x then, yes, %y will be turned into true/false in this way, but
any occurrences of %x itself are not transformed. Fix this. What's
more, it's often the case that %x is an equality comparison such as
"%x = icmp eq %A, 0", in which case every occurrence of %A that is
only reachable via the %if_true arm can be replaced with 0. Implement
this and a few other variations on this theme. This reduces the number
of lines of LLVM IR in "GCC as one big file" by 0.2%. It has a bigger
impact on Ada code, typically reducing the number of lines of bitcode
by around 0.4% by removing repeated compiler generated checks. Passes
the LLVM nightly testsuite and the Ada ACATS testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
452c58f4c45249b5046f74a165430eedaab5f8f6 05-Oct-2011 Duncan Sands <baldrick@free.fr> Generalize GVN's conditional propagation logic slightly:
it's OK for the false/true destination to have multiple
predecessors as long as the extra ones are dominated by
the branch destination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
f0568389563d46a7252ce8a17ef316e313cc17c6 22-Dec-2010 Owen Anderson <resistor@mac.com> Give GVN back the ability to perform simple conditional propagation on conditional branch values.
I still think that LVI should be handling this, but that capability is some ways off in the future,
and this matters for some significant benchmarks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
a04a0649e13dc97c778856a85717b3e9428786f0 18-Nov-2010 Owen Anderson <resistor@mac.com> Completely rework the datastructure GVN uses to represent the value number to leader mapping. Previously,
this was a tree of hashtables, and a query recursed into the table for the immediate dominator ad infinitum
if the initial lookup failed. This led to really bad performance on tall, narrow CFGs.

We can instead replace it with what is conceptually a multimap of value numbers to leaders (actually
represented by a hashtable with a list of Value*'s as the value type), and then
determine which leader from that set to use very cheaply thanks to the DFS numberings maintained by
DominatorTree. Because there are typically few duplicates of a given value, this scan tends to be
quite fast. Additionally, we use a custom linked list and BumpPtr allocation to avoid any unnecessary
allocation in representing the value-side of the multimap.

This change brings with it a 15% (!) improvement in the total running time of GVN on 403.gcc, which I
think is pretty good considering that includes all the "real work" being done by MemDep as well.

The one downside to this approach is that we can no longer use GVN to perform simple conditional progation,
but that seems like an acceptable loss since we now have LVI and CorrelatedValuePropagation to pick up
the slack. If you see conditional propagation that's not happening, please file bugs against LVI or CVP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
c1be92f3bb9158eade30d97db6997e2fe78150ab 18-Oct-2010 Dan Gohman <gohman@apple.com> Make BasicAliasAnalysis a normal AliasAnalysis implementation which
does normal initialization and normal chaining. Change the default
AliasAnalysis implementation to NoAlias.

Update StandardCompileOpts.h and friends to explicitly request
BasicAliasAnalysis.

Update tests to explicitly request -basicaa.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
f2f6ce65b79df6ec4ee427d51a18355a170f199b 11-Sep-2009 Dan Gohman <gohman@apple.com> Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
3e054fe9efc64596534bbae0d1634ed15181d642 09-Sep-2009 Dan Gohman <gohman@apple.com> Use opt -S instead of piping bitcode output through llvm-dis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
b1e1e82c54c060ea5dae09dae043234826ca2539 08-Sep-2009 Dan Gohman <gohman@apple.com> Change these tests to feed the assembly files to opt directly, instead
of using llvm-as, now that opt supports this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
e8a290fefcbf443d7c85149f5c14a5a305aeaf29 02-Apr-2009 Owen Anderson <resistor@mac.com> Reapply r68211, with the miscompilations it caused fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
e63c4a2010a5e09f8607b914bce0bac8cf38cd20 01-Apr-2009 Dan Gohman <gohman@apple.com> Revert r68172. It caused regressions in
Applications/Burg/burg
Applications/ClamAV/clamscan
and many other tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll
f41fcbb60d909ebae0e31300322b94922c1ee886 01-Apr-2009 Owen Anderson <resistor@mac.com> Enhance GVN to propagate simple conditionals. This fixes PR3921.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/Transforms/GVN/condprop.ll