Chris Lattner [Fri, 19 Mar 2004 23:34:33 +0000 (23:34 +0000)]
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
Chris Lattner [Fri, 19 Mar 2004 19:22:28 +0000 (19:22 +0000)]
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
Chris Lattner [Fri, 19 Mar 2004 06:08:10 +0000 (06:08 +0000)]
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
Chris Lattner [Fri, 19 Mar 2004 06:07:43 +0000 (06:07 +0000)]
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
Chris Lattner [Fri, 19 Mar 2004 04:26:04 +0000 (04:26 +0000)]
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
Chris Lattner [Fri, 19 Mar 2004 04:21:43 +0000 (04:21 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 17:01:26 +0000 (17:01 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 14:58:55 +0000 (14:58 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 06:41:59 +0000 (06:41 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 06:29:54 +0000 (06:29 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 05:56:32 +0000 (05:56 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 05:55:29 +0000 (05:55 +0000)]
New testcase, reduced from 256.bzip2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12492
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Mar 2004 05:46:10 +0000 (05:46 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 05:43:18 +0000 (05:43 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 05:38:31 +0000 (05:38 +0000)]
Fix CodeExtractor/2004-03-17-UpdatePHIsOutsideRegion.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12489
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Mar 2004 05:33:39 +0000 (05:33 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12488
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Mar 2004 05:28:49 +0000 (05:28 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 04:12:05 +0000 (04:12 +0000)]
Fix CodeExtractor/2004-03-17-OutputMismatch.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12486
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Mar 2004 04:10:02 +0000 (04:10 +0000)]
New testcase that crashes the code extractor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12485
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Mar 2004 03:49:40 +0000 (03:49 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 03:48:06 +0000 (03:48 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 03:47:46 +0000 (03:47 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 03:15:29 +0000 (03:15 +0000)]
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
Chris Lattner [Thu, 18 Mar 2004 03:14:56 +0000 (03:14 +0000)]
Make this header file self-contained
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12480
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 17 Mar 2004 23:22:04 +0000 (23:22 +0000)]
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
Chris Lattner [Wed, 17 Mar 2004 21:33:32 +0000 (21:33 +0000)]
Fix a tag-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12477
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 17 Mar 2004 21:09:55 +0000 (21:09 +0000)]
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
Chris Lattner [Wed, 17 Mar 2004 17:42:09 +0000 (17:42 +0000)]
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
Chris Lattner [Wed, 17 Mar 2004 17:37:18 +0000 (17:37 +0000)]
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
Chris Lattner [Wed, 17 Mar 2004 17:29:08 +0000 (17:29 +0000)]
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
Chris Lattner [Wed, 17 Mar 2004 03:54:41 +0000 (03:54 +0000)]
update release notes for 1.2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12467
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Wed, 17 Mar 2004 02:31:29 +0000 (02:31 +0000)]
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
Chris Lattner [Wed, 17 Mar 2004 02:02:47 +0000 (02:02 +0000)]
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
Chris Lattner [Wed, 17 Mar 2004 01:59:27 +0000 (01:59 +0000)]
Be more accurate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12464
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 17 Mar 2004 01:29:36 +0000 (01:29 +0000)]
cleanup comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12463
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Wed, 17 Mar 2004 00:48:59 +0000 (00:48 +0000)]
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
Chris Lattner [Tue, 16 Mar 2004 23:36:49 +0000 (23:36 +0000)]
Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12458
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 23:29:09 +0000 (23:29 +0000)]
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
Chris Lattner [Tue, 16 Mar 2004 23:23:11 +0000 (23:23 +0000)]
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
Chris Lattner [Tue, 16 Mar 2004 23:07:52 +0000 (23:07 +0000)]
Another simple testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12455
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 16 Mar 2004 22:52:04 +0000 (22:52 +0000)]
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
Brian Gaeke [Tue, 16 Mar 2004 22:45:42 +0000 (22:45 +0000)]
Fix bug in zero-extending of shorts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12453
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 16 Mar 2004 22:37:13 +0000 (22:37 +0000)]
Add UMULrr and SMULrr instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12452
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 16 Mar 2004 22:37:12 +0000 (22:37 +0000)]
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
Brian Gaeke [Tue, 16 Mar 2004 22:37:11 +0000 (22:37 +0000)]
Make getClass more robust by adding cLong.
Add handling for Mul instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12450
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 21:55:23 +0000 (21:55 +0000)]
Bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12449
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 21:52:24 +0000 (21:52 +0000)]
New testcase for PR297
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12448
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 16 Mar 2004 21:47:20 +0000 (21:47 +0000)]
Add a better head-of-file comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12447
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 21:39:04 +0000 (21:39 +0000)]
Bug not fixed after all
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12446
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 21:10:15 +0000 (21:10 +0000)]
Fix test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12445
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 20:04:55 +0000 (20:04 +0000)]
Fix testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12444
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 19:52:53 +0000 (19:52 +0000)]
Punt if we see gigantic PHI nodes. This improves a huge interpreter loop
testcase from 32.5s in -raise to take .3s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12443
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 19:49:59 +0000 (19:49 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12442
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 19:45:22 +0000 (19:45 +0000)]
Do not copy gigantic switch instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12441
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 09:01:10 +0000 (09:01 +0000)]
Fix bug in bug name. It must be the painkillers that I haven't been taking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12440
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 08:54:07 +0000 (08:54 +0000)]
Implement a new feature in the CFE, moving a GCC extension from the unsupported
to the supported list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12439
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 08:49:48 +0000 (08:49 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12437
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 08:40:35 +0000 (08:40 +0000)]
boog fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12436
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 08:38:56 +0000 (08:38 +0000)]
Fix PR296: [execution engines] Unhandled cast constant expression
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12435
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 06:00:15 +0000 (06:00 +0000)]
Fix a regression from this patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20040308/013095.html
Basically, this patch only updated the immediate dominatees of the header node
to tell them that the preheader also dominated them. In practice, ALL
dominatees of the header node are also dominated by the preheader.
This fixes: LoopSimplify/2004-03-15-IncorrectDomUpdate.
and PR293
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12434
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 05:44:02 +0000 (05:44 +0000)]
New testcase for PR293
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12433
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 05:28:35 +0000 (05:28 +0000)]
Bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12432
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 05:18:24 +0000 (05:18 +0000)]
foo Bug 291, bar PR291
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12431
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 05:17:07 +0000 (05:17 +0000)]
foo bug291 bar PR 291
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12430
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 05:16:05 +0000 (05:16 +0000)]
PR291
Bug 291!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12429
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 05:14:47 +0000 (05:14 +0000)]
// Testcase from Bug 291
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12428
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 03:41:35 +0000 (03:41 +0000)]
Add some missing functions. Make sure to handle calls together in case the
client has another VN implementation that can VN calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12427
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 01:51:54 +0000 (01:51 +0000)]
Fix thinko, and PR292
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12426
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Mar 2004 01:45:55 +0000 (01:45 +0000)]
Fix PR294
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12425
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Mon, 15 Mar 2004 17:20:14 +0000 (17:20 +0000)]
Add LAHF instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12424
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 06:38:14 +0000 (06:38 +0000)]
Restore old inlining heuristic. As the comment indicates, this is a nasty
horrible hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12423
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 06:28:07 +0000 (06:28 +0000)]
Ok, the assertion was bogus. Calls that do not read/write memory should not
have an alias set, just like adds and subtracts don't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12422
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 06:24:15 +0000 (06:24 +0000)]
This assertion is bogus now that calls do not necessarily read/write memory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12421
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 05:46:59 +0000 (05:46 +0000)]
Add counters for the number of calls elimianted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12420
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 05:44:59 +0000 (05:44 +0000)]
Implement CSE of call instructions in the most trivial case. This implements
GCSE/call_cse.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12419
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 05:44:29 +0000 (05:44 +0000)]
New testcase for CSE of call instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12418
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 04:18:28 +0000 (04:18 +0000)]
Fix a minor bug, implementing GCSE/call_pure_function.ll
Also, add some stuff I missed before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12417
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 04:17:53 +0000 (04:17 +0000)]
Make sure that pure calls don't kill loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12416
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 04:11:30 +0000 (04:11 +0000)]
Implement LICM of calls in simple cases. This is sufficient to move around
sin/cos/strlen calls and stuff. This implements:
LICM/call_sink_pure_function.ll
LICM/call_sink_const_function.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12415
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 04:10:08 +0000 (04:10 +0000)]
New testcases to test LICM of call instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12414
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 04:08:36 +0000 (04:08 +0000)]
Don't be COMPLETELY pessimistic in the face of function calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12413
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 04:08:18 +0000 (04:08 +0000)]
Tweak argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12412
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 04:07:59 +0000 (04:07 +0000)]
Deinline a couple of methods. Improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12411
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 04:07:29 +0000 (04:07 +0000)]
Deinline some virtual methods, provide better mod/ref answers through the
use of the boolean queries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12410
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 04:06:46 +0000 (04:06 +0000)]
Pass through the boolean queries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12409
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 03:36:49 +0000 (03:36 +0000)]
Teach basicaa about some stdc functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12408
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 01:58:54 +0000 (01:58 +0000)]
Add two new methods which can be used to enable a bunch of transformations
in common cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12407
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 01:26:44 +0000 (01:26 +0000)]
Mostly cosmetic improvements. Do fix the bug where a global value was considered an input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12406
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 01:18:23 +0000 (01:18 +0000)]
Assert that input blocks meet the invariants we expect
Simplify the input/output finder. All elements of a basic block are
instructions. Any used arguments are also inputs. An instruction can only
be used by another instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12405
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 00:08:49 +0000 (00:08 +0000)]
New testcase that causes the code extractor to generate bogus code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12404
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Mar 2004 00:02:02 +0000 (00:02 +0000)]
Fix several bugs in the loop extractor. In particular, subloops were never
extracted, and a function that contained a single top-level loop never had
the loop extracted, regardless of how much non-loop code there was.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12403
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Mar 2004 23:43:24 +0000 (23:43 +0000)]
No correctness fixes here, just minor qoi fixes:
* Don't insert a branch to the switch instruction after the call, just
make it a single block.
* Insert the new alloca instructions in the entry block of the original
function instead of having them execute dynamically
* Don't make the default edge of the switch instruction go back to the switch.
The loop extractor shouldn't create new loops!
* Give meaningful names to the alloca slots and the reload instructions
* Some minor code simplifications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12402
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Mar 2004 23:05:49 +0000 (23:05 +0000)]
Simplify code a bit, and fix bug CodeExtractor/2004-03-14-NoSwitchSupport.ll
This also implements a two minor improvements:
* Don't insert live-out stores IN the region, insert them on the code path
that exits the region
* If the region is exited to the same block from multiple paths, share the
switch statement entry, live-out store code, and the basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12401
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Mar 2004 22:34:55 +0000 (22:34 +0000)]
Simplify the code a bit by making the collection of basic blocks to extract
a member of the class. While we're at it, turn the collection into a set
instead of a vector to improve efficiency and make queries simpler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12400
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Mar 2004 22:16:52 +0000 (22:16 +0000)]
New testcase that crashes the loop extractor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12399
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Mar 2004 22:08:00 +0000 (22:08 +0000)]
After reducing a miscompiled program down to the functions which are being
miscompiled, try to use the loop extractor to reduce the program down to a
loop nest that is being miscompiled. In practice, the loop extractor appears
to have too many bugs for this to be useful, but hopefully they will be fixed
soon...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12398
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Mar 2004 21:37:41 +0000 (21:37 +0000)]
Fix a minor bug in runPassesOn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12397
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Mar 2004 21:21:57 +0000 (21:21 +0000)]
Add a new "AutoDebugCrashes" option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12396
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Mar 2004 21:17:22 +0000 (21:17 +0000)]
Refactor to use a new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12395
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Mar 2004 21:17:03 +0000 (21:17 +0000)]
Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12394
91177308-0d34-0410-b5e6-
96231b3b80d8