1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

50 Commits

Author SHA1 Message Date
Chris Lattner
616a120782 re-re-revert this, back to the right revision. It currently breaks bisort/mst
in olden among others.

llvm-svn: 30637
2006-09-28 00:11:54 +00:00
Chris Lattner
72d308b1e8 re-revert this patch, bisort and mst are still broken in Olden.
llvm-svn: 30634
2006-09-28 00:04:21 +00:00
Bill Wendling
9b8d1f3eb6 Reapplying this patch. With the newest commits, the error in Olden/bisort
has disappeared.

llvm-svn: 30633
2006-09-27 22:37:35 +00:00
Chris Lattner
f5e5429cf9 Temporarily revert this. This breaks Olden/bisort on PPC
llvm-svn: 30628
2006-09-27 16:59:16 +00:00
Bill Wendling
cd762f5482 PR878: Instead of calculating the vreg to PHI use count everytime we get
a function, do it up front in linear time (going through all of the
instructions once). We create a map out of them. Then it's no problem to
use the information in it during elimination...

llvm-svn: 30624
2006-09-27 09:04:15 +00:00
Chris Lattner
33bd5dcfb7 s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|
llvm-svn: 29911
2006-08-27 12:54:02 +00:00
Chris Lattner
d4ee71db50 Fix an obvious bug, noticed by inspection. No current targets trigger this.
llvm-svn: 29648
2006-08-12 05:41:39 +00:00
Andrew Lenharth
c1074954fb Reduce number of exported symbols
llvm-svn: 29220
2006-07-20 17:28:38 +00:00
Chris Lattner
496bd3fbf6 Use hidden visibility to make symbols in an anonymous namespace get
dropped.  This shrinks libllvmgcc.dylib another 67K

llvm-svn: 28975
2006-06-28 23:17:24 +00:00
Chris Lattner
19343b85fd Add support for targets (like Alpha) that have terminator instructions which
use virtual registers.  We now allow the first instruction in a block of
terminators to use virtual registers, and update phi elimination to correctly
update livevar when eliminating phi's.  This fixes a problem on a testcase
Andrew sent me.

llvm-svn: 25083
2006-01-04 07:12:21 +00:00
Chris Lattner
c3ff71cc3a Add an assertion, update DefInst even though no one uses it (dangling pointers
don't help anyone)

llvm-svn: 25081
2006-01-04 06:47:48 +00:00
Chris Lattner
7754dd8231 clean up this code a bit, no functionality change
llvm-svn: 23609
2005-10-03 07:22:07 +00:00
Chris Lattner
018dc6d807 Break the body of the loop out into a new method
llvm-svn: 23606
2005-10-03 04:47:08 +00:00
Chris Lattner
7e3441972b adjust to new live variables interface
llvm-svn: 22992
2005-08-23 23:42:17 +00:00
Misha Brukman
1996bf6ea5 * Order #includes alphabetically
* Remove commented-out debug printouts

llvm-svn: 21707
2005-05-05 23:45:17 +00:00
Misha Brukman
a9a1982a44 Convert tabs to spaces
llvm-svn: 21439
2005-04-22 04:01:18 +00:00
Misha Brukman
774e55c446 Remove trailing whitespace
llvm-svn: 21420
2005-04-21 22:36:52 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner
a894b79444 Update live intervals more accurately for PHI elim. This slightly reduces
the live intervals for some registers.

llvm-svn: 15125
2004-07-23 05:27:43 +00:00
Chris Lattner
9c326b6cc8 costmetic changes
llvm-svn: 15118
2004-07-22 23:05:12 +00:00
Chris Lattner
22728e2f27 There is no need to store the MBB along with the MI any more, we can now
ask instructions for their parent.

llvm-svn: 14998
2004-07-19 07:04:55 +00:00
Chris Lattner
6c34920110 Simplify the interface to LiveVariables::addVirtualRegister(Killed|Dead)
llvm-svn: 14997
2004-07-19 06:55:21 +00:00
Chris Lattner
ae4f21e30a Start using MBB numbers directly instead of going through the live variables
map.

llvm-svn: 14518
2004-07-01 04:29:47 +00:00
Chris Lattner
0046ea7105 Adjust to new TargetMachine interface
llvm-svn: 13956
2004-06-02 05:57:12 +00:00
Chris Lattner
f29acd5214 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
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
c09a94de9e Operate on the Machine CFG instead of on the LLVM CFG
llvm-svn: 13302
2004-05-01 21:24:39 +00:00
Chris Lattner
2cc4a29665 MachineBasicBlock::remove should not modify the iterator passed in
llvm-svn: 12571
2004-03-31 21:59:29 +00:00
Chris Lattner
1bf9dde4a1 Finegrainify namespacification
llvm-svn: 11757
2004-02-23 18:38:20 +00:00
Alkis Evlogimenos
9b103024ef Refactor rewinding code for finding the first terminator of a basic
block into MachineBasicBlock::getFirstTerminator().

This also fixes a bug in the implementation of the above in both
RegAllocLocal and InstrSched, where instructions where added after the
terminator if the basic block's only instruction was a terminator (it
shouldn't matter for RegAllocLocal since this case never occurs in
practice).

llvm-svn: 11748
2004-02-23 18:14:48 +00:00
Alkis Evlogimenos
a31a767307 Use newly added next() and prior() utility functions.
llvm-svn: 11430
2004-02-14 01:18:34 +00:00
Alkis Evlogimenos
6d6ab846af Remove getAllocatedRegNum(). Use getReg() instead.
llvm-svn: 11393
2004-02-13 21:01:20 +00:00
Alkis Evlogimenos
b755d35fd2 Change MachineBasicBlock's vector of MachineInstr pointers into an
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.

llvm-svn: 11340
2004-02-12 02:27:10 +00:00
Chris Lattner
37e040ee03 Do not use MachineOperand::isVirtualRegister either!
llvm-svn: 11283
2004-02-10 21:12:22 +00:00
Alkis Evlogimenos
29127b8825 Change interface of MachineOperand as follows:
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse()
    b) add isUse(), isDef()
    c) rename opHiBits32() to isHiBits32(),
              opLoBits32() to isLoBits32(),
              opHiBits64() to isHiBits64(),
              opLoBits64() to isLoBits64().

This results to much more readable code, for example compare
"op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used
very often in the code.

llvm-svn: 10461
2003-12-14 13:24:17 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
b402729b30 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
2d6049baaf Const correctness fixes
llvm-svn: 7349
2003-07-26 23:24:56 +00:00
Chris Lattner
060e5e326b Fix bug: Jello/2003-06-04-bzip2-bug.ll
llvm-svn: 6624
2003-06-05 17:15:04 +00:00
Vikram S. Adve
681b3c77fa (1) Added special register class containing (for now) %fsr.
Fixed spilling of %fcc[0-3] which are part of %fsr.

(2) Moved some machine-independent reg-class code to class TargetRegInfo
    from SparcReg{Class,}Info.

(3) Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
    and related functions and flags.  Fixed several bugs where only
    "isDef" was being checked, not "isDefAndUse".

llvm-svn: 6341
2003-05-27 00:05:23 +00:00
Chris Lattner
a4fe60d3c1 Use a kill, not a dead definition, update comment
llvm-svn: 6131
2003-05-12 17:37:30 +00:00
Chris Lattner
e78921f048 * Keep LiveVariable information more up-to-date and consistent
* *** Finally mark values that are inputs to PHIs as killed when appropriate.
   This should make the generated code quite a bit better.  For example, the
   local-ra will not have to spill PHI inputs at the end of predecessor BB's
   anymore.

llvm-svn: 6117
2003-05-12 14:28:28 +00:00
Chris Lattner
ce4b5cd9bf Fix bug where we could iterate off the end of a basic block
llvm-svn: 6116
2003-05-12 14:26:38 +00:00
Chris Lattner
3ab77b0589 Fix N^2 algorithm
llvm-svn: 6112
2003-05-12 04:08:54 +00:00
Chris Lattner
30e6616afa * Fix several comments
* Update LiveVar info better, fixing bug: Jello/2003-05-11-PHIRegAllocBug.ll

llvm-svn: 6110
2003-05-12 03:55:21 +00:00
Chris Lattner
3228091a65 Fix problems with empty basic blocks
llvm-svn: 5326
2003-01-16 18:06:43 +00:00
Chris Lattner
b27d60ccf1 Rename MachineInstrInfo -> TargetInstrInfo
llvm-svn: 5272
2003-01-14 22:00:31 +00:00
Chris Lattner
76e5849ba6 New files
llvm-svn: 5262
2003-01-13 20:01:16 +00:00