Commit Graph

191 Commits

Author SHA1 Message Date
Dan Gohman c8054d90fb Eliminate more uses of llvm-as and llvm-dis.
llvm-svn: 81293
2009-09-09 00:09:15 +00:00
Dan Gohman 4f2527cd6d Convert a few more opt | llvm-dis to opt -S.
llvm-svn: 81261
2009-09-08 22:41:33 +00:00
Dan Gohman 72a13d2476 Use opt -S instead of piping bitcode output through llvm-dis.
llvm-svn: 81257
2009-09-08 22:34:10 +00:00
Dan Gohman 9737a63ed8 Change these tests to feed the assembly files to opt directly, instead
of using llvm-as, now that opt supports this.

llvm-svn: 81226
2009-09-08 16:50:01 +00:00
Andreas Neustifter 5673c0aace Updated tests to use ProfileVerifer to test ProfileLoader and ProfileEstimator.
(Keep disabled test disabled until selfhosted build issue is resolved.)

llvm-svn: 81008
2009-09-04 17:21:59 +00:00
Daniel Dunbar a48a2f6055 Revert "--- Reverse-merging r80908 into '.':", I already "fixed" this.
llvm-svn: 80970
2009-09-03 23:40:10 +00:00
Bill Wendling 92291f6ad0 --- Reverse-merging r80908 into '.':
D    test/Analysis/Profiling

--- Reverse-merging r80907 into '.':
U    lib/Analysis/ProfileInfoLoaderPass.cpp

Attempt to remove failure in the self-hosting build bot.

llvm-svn: 80966
2009-09-03 23:13:46 +00:00
Daniel Dunbar d8df76eaeb Disable some parts of the profiling-tool-chain test, which is currently failing
on a self-hosted build (although it seems to work on non-self hosted). I'll work
with Andreas to figure this out.

llvm-svn: 80947
2009-09-03 21:09:53 +00:00
Daniel Dunbar f563ac919b Reapply profiling tests.
llvm-svn: 80908
2009-09-03 07:38:00 +00:00
Andreas Neustifter 69e2afe030 Removed temporarily because of breaking Darwin builds.
(See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086214.html)

llvm-svn: 80799
2009-09-02 16:47:24 +00:00
Andreas Neustifter da6b0fa8ed Changed profiling-tool-chain.ll test to use optimal-edge-profiling instead of
edge-profiling, this is more useful since the loading of the
optimal-edge-profiling is more complicated.
The edge-profiling is tested in edge-profiling.ll where only the
instrumentation is tested.

llvm-svn: 80791
2009-09-02 14:24:08 +00:00
Daniel Dunbar 0935339f81 Don't force the triple or data layout in this test. We just have to get them
from the host and hope that works.

llvm-svn: 80751
2009-09-02 02:43:11 +00:00
Chris Lattner 2d3e0a35bd rename test so that name reflects what it is testing for.
llvm-svn: 80519
2009-08-30 21:36:39 +00:00
Chris Lattner c7d5796af8 convert to filecheck format.
llvm-svn: 80518
2009-08-30 21:36:06 +00:00
Torok Edwin e8a5863c3f rm needs -f
llvm-svn: 80363
2009-08-28 14:05:07 +00:00
Torok Edwin 483691a185 Remove the llvmprof.out from the test output, otherwise running
make check in a non-clean directory causes it to fail (for example when running
make check twice), since execution counts will differ.

llvm-svn: 80362
2009-08-28 13:35:44 +00:00
Andreas Neustifter ed3a6bedca Remove profiling output file because two consecutive runs of make check give
error.

llvm-svn: 80357
2009-08-28 10:38:26 +00:00
Andreas Neustifter d8e04ab883 Removed unnecessary file creation during test.
llvm-svn: 80356
2009-08-28 10:07:41 +00:00
Andreas Neustifter 52afe22566 Pulled all tests into one test. Removed some redundant tests. Rename.
llvm-svn: 80355
2009-08-28 10:00:28 +00:00
Andreas Neustifter d7f3569555 Readded test from r79615, this tests the complete profiling tool chain. Furhter
tests can test only parts of this system.

llvm-svn: 80348
2009-08-28 06:41:00 +00:00
Dan Gohman d926b985df Create a ScalarEvolution-based AliasAnalysis implementation.
This is a simple AliasAnalysis implementation which works by making
ScalarEvolution queries. ScalarEvolution has a more complete understanding
of arithmetic than BasicAA's collection of ad-hoc checks, so it handles
some cases that BasicAA misses, for example p[i] and p[i+1] within the
same iteration of a loop.

This is currently experimental. It may be that the main use for this pass
will be to help find cases where BasicAA can be profitably extended, or
to help in the development of the overall AliasAnalysis infrastructure,
however it's also possible that it could grow up to become a directly
useful pass.

llvm-svn: 80098
2009-08-26 14:53:06 +00:00
Andreas Neustifter 3fac9a4fc5 Removed profiling test, lli not available on all platforms.
llvm-svn: 79633
2009-08-21 15:27:35 +00:00
Andreas Neustifter f715778de9 Added tests for Profiling Infrastructure.
llvm-svn: 79615
2009-08-21 09:36:28 +00:00
Dan Gohman 463d3407e2 Loosen up the regex for this test so that it doesn't implicitly
depend on TargetData information.

llvm-svn: 79491
2009-08-19 23:19:36 +00:00
Dan Gohman e274526d78 Make LLVM Assembly dramatically easier to read by aligning the comments,
using formatted_raw_ostream's PadToColumn.

Before:

bb1:            ; preds = %bb
  %2 = sext i32 %i.01 to i64            ; <i64> [#uses=1]
  %3 = getelementptr double* %p, i64 %2         ; <double*> [#uses=1]
  %4 = load double* %3, align 8         ; <double> [#uses=1]
  %5 = fmul double %4, 1.100000e+00             ; <double> [#uses=1]
  %6 = sext i32 %i.01 to i64            ; <i64> [#uses=1]
  %7 = getelementptr double* %p, i64 %6         ; <double*> [#uses=1]

After:

bb1:                                        ; preds = %bb
  %2 = sext i32 %i.01 to i64                ; <i64> [#uses=1]
  %3 = getelementptr double* %p, i64 %2     ; <double*> [#uses=1]
  %4 = load double* %3, align 8             ; <double> [#uses=1]
  %5 = fmul double %4, 1.100000e+00         ; <double> [#uses=1]
  %6 = sext i32 %i.01 to i64                ; <i64> [#uses=1]
  %7 = getelementptr double* %p, i64 %6     ; <double*> [#uses=1]

Several tests required whitespace adjustments.

llvm-svn: 78816
2009-08-12 17:23:50 +00:00
Andreas Bolka 3becda83ef Add another Strong-SIV testcase.
llvm-svn: 78446
2009-08-08 00:21:49 +00:00
Andreas Bolka 787591a594 Fix Strong-SIV testcase.
llvm-svn: 78384
2009-08-07 15:42:32 +00:00
Andreas Bolka 13b860992a ZIV tester for LDA.
llvm-svn: 78157
2009-08-05 04:26:05 +00:00
Andreas Bolka 2979eb8f35 Fix LDA testcases.
llvm-svn: 78153
2009-08-05 04:03:29 +00:00
Andreas Bolka 71fc19e991 Expand LDA testcases.
llvm-svn: 77926
2009-08-02 23:28:14 +00:00
Andreas Bolka 2f84b5ab46 Slightly reformat LDA tests to ease grepping.
llvm-svn: 77398
2009-07-28 23:40:40 +00:00
Dan Gohman 9c7f808201 Change the assembly syntax for nsw, nuw, and exact, putting them
after their associated opcodes rather than before. This makes them
a little easier to read.

llvm-svn: 77194
2009-07-27 16:11:46 +00:00
Dan Gohman 534d66a426 When attempting to sign-extend an addrec by interpreting
the step value as unsigned, the start value and the addrec
itself still need to be treated as signed.

llvm-svn: 77078
2009-07-25 16:03:30 +00:00
Dan Gohman 62ef6a7f1c Teach ScalarEvolution to make use of no-overflow flags when
analyzing add recurrences.

llvm-svn: 77034
2009-07-25 01:22:26 +00:00
Andreas Bolka dcb9f483bf FileCheck'ize and expand LDA testcases.
llvm-svn: 76880
2009-07-23 15:56:53 +00:00
Dan Gohman 430f0cc544 Replace the original ad-hoc code for determining whether (v pred w) implies
(x pred y) with more thorough code that does more complete canonicalization
before resorting to range checks. This helps it find more cases where
the canonicalized expressions match.

llvm-svn: 76671
2009-07-21 23:03:19 +00:00
Dan Gohman 52e14d2272 Add a testcase for PR4569, which is now fixed.
llvm-svn: 76526
2009-07-21 00:50:52 +00:00
Torok Edwin 8f2906a2e8 Introduce a pointertracking pass.
For now this only computes the allocated size of the memory pointed to by a
pointer, and offset a pointer from allocated pointer.
The actual checkLimits part will come later, after another round of review.

llvm-svn: 75657
2009-07-14 18:44:28 +00:00
Dan Gohman 054d2a7837 Add testcases for PR4538, PR4537, and PR4534.
llvm-svn: 75533
2009-07-13 22:30:31 +00:00
Nick Lewycky 3292908132 When comparing constants, consider a less wide constant to be "less complex"
than a wider one, before trying to compare their contents which will crash
if their sizes are different.

llvm-svn: 74792
2009-07-04 17:24:52 +00:00
Andreas Bolka 9541801105 Array accesses are independent if the underlying arrays differ.
llvm-svn: 74499
2009-06-30 02:12:10 +00:00
Andreas Bolka 9d09e20142 Print pairwise dependence results, add testcases.
llvm-svn: 74402
2009-06-28 00:35:22 +00:00
Dan Gohman 5f71a2886a Add a testcase demoing some of ScalarEvolution's new trip count logic.
llvm-svn: 74049
2009-06-24 01:22:30 +00:00
Dan Gohman 53efeb0e45 Fix a bug in the trip-count computation with And/Or. If either of the
sides is CouldNotCompute, the resulting exact count must be CouldNotCompute.

llvm-svn: 73920
2009-06-22 23:28:56 +00:00
Dan Gohman 2636693a3c Fix llvm::ComputeNumSignBits to handle pointer types
conservatively correctly, instead of aborting.

llvm-svn: 73908
2009-06-22 22:02:32 +00:00
Dan Gohman 96212b661c Teach ScalarEvolution how to analyze loops with multiple exit
blocks, and also exit blocks with multiple conditions (combined
with (bitwise) ands and ors). It's often infeasible to compute an
exact trip count in such cases, but a useful upper bound can often
be found.

llvm-svn: 73866
2009-06-22 00:31:57 +00:00
Dan Gohman 0104842ee3 Fix ScalarEvolution's backedge-taken count computations to check for
overflow when computing a integer division to round up.

Thanks to Nick Lewycky for noticing this!

llvm-svn: 73862
2009-06-21 23:46:38 +00:00
Dan Gohman eddf77123a Teach ScalarEvolution how to recognize another xor(and(x, C), C) case.
If C is a single bit and the and gets analyzed as a truncate and
zero-extend, the xor can be represnted as an add.

llvm-svn: 73664
2009-06-18 00:00:20 +00:00
Dan Gohman 432af7ace0 Add -disable-output to a bunch of tests that don't care about the output.
llvm-svn: 73633
2009-06-17 20:56:26 +00:00
Dan Gohman b50f5a46e0 Fix ScalarEvolution's Xor handling to not assume that an And
that gets recognized with a SCEVZeroExtendExpr must be an And
with a low-bits mask. With r73540, this is no longer the case.

llvm-svn: 73594
2009-06-17 01:22:39 +00:00