Commit Graph

11167 Commits

Author SHA1 Message Date
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
Chris Lattner a64923ad26 Do not copy gigantic switch instructions
llvm-svn: 12441
2004-03-16 19:45:22 +00:00
Chris Lattner 0ea6017b87 Fix bug in bug name. It must be the painkillers that I haven't been taking
llvm-svn: 12440
2004-03-16 09:01:10 +00:00
Chris Lattner d3dc850c6c Implement a new feature in the CFE, moving a GCC extension from the unsupported
to the supported list

llvm-svn: 12439
2004-03-16 08:54:07 +00:00
Chris Lattner 91d855f150 New testcase
llvm-svn: 12437
2004-03-16 08:49:48 +00:00
Chris Lattner e1f5161c18 boog fixed
llvm-svn: 12436
2004-03-16 08:40:35 +00:00
Chris Lattner 5def7a57c1 Fix PR296: [execution engines] Unhandled cast constant expression
llvm-svn: 12435
2004-03-16 08:38:56 +00:00
Chris Lattner db5b8f4d6b 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

llvm-svn: 12434
2004-03-16 06:00:15 +00:00
Chris Lattner 767858af43 New testcase for PR293
llvm-svn: 12433
2004-03-16 05:44:02 +00:00
Chris Lattner 0128c9a6de Bug fixed
llvm-svn: 12432
2004-03-16 05:28:35 +00:00
Chris Lattner 6f67017bf4 foo Bug 291, bar PR291
llvm-svn: 12431
2004-03-16 05:18:24 +00:00
Chris Lattner 6b736d8b32 foo bug291 bar PR 291
llvm-svn: 12430
2004-03-16 05:17:07 +00:00
Chris Lattner 29db00a4e0 PR291
Bug 291!

llvm-svn: 12429
2004-03-16 05:16:05 +00:00
Chris Lattner cf2608c0e9 // Testcase from Bug 291
llvm-svn: 12428
2004-03-16 05:14:47 +00:00
Chris Lattner 8ad948ddbd Add some missing functions. Make sure to handle calls together in case the
client has another VN implementation that can VN calls.

llvm-svn: 12427
2004-03-16 03:41:35 +00:00
Chris Lattner 8726ebd326 Fix thinko, and PR292
llvm-svn: 12426
2004-03-16 01:51:54 +00:00
Chris Lattner e0b49952f6 Fix PR294
llvm-svn: 12425
2004-03-16 01:45:55 +00:00
Alkis Evlogimenos 804dc659b6 Add LAHF instruction
llvm-svn: 12424
2004-03-15 17:20:14 +00:00
Chris Lattner 95ce36da0d Restore old inlining heuristic. As the comment indicates, this is a nasty
horrible hack.

llvm-svn: 12423
2004-03-15 06:38:14 +00:00
Chris Lattner 7f04ebc858 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.

llvm-svn: 12422
2004-03-15 06:28:07 +00:00
Chris Lattner f5c8f4cea6 This assertion is bogus now that calls do not necessarily read/write memory
llvm-svn: 12421
2004-03-15 06:24:15 +00:00
Chris Lattner cd83282df1 Add counters for the number of calls elimianted
llvm-svn: 12420
2004-03-15 05:46:59 +00:00
Chris Lattner 53a3587997 Implement CSE of call instructions in the most trivial case. This implements
GCSE/call_cse.ll

llvm-svn: 12419
2004-03-15 05:44:59 +00:00