Commit Graph

1173 Commits

Author SHA1 Message Date
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
Nate Begeman 386d940f5c Elminiate MachineFunction& argument from eliminateFrameIndex
llvm-svn: 15736
2004-08-14 22:00:10 +00:00
Chris Lattner 8885c4e2a5 Split saveCallerSavedRegisters into two methods for clarity, and add comments.
Add support for targets that must spill certain physregs at certain locations.

Patch contributed by Nate Begeman, slightly hacked by me.

llvm-svn: 15701
2004-08-12 19:01:14 +00:00
Chris Lattner e64f008fe3 Forward substitute some constants into their users
llvm-svn: 15693
2004-08-12 18:10:18 +00:00
Chris Lattner eb02313413 The only target that uses this code (v9) always has argsOnStackHaveFixedSize
set to true (obviously)

llvm-svn: 15692
2004-08-12 18:06:35 +00:00
Reid Spencer 2bce8006d5 Get rid of a warning when compiling optimized. Uninitialized variable has
been initialized.

llvm-svn: 15565
2004-08-07 15:19:31 +00:00
Chris Lattner 57cafee576 Ok get rid of the REST of the tabs
llvm-svn: 15564
2004-08-07 07:18:41 +00:00
Chris Lattner 0ee8279979 Death to tabs
llvm-svn: 15563
2004-08-07 07:07:57 +00:00
Alkis Evlogimenos 4242241a69 Clean up whitespace.
llvm-svn: 15490
2004-08-04 09:46:56 +00:00
Alkis Evlogimenos a698308cce Convert indentation to 2 spaces.
llvm-svn: 15489
2004-08-04 09:46:26 +00:00
Brian Gaeke c017a2c269 Include SparcV9TmpInstr.h to pick up the def. of TmpInstruction,
instead of InstrSelection.h, which is dead.

llvm-svn: 15476
2004-08-04 07:34:57 +00:00