1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-27 22:12:47 +01:00
Commit Graph

12007 Commits

Author SHA1 Message Date
Chris Lattner
7f4cd3b0be Two minor improvements:
1. Get rid of the silly abort block.  When doing bb extraction, we get one
     abort block for every block extracted, which is kinda annoying.
  2. If the switch ends up having a single destination, turn it into an
     unconditional branch.

I would like to add support for conditional branches, but to do this we will
want to have the function return a bool instead of a ushort.

llvm-svn: 13478
2004-05-12 03:22:33 +00:00
Chris Lattner
cf43edc33e Don't leave dead bytecode.output files around if the optimizer/block extractor crashes.
llvm-svn: 13477
2004-05-12 02:55:45 +00:00
Misha Brukman
701f4e012f This file has been superseded by docs/index.html .
llvm-svn: 13476
2004-05-12 02:48:30 +00:00
Chris Lattner
9bb62d5754 Implement the final missing bits for block extractor support. Now bugpoint
can extract basic blocks up to the limit of the block extractor implementation.

llvm-svn: 13475
2004-05-12 02:43:24 +00:00
Misha Brukman
9f74e683c2 Add link to Valgrind.
llvm-svn: 13472
2004-05-12 00:57:24 +00:00
Chris Lattner
bc83892156 Implement basic block extraction for the miscompilation debugger. This still needs
two things: the FIXME in ExtractBlocks needs to be implemented, and the basic block
extractor itself needs to have enough bugs fixed for this to be more or less
useful.

Until the time that this is generally useful, it is hidden behind the new bugpoint
-enable-block-extraction option.  I hope to get the FIXME done tonight.

Also of note, this patch adds a -extract-bbs option to bugpoint which can be used
to debug the block extractor.  (hint hint Misha :)

llvm-svn: 13471
2004-05-11 21:54:13 +00:00
Chris Lattner
c698aea90a A class that is meant to be a base class should have a virtual destructor
llvm-svn: 13470
2004-05-11 20:41:07 +00:00
Chris Lattner
b1f605ab70 Add a note to make sure the program is memory correct
llvm-svn: 13464
2004-05-11 19:34:27 +00:00
John Criswell
001d6e428b Added obsequi.
llvm-svn: 13462
2004-05-11 19:29:59 +00:00
Brian Gaeke
f6cd573ee3 Use inttypes.h, which exists on all of Linux, Solaris and Darwin.
llvm-svn: 13461
2004-05-11 16:14:53 +00:00
Chris Lattner
4c6a127461 Unbreak the build on X86.
llvm-svn: 13460
2004-05-11 14:08:54 +00:00
Brian Gaeke
f1f52ea4cc Squash warnings on Solaris/sparc... the test suite is not working for me so I
can't be sure if these are OK, but they look OK.

llvm-svn: 13459
2004-05-11 07:45:28 +00:00
Brian Gaeke
2c5d55fd94 Do not hardcode the name of gcc, because its full pathname may have been
specified by top-level configure

llvm-svn: 13458
2004-05-11 07:42:58 +00:00
Brian Gaeke
a9447a8995 Do not depend on the path to bash
llvm-svn: 13457
2004-05-11 07:42:19 +00:00
Brian Gaeke
2d5a7a7b2f Include <sys/types.h> to get the definition of int64_t on Solaris.
llvm-svn: 13456
2004-05-11 07:18:02 +00:00
Chris Lattner
279d8e8e2d Switch this from using an std::map to using a DenseMap. This speeds up
phi-elimination from 0.6 to 0.54s on kc++.

llvm-svn: 13454
2004-05-10 19:17:36 +00:00
Chris Lattner
3fb5488b5e Use a new VRegPHIUseCount to compute uses of PHI values by other phi values
in the basic block being processed.  This fixes PhiElimination on kimwitu++
from taking 105s to taking a much more reasonable 0.6s (in a debug build).

llvm-svn: 13453
2004-05-10 19:06:37 +00:00
Chris Lattner
8b57a31ff4 Now that we use an ilist of machine instructions, iterators are more robust
than before.  Because this is the case, we can compute the first non-phi
instruction once when de-phi'ing a block.  This shaves ~4s off of
phielimination of _Z7yyparsev in kimwitu++ from 109s -> 105s.  There are
still much more important gains to come.

llvm-svn: 13452
2004-05-10 18:47:18 +00:00
Chris Lattner
a407338e12 Fix a fairly serious pessimizaion that was preventing us from efficiently
compiling things like 'add long %X, 1'.  The problem is that we were switching
the order of the operands for longs even though we can't fold them yet.

llvm-svn: 13451
2004-05-10 15:15:55 +00:00
Chris Lattner
385eb588e0 Bug fixed
llvm-svn: 13450
2004-05-10 14:28:09 +00:00
Chris Lattner
b37490a331 Patch to fix PR337. Make sure to mark all aliased physical registers as used
when we see a read of a register.  This is important in cases like:

AL = ...
AH = ...

   = AX

The read of AX must make both the AL and AH defs live until the use.

llvm-svn: 13444
2004-05-10 05:12:43 +00:00
Chris Lattner
35e874420b Testcase for PR337, which was reduced by Reid Spencer.
llvm-svn: 13443
2004-05-10 05:11:24 +00:00
Reid Spencer
eebac3ea54 Bug 178 Fixed
llvm-svn: 13442
2004-05-09 23:32:39 +00:00
Reid Spencer
b417772e42 Changes to make the Stacker Stack use 64 bit values. This *should* get
around the problem with Stacker on Solaris because the Stack can handle
64-bit entries (pointer sized).

llvm-svn: 13441
2004-05-09 23:20:19 +00:00
Chris Lattner
0962db8f10 Fix some comments, avoid sign extending booleans when zero extend works fine
llvm-svn: 13440
2004-05-09 23:16:33 +00:00
Chris Lattner
d18c637a37 Generate more efficient code for casting booleans to integers (no sign extension required)
llvm-svn: 13439
2004-05-09 22:28:45 +00:00
Chris Lattner
8ccfc21a0f syntactically loopify natural loops so that the GCC loop optimizer can find them. This should *dramatically* improve the performance of CBE compiled code on targets that depend on GCC's loop optimizations (like PPC)
llvm-svn: 13438
2004-05-09 20:41:32 +00:00
Chris Lattner
c6a63660e6 Do not emit prototypes for setjmp/longjmp, as they are handled specially
llvm-svn: 13437
2004-05-09 16:03:29 +00:00
Chris Lattner
7c723ecb57 Fine grainify namespacification
llvm-svn: 13436
2004-05-09 06:22:29 +00:00
Chris Lattner
4926af5c32 Make the floating point constant pools local to each function, split the
FindUsedTypes manipulation stuff out to be a seperate pass, and make the
main CWriter be a function pass now!

llvm-svn: 13435
2004-05-09 06:20:51 +00:00
Brian Gaeke
5bff7f662b Bug fixed.
Rewrite portability intro.

llvm-svn: 13434
2004-05-09 05:28:35 +00:00
Chris Lattner
37abb037bf Get this looking more like a function pass.
llvm-svn: 13433
2004-05-09 04:30:20 +00:00
Chris Lattner
da4ac5d876 Implement the AddPrototypes method
llvm-svn: 13432
2004-05-09 04:29:57 +00:00
Chris Lattner
337ea7709a Add support for inserting all prototypes up-front
llvm-svn: 13431
2004-05-09 04:29:49 +00:00
Chris Lattner
99b7c2b532 Print all PHI copies for successor blocks before the terminator, whether it be a conditional branch or switch.
llvm-svn: 13430
2004-05-09 03:42:48 +00:00
Chris Lattner
0efd1cb264 Fix stupid bug in my checkin yesterday
llvm-svn: 13429
2004-05-08 22:41:42 +00:00
Tanya Lattner
c69bb49340 Fixed up sched graph.
llvm-svn: 13428
2004-05-08 16:14:24 +00:00
Tanya Lattner
9b4ee61855 Registering the ModuloScheduling pass.
llvm-svn: 13427
2004-05-08 16:14:02 +00:00
Tanya Lattner
f97f4f8760 Changed CPUResource to allow access to max num users for a resource.
Also added ModuloScheduling as a friend.

llvm-svn: 13426
2004-05-08 16:13:26 +00:00
Tanya Lattner
b6ecf521da Changed CPUResource to allow access to maxnum users.
llvm-svn: 13425
2004-05-08 16:12:50 +00:00
Tanya Lattner
57339f67d6 Updating my versions of ModuloScheduling in cvs. Still not complete.
llvm-svn: 13424
2004-05-08 16:12:10 +00:00
Brian Gaeke
7cc5d0f106 Add support for widening integral casts.
Flesh out the SetCC support... which currently ends in a little bit
of unfinished code (which is probably completely hilarious) for
generating the condition value splitting the basic block up into 4
blocks, like this (clearly a better API is needed for this!):

       BB
   cond. branch
     /         /          R1=1    R2=0
     \      /
      \    /
    R=phi(R1,R2)

Other minor edits.

llvm-svn: 13423
2004-05-08 06:36:14 +00:00
Brian Gaeke
58fd2b0e4a Add a bunch more branches
llvm-svn: 13422
2004-05-08 06:08:29 +00:00
Brian Gaeke
faf41642ca Flesh out GEP support
llvm-svn: 13421
2004-05-08 05:27:20 +00:00
Brian Gaeke
e44dbd4a39 Add ADD with immediate
llvm-svn: 13420
2004-05-08 05:26:55 +00:00
Brian Gaeke
5861a59506 Add forms of CMP, SUBCC, and a few branches, and some comments.
llvm-svn: 13419
2004-05-08 04:21:32 +00:00
Brian Gaeke
eaf8a021e3 Add stub support for GEPs.
Add support for branches (based loosely on X86/InstSelectSimple).
Add support for not visiting phi nodes in the first pass.
Add support for loading bools.
Flesh out support for stores.

llvm-svn: 13418
2004-05-08 04:21:17 +00:00
Alkis Evlogimenos
76be543a64 Add required header
llvm-svn: 13417
2004-05-08 03:50:03 +00:00
Alkis Evlogimenos
6022169db7 Remove unneeded header
llvm-svn: 13416
2004-05-08 03:49:35 +00:00
Chris Lattner
e3b3e333b0 Implement folding of GEP's like:
%tmp.0 = getelementptr [50 x sbyte]* %ar, uint 0, int 5         ; <sbyte*> [#uses=2]
        %tmp.7 = getelementptr sbyte* %tmp.0, int 8             ; <sbyte*> [#uses=1]

together.  This patch actually allows us to simplify and generalize the code.

llvm-svn: 13415
2004-05-07 22:09:22 +00:00