Commit Graph

11189 Commits

Author SHA1 Message Date
Chris Lattner 597f1da506 New testcase, the optimizer can delete zero sized allocas
llvm-svn: 12506
2004-03-19 06:07:43 +00:00
Chris Lattner 91f297d4fe Perhaps the last bugfix before the release? HOPEFULLY! :)
llvm-svn: 12505
2004-03-19 04:26:04 +00:00
Chris Lattner ba6641d598 Fix PR299: [Sparc] Code generator asserts on alloc of zero size type
llvm-svn: 12504
2004-03-19 04:21:43 +00:00
Chris Lattner 6ca9b89abb Malloc doesn't kill a load. This patch need not go into 1.2 though.
llvm-svn: 12500
2004-03-18 17:01:26 +00:00
Chris Lattner 0b41ebe65c Fix a minor wording bug in the manual
llvm-svn: 12496
2004-03-18 14:58:55 +00:00
Chris Lattner 211ae0bf05 This is the last remaining bug that I know of in the loop extractor. The loop
extractor has extracted hundreds of loops from the SPEC benchmarks without crashing
and without misoptimizing the programs.

This testcase could be reduced substantially more by hand, but I don't have time
to work on it right now.

llvm-svn: 12495
2004-03-18 06:41:59 +00:00
Chris Lattner dc47e27188 Fix a really nasty bug that was breaking ijpeg in LLC mode. We were incorrectly
folding load instructions into other instructions across free instruction
boundaries.  Perhaps this will also fix the other strange failures?

llvm-svn: 12494
2004-03-18 06:29:54 +00:00
Chris Lattner 232155dc1b Fix bug: CodeExtractor/2004-03-17-MissedLiveIns.ll
With this fix we now successfully extract all 149 loops from 256.bzip2 without
crashing or miscompiling the program!

llvm-svn: 12493
2004-03-18 05:56:32 +00:00
Chris Lattner 2bcfcc90c8 New testcase, reduced from 256.bzip2
llvm-svn: 12492
2004-03-18 05:55:29 +00:00
Chris Lattner e83693560a Add statistics to the loop extractor. The loop extractor has successfully
extracted all 63 loops for Olden/bh without crashing and without
miscompiling the program!!!

llvm-svn: 12491
2004-03-18 05:46:10 +00:00
Chris Lattner 5bce0c807d Fix problem with PHI nodes having multiple predecessors from different
exit nodes

llvm-svn: 12490
2004-03-18 05:43:18 +00:00
Chris Lattner acd75986ee Fix CodeExtractor/2004-03-17-UpdatePHIsOutsideRegion.ll
llvm-svn: 12489
2004-03-18 05:38:31 +00:00
Chris Lattner 4c7fcbf77b New testcase
llvm-svn: 12488
2004-03-18 05:33:39 +00:00
Chris Lattner 320d59f4cd Seriously simplify and correct the PHI node handling code.
llvm-svn: 12487
2004-03-18 05:28:49 +00:00
Chris Lattner d8017a340d Fix CodeExtractor/2004-03-17-OutputMismatch.ll
llvm-svn: 12486
2004-03-18 04:12:05 +00:00
Chris Lattner b7b099d569 New testcase that crashes the code extractor
llvm-svn: 12485
2004-03-18 04:10:02 +00:00
Chris Lattner 37de257ef0 Fix several bugs in the extractor:
1. Names were not put on the new arguments created (ok, this just helps sanity :)
2. Fix outgoing pointer values
3. Do not insert stores for values that had not been computed
4. Fix some wierd problems with the outset calculation

This fixes CodeExtractor/2004-03-14-DominanceProblem.ll, making the extractor
work on at least one simple case!

llvm-svn: 12484
2004-03-18 03:49:40 +00:00
Chris Lattner e9235d2dde The code extractor needs dominator info. Provide it
llvm-svn: 12483
2004-03-18 03:48:06 +00:00
Chris Lattner 835a759686 The code extractor needs dominator information, so we provide it.
llvm-svn: 12482
2004-03-18 03:47:46 +00:00
Chris Lattner cee3404d0a Prune #includes, moving the module interface to the front. Note that this
exposed the fact that the header was not self-contained.  There is a reason
we do things :)

llvm-svn: 12481
2004-03-18 03:15:29 +00:00
Chris Lattner 5b460d2ad7 Make this header file self-contained
llvm-svn: 12480
2004-03-18 03:14:56 +00:00
Chris Lattner 3022b1bc2c Fix a HORRIBLY NASTY bug that caused siod to stop working last night.
llvm-svn: 12479
2004-03-17 23:22:04 +00:00
Chris Lattner baf3f62819 Fix a tag-o
llvm-svn: 12477
2004-03-17 21:33:32 +00:00
Chris Lattner 8e8716518e Rewrite the second on AnalysisUsage usage. This documents the new
addRequiredTransitive member that Misha added, and explains the whole
concept a lot better.  Also, the document used incorrect "subsubsection"
tags instead of "doc_subsubsection" which this fixes.

llvm-svn: 12474
2004-03-17 21:09:55 +00:00
Chris Lattner b38cc9c026 When loop extraction succeeds, make sure to map the function pointers over
to avoid dangling references.

llvm-svn: 12470
2004-03-17 17:42:09 +00:00
Chris Lattner 7e51a502bc Fix an inverted condition that causes us to think that loop extraction
accomplished something when it really did not.  This does not fix the bigger problem tho.

llvm-svn: 12469
2004-03-17 17:37:18 +00:00
Chris Lattner 425726d9c2 Fix an iterator invalidation problem in a "buggy" pass
llvm-svn: 12468
2004-03-17 17:29:08 +00:00
Chris Lattner 2820235689 update release notes for 1.2
llvm-svn: 12467
2004-03-17 03:54:41 +00:00
John Criswell d064f2124e Modify test to use the %t substition (temporary name). This is available
in the QMTest Testrunner tests.
Please note that putting output files in the Output directory no longer
works, as QMTest does not build Output directories anymore (nor does the
test run in a separate subdirectory, anyway).

llvm-svn: 12466
2004-03-17 02:31:29 +00:00
Chris Lattner a078f47b39 Fix compilation of mesa, which I broke earlier today
llvm-svn: 12465
2004-03-17 02:02:47 +00:00
Chris Lattner 684fa5ac64 Be more accurate
llvm-svn: 12464
2004-03-17 01:59:27 +00:00
Chris Lattner 10a8d735c8 cleanup comment
llvm-svn: 12463
2004-03-17 01:29:36 +00:00
Alkis Evlogimenos 02a5354d9b Make the set of fixed (preallocated) intervals be a fixed superset of
unhandled + handled. So unhandled is now including all fixed intervals
and fixed intervals never changes when processing a function.

llvm-svn: 12462
2004-03-17 00:48:59 +00:00
Chris Lattner a3783a577e Fix bug in previous checkin
llvm-svn: 12458
2004-03-16 23:36:49 +00:00
Chris Lattner 95057f6ad1 Okay, so there is no reasonable way for tail duplication to update SSA form,
as it is making effectively arbitrary modifications to the CFG and we don't
have a domset/domfrontier implementations that can handle the dynamic updates.
Instead of having a bunch of code that doesn't actually work in practice,
just demote any potentially tricky values to the stack (causing the problem
to go away entirely).  Later invocations of mem2reg will rebuild SSA for us.

This fixes all of the major performance regressions with tail duplication
from LLVM 1.1.  For example, this loop:

---
int popcount(int x) {
  int result = 0;
  while (x != 0) {
    result = result + (x & 0x1);
    x = x >> 1;
  }
  return result;
}
---
Used to be compiled into:

int %popcount(int %X) {
entry:
	br label %loopentry

loopentry:		; preds = %entry, %no_exit
	%x.0 = phi int [ %X, %entry ], [ %tmp.9, %no_exit ]		; <int> [#uses=3]
	%result.1.0 = phi int [ 0, %entry ], [ %tmp.6, %no_exit ]		; <int> [#uses=2]
	%tmp.1 = seteq int %x.0, 0		; <bool> [#uses=1]
	br bool %tmp.1, label %loopexit, label %no_exit

no_exit:		; preds = %loopentry
	%tmp.4 = and int %x.0, 1		; <int> [#uses=1]
	%tmp.6 = add int %tmp.4, %result.1.0		; <int> [#uses=1]
	%tmp.9 = shr int %x.0, ubyte 1		; <int> [#uses=1]
	br label %loopentry

loopexit:		; preds = %loopentry
	ret int %result.1.0
}

And is now compiled into:

int %popcount(int %X) {
entry:
        br label %no_exit

no_exit:                ; preds = %entry, %no_exit
        %x.0.0 = phi int [ %X, %entry ], [ %tmp.9, %no_exit ]          ; <int> [#uses=2]
        %result.1.0.0 = phi int [ 0, %entry ], [ %tmp.6, %no_exit ]             ; <int> [#uses=1]
        %tmp.4 = and int %x.0.0, 1              ; <int> [#uses=1]
        %tmp.6 = add int %tmp.4, %result.1.0.0          ; <int> [#uses=2]
        %tmp.9 = shr int %x.0.0, ubyte 1                ; <int> [#uses=2]
        %tmp.1 = seteq int %tmp.9, 0            ; <bool> [#uses=1]
        br bool %tmp.1, label %loopexit, label %no_exit

loopexit:               ; preds = %no_exit
        ret int %tmp.6
}

llvm-svn: 12457
2004-03-16 23:29:09 +00:00
Chris Lattner bb1a2cc7ab This code was both incredibly complex and incredibly broken. Fix it.
llvm-svn: 12456
2004-03-16 23:23:11 +00:00
Chris Lattner 0e64dda7ca Another simple testcase
llvm-svn: 12455
2004-03-16 23:07:52 +00:00
Brian Gaeke d962dd5528 The .type directive on Solaris uses the # character instead of @.
llvm-svn: 12454
2004-03-16 22:52:04 +00:00
Brian Gaeke 3fb0e203cd Fix bug in zero-extending of shorts.
llvm-svn: 12453
2004-03-16 22:45:42 +00:00
Brian Gaeke ae22ce5370 Add UMULrr and SMULrr instructions.
llvm-svn: 12452
2004-03-16 22:37:13 +00:00
Brian Gaeke ae0ca8baa6 Use ! for comment char; it works in both Solaris as and GAS.
llvm-svn: 12451
2004-03-16 22:37:12 +00:00
Brian Gaeke 67fcefbfef Make getClass more robust by adding cLong.
Add handling for Mul instruction.

llvm-svn: 12450
2004-03-16 22:37:11 +00:00
Chris Lattner 64f2517c07 Bug fixed
llvm-svn: 12449
2004-03-16 21:55:23 +00:00
Chris Lattner bd10066d97 New testcase for PR297
llvm-svn: 12448
2004-03-16 21:52:24 +00:00
Brian Gaeke 33e83b64b4 Add a better head-of-file comment.
llvm-svn: 12447
2004-03-16 21:47:20 +00:00
Chris Lattner 1ab58dd802 Bug not fixed after all
llvm-svn: 12446
2004-03-16 21:39:04 +00:00
Chris Lattner 618c3990c7 Fix test
llvm-svn: 12445
2004-03-16 21:10:15 +00:00
Chris Lattner a0fb904d18 Fix testcase
llvm-svn: 12444
2004-03-16 20:04:55 +00:00
Chris Lattner fa48edfb7d Punt if we see gigantic PHI nodes. This improves a huge interpreter loop
testcase from 32.5s in -raise to take .3s

llvm-svn: 12443
2004-03-16 19:52:53 +00:00
Chris Lattner 7a7b114871 Do not try to optimize PHI nodes with incredibly high degree. This reduces SCCP
time from 615s to 1.49s on a large testcase that has a gigantic switch statement
that all of the blocks in the function go to (an intepreter).

llvm-svn: 12442
2004-03-16 19:49:59 +00:00