Alkis Evlogimenos
213e6db9ce
Grow the map on entry so that we don't crash if joinIntervals never
...
runs (if coalescing is disabled for example).
llvm-svn: 16259
2004-09-09 19:24:38 +00:00
Alkis Evlogimenos
adb2ce2962
Use a DenseMap for mapping reg->reg. This improves the LiveInterval
...
analysis running time from 2.7869secs to 2.5226secs on 176.gcc.
llvm-svn: 16244
2004-09-08 03:01:50 +00:00
Alkis Evlogimenos
58350a7435
Indent to 2 spaces and cleanup excess whitespace.
...
llvm-svn: 16188
2004-09-05 18:41:35 +00:00
Alkis Evlogimenos
fcb3f5197e
Indent to 2 spaces.
...
llvm-svn: 16187
2004-09-05 18:39:20 +00:00
Misha Brukman
14a2b4628d
Order #includes alphabetically, local .h files first.
...
llvm-svn: 16153
2004-09-03 18:25:53 +00:00
Alkis Evlogimenos
a5c04ee50f
Fixes to make LLVM compile with vc7.1.
...
Patch contributed by Paolo Invernizzi!
llvm-svn: 16152
2004-09-03 18:19:51 +00:00
Alkis Evlogimenos
9f82237f4e
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.
llvm-svn: 16148
2004-09-02 21:24:33 +00:00
Alkis Evlogimenos
095c3a80f3
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
llvm-svn: 16147
2004-09-02 21:23:32 +00:00
Alkis Evlogimenos
dcbf893095
We don't need to sort the added vector as unhandled intervals are
...
stored in a binary heap.
llvm-svn: 16143
2004-09-02 18:00:38 +00:00
Reid Spencer
7c16caa336
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
Alkis Evlogimenos
fae8f6a4fb
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.
llvm-svn: 16136
2004-09-01 22:52:29 +00:00
Alkis Evlogimenos
6a099d439e
Give a better assertion if we see a use before a def.
...
llvm-svn: 16135
2004-09-01 22:34:52 +00:00
Alkis Evlogimenos
b84f0be5b1
Minor code clarity changes.
...
llvm-svn: 16123
2004-08-31 17:39:15 +00:00
Nate Begeman
c9dec3ae70
Put this change back in after testing from Reid proved its innocence. getSpillSize now returns value in bits
...
llvm-svn: 16102
2004-08-29 22:00:24 +00:00
Alkis Evlogimenos
c227d73e5f
Remove dead code.
...
llvm-svn: 16077
2004-08-28 22:43:31 +00:00
Alkis Evlogimenos
e2d962e0fd
Now that LiveIntervals::addIntervalsForSpills is fixed, do not require
...
LiveVariables.
llvm-svn: 16076
2004-08-27 19:00:29 +00:00
Alkis Evlogimenos
8c67a3003e
Only update LiveVariables if it is available. addIntervalsForSpills
...
runs after the initial run of the live interval analysis.
llvm-svn: 16075
2004-08-27 18:59:22 +00:00
Alkis Evlogimenos
efd40bce75
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...
llvm-svn: 16074
2004-08-27 18:01:21 +00:00
Nate Begeman
c561fc3731
Back out change to divide getSpillSize by 8 until I figure out why it breaks x86, which has register sizes in bits.
...
llvm-svn: 16073
2004-08-27 16:48:24 +00:00
Alkis Evlogimenos
11f0fc8eda
The linear scan variants do not require the LiveVariables analysis.
...
llvm-svn: 16071
2004-08-27 04:51:13 +00:00
Nate Begeman
fa2bf42539
Register sizes are in bits, not bytes
...
llvm-svn: 16070
2004-08-27 04:28:10 +00:00
Alkis Evlogimenos
2c69803b61
Use newly added API in MRegisterInfo and don't expose the allocatable
...
register set anymore. Its users now use the MRegisterInfo API.
llvm-svn: 16061
2004-08-26 22:23:32 +00:00
Alkis Evlogimenos
542ac1cba7
Use newly added API in MRegisterInfo.
...
llvm-svn: 16060
2004-08-26 22:22:38 +00:00
Chris Lattner
d8b5be4726
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.
llvm-svn: 16031
2004-08-24 17:48:29 +00:00
Chris Lattner
a88d667487
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.
llvm-svn: 16006
2004-08-24 00:26:11 +00:00
Chris Lattner
36ba4bb042
Register info alignment is in bits, frame object alignment is (currently) in
...
bytes.
llvm-svn: 15970
2004-08-21 20:04:59 +00:00
Chris Lattner
f76ccd43b8
Now that we have per-register spill size/alignment info, remove more uses
...
of getRegClass
llvm-svn: 15967
2004-08-21 19:45:10 +00:00
Brian Gaeke
7593525fcd
Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
...
llvm-svn: 15906
2004-08-18 20:04:24 +00:00
Brian Gaeke
de44bc018a
Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
...
Also, squash a use of TargetInstrInfo::isNop().
llvm-svn: 15905
2004-08-18 20:04:21 +00:00
Chris Lattner
10262ab3f1
Rename var
...
llvm-svn: 15897
2004-08-18 02:22:55 +00:00
Chris Lattner
ea75199996
Add support for targets without a .zero directive
...
llvm-svn: 15894
2004-08-17 21:38:40 +00:00
Chris Lattner
1d35c1673f
Add support for alignment
...
llvm-svn: 15888
2004-08-17 19:14:29 +00:00
Chris Lattner
da6beac0ff
Use a designated comment character when printing comments.
...
llvm-svn: 15880
2004-08-17 16:27:05 +00:00
Chris Lattner
9fa0fc4d5e
Add support for targets that have .quad, drop extra tab inserted
...
llvm-svn: 15870
2004-08-17 06:48:16 +00:00
Chris Lattner
8452a1f6df
Implement emitGlobalConstant
...
llvm-svn: 15868
2004-08-17 06:36:49 +00:00
Chris Lattner
6d42cbd71a
We now allow targets to use any prefix they want for global symbols. Lets
...
hear it for ".".
llvm-svn: 15863
2004-08-17 06:06:19 +00:00
Chris Lattner
07e78f177a
Some asmwriters want an _ prefix
...
llvm-svn: 15845
2004-08-17 02:28:26 +00:00
Chris Lattner
6a8e0f511b
Initial implementation of the asmprinter base class
...
llvm-svn: 15838
2004-08-16 23:15:22 +00:00
Chris Lattner
a1d7802e3c
Move this code to lib/Target/SparcV9/MachineFunctionInfo.cpp
...
llvm-svn: 15834
2004-08-16 22:36:34 +00:00
Chris Lattner
bb9aa25a52
This file is moving to lib/Target/SparcV9
...
llvm-svn: 15833
2004-08-16 22:36:10 +00:00
Chris Lattner
9fb30a4257
Move MachineCodeForInstruction.h and MachineFunctionInfo.h into lib/Target/SparcV9
...
llvm-svn: 15830
2004-08-16 21:55:02 +00:00
Chris Lattner
491a52cf22
Nuke this file
...
llvm-svn: 15829
2004-08-16 21:36:40 +00:00
Chris Lattner
d75c0438a1
Fold MachineInstrAnnot.cpp into this file
...
llvm-svn: 15828
2004-08-16 21:36:31 +00:00
Brian Gaeke
224704fc6f
Add a note that people shouldn't use MachineFunctionInfo.
...
llvm-svn: 15823
2004-08-16 18:27:24 +00:00
Chris Lattner
5943c5078c
Reduce usage of MRegisterInfo::getRegClass
...
llvm-svn: 15784
2004-08-15 22:23:09 +00:00
Chris Lattner
6199899483
The insertion method returns void now
...
llvm-svn: 15779
2004-08-15 22:14:31 +00:00
Chris Lattner
afe8e34940
Nuke ifdef'd out code
...
llvm-svn: 15777
2004-08-15 22:03:57 +00:00
Chris Lattner
c66f27fd29
Stop using CreateStackObject(RegClass*)
...
llvm-svn: 15775
2004-08-15 22:02:22 +00:00
Chris Lattner
98de1d7795
These methods no longer take a TargetRegisterClass* operand.
...
llvm-svn: 15774
2004-08-15 21:56:44 +00:00
Alkis Evlogimenos
4922e2e8ef
Make this compile on gc 3.4.1 (static_cast to non-const type was not
...
allowed).
llvm-svn: 15766
2004-08-15 09:18:55 +00:00