Commit Graph

11448 Commits

Author SHA1 Message Date
Chris Lattner
40bdfe5554 Make sure to get the headers from zlib correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12521 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-26 17:04:53 +00:00
Chris Lattner
4df1b8aa26 X % -1 == X % 1 == 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12520 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-26 16:11:24 +00:00
Chris Lattner
ebd985cb87 Two changes:
#1 is to unconditionally strip constantpointerrefs out of
instruction operands where they are absolutely pointless and inhibit
optimization.  GRRR!

#2 is to implement InstCombine/getelementptr_const.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12519 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-25 22:59:29 +00:00
Chris Lattner
f6e59410ee New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12518 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-25 22:59:06 +00:00
Chris Lattner
698c4a4bbb Minor efficiency improvement, finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12517 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-25 22:56:03 +00:00
Chris Lattner
a553f62738 Add note about setting up linux systems to directly execute LLVM bytecode files
Fixes PR303


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12516 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-25 20:38:40 +00:00
Chris Lattner
e151259288 Hrm, we were leaking ~1M of garbage that valgrind never told us about because
it was "reachable".  Cute.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12515 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-19 23:34:33 +00:00
Chris Lattner
6a39aa52f0 Add a dose of reality into the release notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12510 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-19 19:22:28 +00:00
Chris Lattner
7c881dffc9 Teach the optimizer to delete zero sized alloca's (but not mallocs!)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12507 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-19 06:08:10 +00:00
Chris Lattner
f3fbddd333 New testcase, the optimizer can delete zero sized allocas
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12506 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-19 06:07:43 +00:00
Chris Lattner
76cddb08cb Perhaps the last bugfix before the release? HOPEFULLY! :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12505 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-19 04:26:04 +00:00
Chris Lattner
6b835360f1 Fix PR299: [Sparc] Code generator asserts on alloc of zero size type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12504 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-19 04:21:43 +00:00
Chris Lattner
ab18020cbd Malloc doesn't kill a load. This patch need not go into 1.2 though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12500 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 17:01:26 +00:00
Chris Lattner
d5fc4fcecf Fix a minor wording bug in the manual
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12496 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 14:58:55 +00:00
Chris Lattner
43aaf66a39 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12495 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 06:41:59 +00:00
Chris Lattner
85c84e759e 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?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12494 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 06:29:54 +00:00
Chris Lattner
aa7ab53b99 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12493 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 05:56:32 +00:00
Chris Lattner
a930de523f New testcase, reduced from 256.bzip2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12492 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 05:55:29 +00:00
Chris Lattner
f6e43bc796 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!!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12491 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 05:46:10 +00:00
Chris Lattner
fdded9f95a Fix problem with PHI nodes having multiple predecessors from different
exit nodes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12490 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 05:43:18 +00:00
Chris Lattner
d07f899691 Fix CodeExtractor/2004-03-17-UpdatePHIsOutsideRegion.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12489 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 05:38:31 +00:00
Chris Lattner
fa3e86f93d New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12488 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 05:33:39 +00:00
Chris Lattner
5cc8ca6420 Seriously simplify and correct the PHI node handling code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12487 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 05:28:49 +00:00
Chris Lattner
04229c192b Fix CodeExtractor/2004-03-17-OutputMismatch.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12486 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 04:12:05 +00:00
Chris Lattner
959754e70c New testcase that crashes the code extractor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12485 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 04:10:02 +00:00
Chris Lattner
b5c1dbf503 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12484 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 03:49:40 +00:00
Chris Lattner
369287bab5 The code extractor needs dominator info. Provide it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12483 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 03:48:06 +00:00
Chris Lattner
268316ee14 The code extractor needs dominator information, so we provide it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12482 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 03:47:46 +00:00
Chris Lattner
33e197b777 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 :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12481 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 03:15:29 +00:00
Chris Lattner
e454c0d607 Make this header file self-contained
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12480 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-18 03:14:56 +00:00
Chris Lattner
4781bc7142 Fix a HORRIBLY NASTY bug that caused siod to stop working last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12479 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 23:22:04 +00:00
Chris Lattner
a577630ec0 Fix a tag-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12477 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 21:33:32 +00:00
Chris Lattner
892562779c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12474 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 21:09:55 +00:00
Chris Lattner
d3a533d94d When loop extraction succeeds, make sure to map the function pointers over
to avoid dangling references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12470 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 17:42:09 +00:00
Chris Lattner
7fa44fca30 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12469 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 17:37:18 +00:00
Chris Lattner
9d5968dd51 Fix an iterator invalidation problem in a "buggy" pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12468 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 17:29:08 +00:00
Chris Lattner
835104c58e update release notes for 1.2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12467 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 03:54:41 +00:00
John Criswell
2942e6356b 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12466 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 02:31:29 +00:00
Chris Lattner
7acd1ccb8a Fix compilation of mesa, which I broke earlier today
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12465 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 02:02:47 +00:00
Chris Lattner
e911979650 Be more accurate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12464 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 01:59:27 +00:00
Chris Lattner
8f71b63bea cleanup comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12463 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 01:29:36 +00:00
Alkis Evlogimenos
eee91172fb 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12462 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 00:48:59 +00:00
Chris Lattner
50eafbc828 Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12458 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 23:36:49 +00:00
Chris Lattner
24ad00db5a 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
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12457 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 23:29:09 +00:00
Chris Lattner
c1a0623e86 This code was both incredibly complex and incredibly broken. Fix it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12456 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 23:23:11 +00:00
Chris Lattner
df22f9c41b Another simple testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12455 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 23:07:52 +00:00
Brian Gaeke
54cc3c2135 The .type directive on Solaris uses the # character instead of @.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12454 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 22:52:04 +00:00
Brian Gaeke
6d339f9000 Fix bug in zero-extending of shorts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12453 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 22:45:42 +00:00
Brian Gaeke
032f80fbf1 Add UMULrr and SMULrr instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12452 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 22:37:13 +00:00
Brian Gaeke
79db7405f7 Use ! for comment char; it works in both Solaris as and GAS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12451 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 22:37:12 +00:00