Commit Graph

35 Commits

Author SHA1 Message Date
Andrew Trick
39f40299a6 Invoke SimplifyIndVar when we partially unroll a loop. Fixes PR10534.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137203 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 04:29:49 +00:00
Andrew Trick
b1eede1281 Fix the LoopUnroller to handle nontrivial loops and partial unrolling.
These are not individual bug fixes. I had to rewrite a good chunk of
the unroller to make it sane. I think it was getting lucky on trivial
completely unrolled loops with no early exits. I included some fairly
simple unit tests for partial unrolling. I didn't do much stress
testing, so it may not be perfect, but should be usable now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137190 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 00:28:10 +00:00
Chris Lattner
67982da351 add a testcase for r125827
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125831 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 05:05:01 +00:00
Cameron Zwarich
4a60b932a2 Rename 'loopsimplify' to 'loop-simplify'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125317 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 23:38:10 +00:00
Owen Anderson
547462b98c Revert r113439, which relaxed the requirement that loops containing calls cannot be unrolled. After some discussion,
there seems to be a better way to achieve the same effect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113528 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:02:23 +00:00
Owen Anderson
4975447d94 Relax the "don't unroll loops containing calls" rule. Instead, when a loop contains a call, lower the
unrolling threshold to the optimize-for-size threshold.  Basically, for loops containing calls, unrolling
can still be profitable as long as the loop is REALLY small.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113439 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 23:10:07 +00:00
Dan Gohman
ac146657fc Teach getSmallConstantTripMultiple about Shl operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89426 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 01:09:34 +00:00
Dan Gohman
f2f6ce65b7 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
2009-09-11 18:01:28 +00:00
Dan Gohman
3e054fe9ef 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
2009-09-08 22:34:10 +00:00
Dan Gohman
b1e1e82c54 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
2009-09-08 16:50:01 +00:00
Chris Lattner
7150371097 remove a test that depends on -debug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66937 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 20:31:48 +00:00
Matthijs Kooijman
75cf9cc527 Add -unroll-allow-partial command line option that enabled the loop unroller to
partially unroll a loop when fully unrolling would not fit under the threshold.

Patch by Mikael Lepistö.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54160 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 13:21:23 +00:00
Dan Gohman
8dbe7f832e Revert 52645, the loop unroller changes. It caused a regression in 252.eon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52688 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-24 20:44:42 +00:00
Dan Gohman
55e283c71e Revamp the loop unroller, extending it to correctly update PHI nodes
in the presence of out-of-loop users of in-loop values and the trip
count is not a known multiple of the unroll count, and to be a bit
simpler overall. This fixes PR2253.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52645 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-23 21:29:41 +00:00
Gabor Greif
f6cadc440c sabre brings to my attention that the 'tr' suffix is also obsolete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51349 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-20 21:00:03 +00:00
Gabor Greif
722243bd40 Rename the last test with .llx extension to .ll, resolve duplicate test by renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51328 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-20 19:52:04 +00:00
Tanya Lattner
e6d5d39c07 Upgrade tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48538 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 07:28:33 +00:00
Nick Lewycky
c837abee2f Be more careful modifying the use_list while also iterating through it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46417 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-27 18:35:00 +00:00
Devang Patel
5d01aa484f If a value is incoming from outside the loop then the value does not need remapping and the value is never tracked through LastValueMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43728 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 19:32:30 +00:00
John Criswell
e644ef7b09 Convert .cvsignore files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37801 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-29 16:35:07 +00:00
Dan Gohman
2fa7ce2b87 Add a testcase for unrolling loops with unknown tripcounts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37238 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 19:59:23 +00:00
Chris Lattner
823572d44d new testcase for PR1385
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36783 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 18:48:52 +00:00
Devang Patel
253f7fe77e Add PR number for reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36184 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 23:52:37 +00:00
Devang Patel
b6b40ebc83 New test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36181 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 23:02:22 +00:00
Reid Spencer
eb1d74e0c8 For PR1319:
Remove && from the end of the lines to prevent tests from throwing run
lines into the background. Also, clean up places where the same command
is run multiple times by using a temporary file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36142 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 17:36:08 +00:00
Reid Spencer
2aabd0722d For PR1319:
Upgrade to use new Tcl exec based test harness.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36062 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 08:30:33 +00:00
Reid Spencer
0f5aed5648 Make the llvm-runtest function much more amenable by eliminating all the
global variables that needed to be passed in. This makes it possible to
add new global variables with only a couple changes (Makefile and llvm-dg.exp)
instead of touching every single dg.exp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 19:56:59 +00:00
Reid Spencer
69ccadd753 Use the llvm-upgrade program to upgrade llvm assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 04:23:10 +00:00
Owen Anderson
3b53c4ee91 Implement unrolling of multiblock loops. This significantly improves the
utility of the LoopUnroll pass.

Also, add a testcase for multiblock-loop unrolling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29859 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 21:28:19 +00:00
Tanya Lattner
9727555859 Added the ability to xfail based on llvmgcc version
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27635 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 21:57:40 +00:00
Reid Spencer
2676f83776 Tired of wading through cvs's list ? files that are generated when building
with srcdir = objdir to see what's okay and what's cruft. So, in goes a
bunch of .cvsignore files to shut cvs up about known output from running
"make check".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27009 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:41:57 +00:00
Chris Lattner
801d9082e0 New testcase for PR532
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20492 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 20:56:55 +00:00
Tanya Lattner
c8c1f12778 Adding srcdir arg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18020 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-19 22:45:25 +00:00
Tanya Lattner
28b372f1d3 Adding subdirectory dg.exp files in order to be able to use dejagnu to only run specific tests (located in some subdirectory of Regression)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17712 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 23:00:45 +00:00
Chris Lattner
488b72bd7f New testcase that used to cause the unroller to try to unroll the loop 2G times. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13563 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-13 20:43:15 +00:00