Commit Graph

997 Commits

Author SHA1 Message Date
Brian Gaeke
d657c42dce Start NextMBBNumber out at zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13515 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 21:35:23 +00:00
Brian Gaeke
0bcb1ad7be 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13514 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 21:35:22 +00:00
Chris Lattner
8abf69374e Switch this from using an std::map to using a DenseMap. This speeds up
phi-elimination from 0.6 to 0.54s on kc++.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13454 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 19:17:36 +00:00
Chris Lattner
80e20eb487 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13453 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 19:06:37 +00:00
Chris Lattner
791f896d9f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13452 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 18:47:18 +00:00
Chris Lattner
6d3848df7e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13444 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 05:12:43 +00:00
Chris Lattner
0979ca7e3e Implement the AddPrototypes method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13432 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 04:29:57 +00:00
Tanya Lattner
73e3e2e10f Updating my versions of ModuloScheduling in cvs. Still not complete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13424 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 16:12:10 +00:00
Alkis Evlogimenos
880e8e4b4c Add required header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13417 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 03:50:03 +00:00
Alkis Evlogimenos
feab248c93 Remove unneeded header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13416 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 03:49:35 +00:00
Chris Lattner
a19eedeb7a numeric_limits::infinity() apparently does not work on all systems. As a
workaround, use the C HUGE_VAL macro instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13377 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 16:25:59 +00:00
Chris Lattner
015959ee38 Operate on the Machine CFG instead of on the LLVM CFG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13302 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 21:24:39 +00:00
Chris Lattner
f25fb4bc64 Stop LiveVariables from using BasicBlocks as part of the mapping, instead
use MachineBasicBlocks.  To do this, we traverse the Machine CFG instead of
the LLVM CFG, which is also *MUCH* more efficient by having fewer levels of
indirections and mappings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13301 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 21:24:24 +00:00
Brian Gaeke
35450d2aaa Include SparcV9RegInfo.h instead of TargetRegInfo.h. This serves as a bit of
documentation that this module needs to be made independent of the
register file description of the current target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13125 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-23 18:15:46 +00:00
Brian Gaeke
da8246bb71 Implement emitWordAt() for the debug emitter and the file printer emitter. (I
am not so sure about the file printer emitter, but the debug emitter change
should be harmless.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13117 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-23 17:11:13 +00:00
Alkis Evlogimenos
6e4d0d6546 Fix bug introduced in previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12872 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-12 20:26:39 +00:00
Alkis Evlogimenos
43b61f724e Correctly compute spill weights
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12869 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-12 17:39:20 +00:00
Alkis Evlogimenos
e633352fd5 Print def lists a bit more compactly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12866 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-12 15:57:58 +00:00
Alkis Evlogimenos
9a8b490735 Add definition list to each live interval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12791 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-09 18:07:57 +00:00
Chris Lattner
b4186e0ccd MBB::remove should not modify the iterator passed in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12572 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-31 21:59:59 +00:00
Chris Lattner
4f6410f5cb MachineBasicBlock::remove should not modify the iterator passed in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12571 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-31 21:59:29 +00:00
Alkis Evlogimenos
a8db01ac83 Correctly update LiveVariables when an instruction changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12561 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-30 22:44:39 +00:00
Brian Gaeke
47b716483e Change how the beginnings and ends of MachineFunctions are printed. Get
rid of the funny cast.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12537 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-29 21:58:31 +00:00
Alkis Evlogimenos
eee91172fb 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
2004-03-17 00:48:59 +00:00
Chris Lattner
6ae9eb1566 Fix PR294
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12425 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 01:45:55 +00:00
Alkis Evlogimenos
39354c99a1 Change MRegisterInfo::foldMemoryOperand to return the folded
instruction to make the API more flexible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12386 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 07:19:51 +00:00
Alkis Evlogimenos
6a367f33f3 Spill explicit physical register defs as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12260 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-09 08:35:13 +00:00
Alkis Evlogimenos
5ae00066c6 As I wrote in the docs, simple is the default spiller :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12189 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-06 23:08:44 +00:00
Alkis Evlogimenos
499b2bad27 Add simple spiller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12188 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-06 22:38:29 +00:00
Brian Gaeke
c54839573c Make MachineOperand's value named 'contents'. Make really, really sure
it is always completely initialized and copied.
Also, fix up many comments and asserts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12100 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-03 19:07:27 +00:00
Alkis Evlogimenos
dd420e060a Add a spiller option to llc. A simple spiller will come soon. When we get CFG in the machine code represenation a global spiller will also be possible. Also document the linear scan register allocator but mark it as experimental for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12062 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 23:18:15 +00:00
Alkis Evlogimenos
5f37502bfb Add the long awaited memory operand folding support for linear scan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12058 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 20:05:10 +00:00
Brian Gaeke
05b15fb075 TargetCacheInfo has been removed; its only uses were to propagate a constant
(16) into certain areas of the SPARC V9 back-end. I'm fairly sure the US IIIi's
dcache has 32-byte lines, so I'm not sure where the 16 came from. However, in
the interest of not breaking things any more than they already are, I'm going
to leave the constant alone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12043 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 06:43:29 +00:00
Tanya Lattner
9b3cbdbedb Adding new Modulo Scheduling graph files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12031 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 02:50:57 +00:00
Tanya Lattner
d14b83733e Removing old graph files with new graph files that I wrote. Updated ModuloScheduling pass, but still in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12030 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 02:50:01 +00:00
Chris Lattner
92bc3bc11c Add an assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12010 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 22:01:51 +00:00
Chris Lattner
c81295ab24 Add back #include I messed up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12009 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 21:40:53 +00:00
Chris Lattner
e8d43fdced Urg, forgot to check this in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12007 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 21:03:08 +00:00
Chris Lattner
08d4963d49 Move the private MachineInstrAnnot.h into a private directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12003 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 19:12:51 +00:00
Chris Lattner
78827e9f8b Remove use of an ugly header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12002 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 19:04:31 +00:00
Chris Lattner
585911ee21 Move methods out of .h file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12001 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 19:02:39 +00:00
Chris Lattner
bceb68807f Eliminate the distinction between "real" and "unreal" instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 06:31:16 +00:00
Chris Lattner
561c0107b2 int64_t -> int
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11977 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 05:07:02 +00:00
Alkis Evlogimenos
fc54e83cea Rename member function to be consistent with the rest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11898 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-27 06:11:15 +00:00
Alkis Evlogimenos
57af2cf6f3 Make spiller push stores right after the definition of a register so
that they are as far away from the loads as possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11895 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-27 04:51:35 +00:00
Alkis Evlogimenos
ddcfd9e6fa Fix crash caused by passing register 0 to
MRegisterInfo::isPhysicalRegister().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11894 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-27 01:52:34 +00:00
Alkis Evlogimenos
8fa16e47f8 Clear maps right after basic block is processed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11892 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 23:22:23 +00:00
Alkis Evlogimenos
71e353ed35 Uncomment assertions that register# != 0 on calls to
MRegisterInfo::is{Physical,Virtual}Register. Apply appropriate fixes
to relevant files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11882 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 22:00:20 +00:00
Chris Lattner
7b1af15612 No need to clear the map here, it will always be empty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11868 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 05:21:21 +00:00
Alkis Evlogimenos
e3fcabe068 Fix bugs found with recent addition of assertions in
MRegisterInfo::is{Physical,Virtual}Register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11849 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 23:21:52 +00:00