Commit Graph

1200 Commits

Author SHA1 Message Date
Alkis Evlogimenos
2c4f7b5faa Grow the map on entry so that we don't crash if joinIntervals never
runs (if coalescing is disabled for example).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16259 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-09 19:24:38 +00:00
Alkis Evlogimenos
5d0d1e350a Use a DenseMap for mapping reg->reg. This improves the LiveInterval
analysis running time from 2.7869secs to 2.5226secs on 176.gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16244 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-08 03:01:50 +00:00
Alkis Evlogimenos
76d9dacceb Indent to 2 spaces and cleanup excess whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16188 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-05 18:41:35 +00:00
Alkis Evlogimenos
a63828619f Indent to 2 spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16187 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-05 18:39:20 +00:00
Misha Brukman
08a6c7614b Order #includes alphabetically, local .h files first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16153 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-03 18:25:53 +00:00
Alkis Evlogimenos
20aa474f8f Fixes to make LLVM compile with vc7.1.
Patch contributed by Paolo Invernizzi!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16152 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-03 18:19:51 +00:00
Alkis Evlogimenos
70619fae28 Change the way we choose a free register: instead of picking the first
free allocatable register, we prefer the a free one with the most uses
of inactive intervals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16148 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-02 21:24:33 +00:00
Alkis Evlogimenos
84f5bcb013 Change the way we choose a free register: instead of picking the first
free allocatable register, we prefer the a free one with the most uses
of inactive intervals. This causes less spills and performes a bit
better compared to gcc:

Program                 | GCC/LLC (Before)| GCC/LLC (After)
164.gzip/164.gzip       | 0.59            | 0.60
175.vpr/175.vpr         | 0.57            | 0.58
176.gcc/176.gcc         | 0.59            | 0.61
181.mcf/181.mcf         | 0.94            | 0.95
186.crafty/186.crafty   | 0.62            | 0.62
197.parser/197.parser   | 0.89            | 0.88
252.eon/252.eon         | 0.61            | 0.66
253.perlbmk/253.perlbmk | 0.79            | 0.84
254.gap/254.gap         | 0.81            | 0.81
255.vortex/255.vortex   | 0.92            | 0.93
256.bzip2/256.bzip2     | 0.69            | 0.69
300.twolf/300.twolf     | 0.91            | 0.90


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16147 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-02 21:23:32 +00:00
Alkis Evlogimenos
82b4955f96 We don't need to sort the added vector as unhandled intervals are
stored in a binary heap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16143 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-02 18:00:38 +00:00
Reid Spencer
551ccae044 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/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Alkis Evlogimenos
ed543731fb Be a bit more efficient when processing the active and inactive
lists. Instead of scanning the vector backwards, scan it forward and
swap each element we want to erase. Then at the end erase all removed
intervals at once. This doesn't save much: 0.08s out of 4s when
compiling 176.gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:52:29 +00:00
Alkis Evlogimenos
2e58a41089 Give a better assertion if we see a use before a def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16135 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:34:52 +00:00
Alkis Evlogimenos
d19e2901c1 Minor code clarity changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16123 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-31 17:39:15 +00:00
Nate Begeman
81ab877a0c Put this change back in after testing from Reid proved its innocence. getSpillSize now returns value in bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16102 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 22:00:24 +00:00
Alkis Evlogimenos
81bc6e377e Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16077 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-28 22:43:31 +00:00
Alkis Evlogimenos
ca5d1c378c Now that LiveIntervals::addIntervalsForSpills is fixed, do not require
LiveVariables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16076 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 19:00:29 +00:00
Alkis Evlogimenos
d8d26b3268 Only update LiveVariables if it is available. addIntervalsForSpills
runs after the initial run of the live interval analysis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16075 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 18:59:22 +00:00
Alkis Evlogimenos
ccdf21af1f Back out this change as it broke the build last night. This should be
investicated further as the linearscan variants don't really need
LiveVariables...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16074 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 18:01:21 +00:00
Nate Begeman
bd2efb9600 Back out change to divide getSpillSize by 8 until I figure out why it breaks x86, which has register sizes in bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16073 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 16:48:24 +00:00
Alkis Evlogimenos
3f06e68783 The linear scan variants do not require the LiveVariables analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16071 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 04:51:13 +00:00
Nate Begeman
5709998993 Register sizes are in bits, not bytes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16070 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 04:28:10 +00:00
Alkis Evlogimenos
22a2f6d5b0 Use newly added API in MRegisterInfo and don't expose the allocatable
register set anymore. Its users now use the MRegisterInfo API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16061 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-26 22:23:32 +00:00
Alkis Evlogimenos
5327801fb8 Use newly added API in MRegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16060 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-26 22:22:38 +00:00
Chris Lattner
d0d0a1a08f Fix a bug in a previous checkin of mine, correcting
Regression.CodeGen.Generic.2004-04-09-SameValueCoalescing.llx and the
code size problem.

This bug prevented us from doing most register coallesces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16031 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 17:48:29 +00:00
Chris Lattner
7af2865fc6 Do not use .xword and friends to emit zeros on V9. Apparently there are issues
with emitting .xwords when not on an 8-byte boundary (.xword 0 is not the
same as 8 .byte 0's).  Because we do not know when or when we are not aligned,
just emit bytes like the old V9 asmprinter did.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16006 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 00:26:11 +00:00
Chris Lattner
7008034c9f Register info alignment is in bits, frame object alignment is (currently) in
bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15970 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 20:04:59 +00:00
Chris Lattner
fa1face30a Now that we have per-register spill size/alignment info, remove more uses
of getRegClass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15967 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 19:45:10 +00:00
Brian Gaeke
418379e229 Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15906 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-18 20:04:24 +00:00
Brian Gaeke
e058b27faf Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
Also, squash a use of TargetInstrInfo::isNop().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15905 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-18 20:04:21 +00:00
Chris Lattner
f746a7d09b Rename var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15897 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-18 02:22:55 +00:00
Chris Lattner
7d057a3fd5 Add support for targets without a .zero directive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15894 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 21:38:40 +00:00
Chris Lattner
bfddc2030a Add support for alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15888 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 19:14:29 +00:00
Chris Lattner
0554fb6b9c Use a designated comment character when printing comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15880 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 16:27:05 +00:00
Chris Lattner
e85a5a9f40 Add support for targets that have .quad, drop extra tab inserted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15870 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 06:48:16 +00:00
Chris Lattner
1b7e2356ac Implement emitGlobalConstant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15868 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 06:36:49 +00:00
Chris Lattner
af2bf0ab30 We now allow targets to use any prefix they want for global symbols. Lets
hear it for ".".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15863 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 06:06:19 +00:00
Chris Lattner
ed1ff01639 Some asmwriters want an _ prefix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15845 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 02:28:26 +00:00
Chris Lattner
a80ba71efe Initial implementation of the asmprinter base class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15838 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 23:15:22 +00:00
Chris Lattner
ad8281607f Move this code to lib/Target/SparcV9/MachineFunctionInfo.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15834 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 22:36:34 +00:00
Chris Lattner
e7f372703a This file is moving to lib/Target/SparcV9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15833 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 22:36:10 +00:00
Chris Lattner
85015a0891 Move MachineCodeForInstruction.h and MachineFunctionInfo.h into lib/Target/SparcV9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15830 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 21:55:02 +00:00
Chris Lattner
753c16c9cb Nuke this file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15829 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 21:36:40 +00:00
Chris Lattner
e97db86e17 Fold MachineInstrAnnot.cpp into this file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15828 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 21:36:31 +00:00
Brian Gaeke
e6c3dc88ca Add a note that people shouldn't use MachineFunctionInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15823 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 18:27:24 +00:00
Chris Lattner
3bba026994 Reduce usage of MRegisterInfo::getRegClass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15784 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:23:09 +00:00
Chris Lattner
078fee3f2e The insertion method returns void now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15779 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:14:31 +00:00
Chris Lattner
3cc03be51a Nuke ifdef'd out code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15777 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:03:57 +00:00
Chris Lattner
26eb14ba51 Stop using CreateStackObject(RegClass*)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15775 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:02:22 +00:00
Chris Lattner
57f1b67c34 These methods no longer take a TargetRegisterClass* operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15774 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 21:56:44 +00:00
Alkis Evlogimenos
8c9b4de574 Make this compile on gc 3.4.1 (static_cast to non-const type was not
allowed).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15766 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 09:18:55 +00:00