Commit Graph

11888 Commits

Author SHA1 Message Date
Brian Gaeke 99e7c1cf44 Fix a comment.
llvm-svn: 13518
2004-05-12 21:57:23 +00:00
Chris Lattner 6307b8d061 Fix a really nasty bug from my changes on Monday to PHIElim. These changes
broke obsequi and a lot of other things.  It all boiled down to MBB being
overloaded in an inner scope and me confusing it with the one in the outer
scope.  Ugh!

llvm-svn: 13517
2004-05-12 21:47:57 +00:00
Misha Brukman fa50a224bf Break lines at 80 cols; eliminate extra space caused by a single <p> tag on a
line by itself.

llvm-svn: 13516
2004-05-12 21:46:05 +00:00
Brian Gaeke 4cf17775e8 Start NextMBBNumber out at zero.
llvm-svn: 13515
2004-05-12 21:35:23 +00:00
Brian Gaeke cb5d22a0cb Add non-const MachineBasicBlock::getParent() accessor method.
MBBs start out as #-1. When a MBB is added to a MachineFunction, it
gets the next available unique MBB number. If it is removed from a
MachineFunction, it goes back to being #-1.

llvm-svn: 13514
2004-05-12 21:35:22 +00:00
Brian Gaeke 379e609e3d Add a NextMBBNumber field w/ incrementing accessor method, for
function-level unique numbering of MBBs.

llvm-svn: 13513
2004-05-12 21:35:21 +00:00
Brian Gaeke 00db6be879 Add a Number field w/ accessor method, for function-level unique numbering
of MBBs.

Add non-const MachineBasicBlock::getParent() accessor method.

llvm-svn: 13512
2004-05-12 21:35:20 +00:00
Chris Lattner c9ebda0fcd Make the subsubsections stand out a bit more
llvm-svn: 13511
2004-05-12 21:28:08 +00:00
Misha Brukman fdb2b17b3c These images have been moved to img/
llvm-svn: 13510
2004-05-12 21:26:39 +00:00
Misha Brukman 3c1f8e7aa7 Use the images in the img/ directory.
llvm-svn: 13509
2004-05-12 21:26:16 +00:00
Misha Brukman 746c5181cd Finally, switch to a stylesheet that makes the documentation easier on the eyes
and consistent with the LLVM website.

llvm-svn: 13508
2004-05-12 21:20:56 +00:00
Misha Brukman 9d05fbf7be Centralize images in this dir; add lines.gif from website for consistent
formatting.

llvm-svn: 13507
2004-05-12 21:20:13 +00:00
Misha Brukman e15655b404 Make file use stylesheets and be HTML-4.01 (Strict)-compliant.
llvm-svn: 13506
2004-05-12 20:57:43 +00:00
Misha Brukman 6eb0085f65 Made document HTML-4.01 (Strict)-compliant.
llvm-svn: 13505
2004-05-12 19:52:00 +00:00
Misha Brukman c1aac03803 Make file standard-compliant once again.
llvm-svn: 13504
2004-05-12 19:25:59 +00:00
Misha Brukman f91d994801 Made file comply with HTML-4.01 (Strict)
llvm-svn: 13503
2004-05-12 19:21:57 +00:00
Chris Lattner 5f49573cf6 Turn the block extractor on by default now that it basically works, eliminating the option.
llvm-svn: 13502
2004-05-12 19:02:44 +00:00
Misha Brukman c06c9332ab Made file HTML-4.01 (Strict)-compliant.
llvm-svn: 13501
2004-05-12 18:57:54 +00:00
Misha Brukman 4478f2b039 Made to be HTML-4.01 (Strict)-compliant.
llvm-svn: 13500
2004-05-12 18:49:47 +00:00
Misha Brukman 374258e5ce Made to be HTML-4.01 (Strict) -compliant.
llvm-svn: 13499
2004-05-12 18:42:35 +00:00
Misha Brukman d4f290a8ae Add proper footer since this file is HTML-4.01 compliant.
llvm-svn: 13498
2004-05-12 18:37:22 +00:00
Misha Brukman 692cec07db Make document HTML-4.01 (Strict) compliant.
llvm-svn: 13497
2004-05-12 18:31:21 +00:00
Misha Brukman 55ba220cee Fix grammar: remove `the' before LLVM.
llvm-svn: 13496
2004-05-12 18:02:00 +00:00
Misha Brukman 8e33feddac * Make the document format follow the stringent purple standards (like the rest
of the documentation)
* Do not make the link text be the link itself, use some keywords
* Make doc use stylesheets and HTML markup for lists instead of definitions
* Shorten page by not making multiple lines per link with description + link of
  the same name as the target

llvm-svn: 13495
2004-05-12 18:00:48 +00:00
Chris Lattner e2d382e1a4 Pass boolean constants into function calls more efficiently, generating:
mov DWORD PTR [%ESP + 4], 1

instead of:

        mov %EAX, 1
        mov DWORD PTR [%ESP + 4], %EAX

llvm-svn: 13494
2004-05-12 16:35:04 +00:00
Chris Lattner 66219abac7 Do not pass in the same argument to the extracted function more than once, and
give the extracted function a more useful name than just foo_code.

llvm-svn: 13493
2004-05-12 16:26:18 +00:00
Chris Lattner 6c0c313daf Check to see if all blocks are extractible first.
llvm-svn: 13491
2004-05-12 16:08:01 +00:00
Chris Lattner 13d2ddfe9c Implement support for code extracting basic blocks that have a return
instruction in them.

llvm-svn: 13490
2004-05-12 16:07:41 +00:00
Chris Lattner 795c9933e2 Implement splitting of PHI nodes, allowing block extraction of BB's that have
PHI node entries from multiple outside-the-region blocks.  This also fixes
extraction of the entry block in a function.  Yaay.

This has successfully block extracted all (but one) block from the score_move
function in obsequi (out of 33).  Hrm, I wonder which block the bug is in.  :)

llvm-svn: 13489
2004-05-12 15:29:13 +00:00
Chris Lattner 3b2917bfcf * Pull some code out into the definedInRegion/definedInCaller methods
* Add a stub for the severSplitPHINodes which will allow us to bbextract
  bb's with PHI nodes in them soon.
* Remove unused arguments from findInputsOutputs
* Dramatically simplify the code in findInputsOutputs.  In particular,
  nothing really cares whether or not a PHI node is using something.
* Move moveCodeToFunction to after emitCallAndSwitchStatement as that's the
  order they get called.
* Fix a bug where we would code extract a region that included a call to
  vastart.  Like 'alloca', calls to vastart must stay in the function that
  they are defined in.
* Add some comments.

llvm-svn: 13482
2004-05-12 06:01:40 +00:00
Chris Lattner ffc4926263 Generate substantially better code when there are a limited number of exits
from the extracted region.  If the return has 0 or 1 exit blocks, the new
function returns void.  If it has 2 exits, it returns bool, otherwise it
returns a ushort as before.

This allows us to use a conditional branch instruction when there are two
exit blocks, as often happens during block extraction.

llvm-svn: 13481
2004-05-12 04:14:24 +00:00
Chris Lattner 3d1ca67fdd 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 af24e90c51 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 5ed8cf5f1e This file has been superseded by docs/index.html .
llvm-svn: 13476
2004-05-12 02:48:30 +00:00
Chris Lattner 49e4a33c98 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 b797a4f968 Add link to Valgrind.
llvm-svn: 13472
2004-05-12 00:57:24 +00:00
Chris Lattner a060b10ee5 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 d7d574db01 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 415532491a Add a note to make sure the program is memory correct
llvm-svn: 13464
2004-05-11 19:34:27 +00:00
John Criswell 1aaea06cbc Added obsequi.
llvm-svn: 13462
2004-05-11 19:29:59 +00:00
Brian Gaeke 4db22f625e 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 9dca2d7852 Unbreak the build on X86.
llvm-svn: 13460
2004-05-11 14:08:54 +00:00
Brian Gaeke a9cfeeb826 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 f120c9d69b 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 b6b0f46220 Do not depend on the path to bash
llvm-svn: 13457
2004-05-11 07:42:19 +00:00
Brian Gaeke 940c2a8306 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 24f200ad7b 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 39a1e0a33e 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 a2f7b9bddc 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 72fb3256f8 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