Commit Graph

448 Commits

Author SHA1 Message Date
Chris Lattner
8a88563a32 Add comments, add a vector to keep track of which registers are allocatable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6014 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-07 20:07:58 +00:00
Chris Lattner
9085d8a9a9 Print machine frame objects with the frame offset intrinsic to the machine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5329 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 18:35:57 +00:00
Chris Lattner
795ba6cabd Move sparc specific code into the Sparc backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5317 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 21:36:50 +00:00
Chris Lattner
a9dcd3cceb Move private headers into private regalloc directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5308 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 20:26:32 +00:00
Chris Lattner
d77fa74a0c Move private header to private dir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:50:32 +00:00
Chris Lattner
b66fdc2934 Remove obsolete ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5301 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:47:02 +00:00
Chris Lattner
1be114be3a Remove internal helper fn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5300 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:46:39 +00:00
Chris Lattner
83435fbaf9 ADd support for CC registers for Sparc BE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5297 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:22:23 +00:00
Chris Lattner
4d69c8e369 Add support for the CC registers for Sparc BE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5296 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:22:06 +00:00
Chris Lattner
4091233dfd Remove more unused methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5295 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:21:50 +00:00
Chris Lattner
73df3bfb68 Remove a ton of functions that are no longer used, instead using BuildMI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5290 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 17:35:44 +00:00
Chris Lattner
e387de3084 Add new helper method addRegDef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5289 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 17:18:22 +00:00
Chris Lattner
ed4fb8f3ec * Eliminate a bunch of inline functions.
* Convert callers to use BuildMI instead


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5286 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 00:02:41 +00:00
Chris Lattner
8143d8f91a Move llvm/Analysis/LiveVar/ValueSet.h to CodeGen/ValueSet.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5282 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:56:37 +00:00
Chris Lattner
cb09cc268b Move annotation to support library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5268 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 21:29:58 +00:00
Chris Lattner
db00065fc8 Add new files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5259 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 01:01:31 +00:00
Chris Lattner
e836bae30c Simplify interface to creating a register
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5211 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:19:18 +00:00
Chris Lattner
9d4f9b9902 * Add support for new types of operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5210 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:18:44 +00:00
Chris Lattner
3c8cbe6567 * Add 3 new types of MachineOperand: ConstantPoolIndex ExternalSymbol and GlobalAddress's
* Add new isPCRelative modifier flag which should be used in place of MO_PCRelativeDisp type.
* Fix a bug in isPhysicalRegister
* Add new setOpcode and RemoveOperand methods


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5209 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:18:17 +00:00
Chris Lattner
40a75577ea * Add a constant pool to hold per-function constants which must be spilled to memory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5208 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:16:10 +00:00
Chris Lattner
09a5b0b6a3 * Add utility methods which make common cases easier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5207 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:15:24 +00:00
Chris Lattner
29dd209228 * Add support for values in the constant pool
* Add support for functions referenced by name


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5206 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:14:55 +00:00
Chris Lattner
d0f166a486 More renamings of Target/Machine*Info to Target/Target*Info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5204 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-29 03:13:05 +00:00
Chris Lattner
aa09b75d22 Rename FunctionFrameInfo to MachineFrameInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5201 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 21:08:28 +00:00
Chris Lattner
7fd4040274 Descriptor object used to manage abstract frame references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5166 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:07:47 +00:00
Chris Lattner
1951c5b987 State for frame and constant pool information pulled out of MachineFunction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5165 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:07:33 +00:00
Chris Lattner
7ad6be7b01 * Frame indices are signed
* Cluster modification methods together


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5164 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:05:44 +00:00
Chris Lattner
cd0d1d1f0f * Pull a bunch of frame and constant pool state out into a new
MachineFunctionInfo class
* Add a new FunctionFrameInfo object


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5163 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:04:31 +00:00
Chris Lattner
2a4a095e57 Initial check in of MachineFunctionPass.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5162 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:03:01 +00:00
Chris Lattner
aa0e277f31 Add abstract frame index capability
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5140 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-25 05:01:18 +00:00
Chris Lattner
7c56bf694e Remove default ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5139 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-25 05:01:05 +00:00
Chris Lattner
56cf63f2f6 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5138 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-25 05:00:49 +00:00
Chris Lattner
03ab7af4de Remove dependency on SSARegMap.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5137 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-25 05:00:16 +00:00
Chris Lattner
c583175e72 Add new opIsUse method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5062 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 22:05:02 +00:00
Chris Lattner
8cbfc75d17 Add capability to have a MachineBasicBlock as an operand to a MachineInstr
Add a bunch of methods to MachineOperand is* to reduce usage of MO_foo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5032 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 08:01:02 +00:00
Chris Lattner
367ccab06e Final version of BuildMI for symmetry and because I want to use it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5000 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 09:33:06 +00:00
Chris Lattner
3153b35a52 Get rid of deprecated function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4997 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 07:30:45 +00:00
Chris Lattner
64ccc73593 Add support for direct global references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4905 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 06:44:27 +00:00
Chris Lattner
ffc2d6f485 Add virtual dtor, expose a debug impl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4892 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 20:56:20 +00:00
Chris Lattner
8562d4ec7c More support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4873 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:56:28 +00:00
Chris Lattner
d1c45a6633 Start adding to the meat of MachineCodeEmitter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4869 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:44:13 +00:00
Chris Lattner
928e23f9ba Initial version of MachineCodeEmitter interface: empty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4864 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:21:36 +00:00
Misha Brukman
35880f394f Instead of checking op.getType() against MO_VirtualRegister and
MO_MachineRegister, we no longer distinguish Virtual vs. Machine registers
externally, they're ALL registers, all equal.

Registers are only differentiated whether they are >=
MRegisterInfo::FirstVirtual or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4823 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 22:40:52 +00:00
Misha Brukman
7b8ba17761 Set SSARegMap to NULL after deleting it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4822 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 22:32:15 +00:00
Misha Brukman
1617e6c997 SSARegMap -- the mapping between SSARegisters and their RegisterClasses, which
imply types of SSA Registers. This is on a per-function basis, so the
MachineFunction contains the SSARegMap, and has accessor functions to it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4774 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 00:53:10 +00:00
Chris Lattner
ce3d3eadef Add helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4744 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 06:57:05 +00:00
Chris Lattner
af55be15df Print is const!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4737 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 23:22:13 +00:00
Chris Lattner
23e6bba592 Finish enumating code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4726 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:33:54 +00:00
Chris Lattner
7e1a53b404 Remove unused methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4720 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:14:22 +00:00
Chris Lattner
32f3d08cde Convert to use an enum to access def/use/use&def information. These make
reading code much easier than just seeing "true, false" especially when
default parameters default one but not both arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4717 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 21:56:10 +00:00
Chris Lattner
5494c7ed9d Return const refefrences to enable default construction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4713 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 21:02:42 +00:00
Brian Gaeke
6559bb96a9 include/llvm/CodeGen/MachineInstrBuilder.h: Add addClobber() inline
convenience method.  Fix typo in comment.
lib/Target/X86/InstSelectSimple.cpp: Explicitly specify some implicit uses.
 Use MOVZX/MOVSX instead of MOV instructions with sign extend instructions.
 Take out LEAVE instructions.
 32-bit IDIV and DIV use CDQ, not CWQ (CWQ is a typo).
 Fix typo in comment and remove some FIXME comments.
lib/Target/X86/Printer.cpp: Include X86InstrInfo.h and llvm/Function.h.
 Add some simple code to Printer::runOnFunction to iterate over
  MachineBasicBlocks and call X86InstrInfo::print().
lib/Target/X86/X86InstrInfo.def: Make some more instructions with
 implicit defs "Void".  Add more sign/zero extending "move" insns
 (movsx, movzx).
lib/Target/X86/X86RegisterInfo.def: Add EFLAGS as a register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4707 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-14 22:32:30 +00:00
Vikram S. Adve
601899d196 Bug fix: need to initialize new CallArgsDescriptor pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4453 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 20:38:49 +00:00
Vikram S. Adve
8f211a4ab0 Bug fix in setting an implicit ref.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4452 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 20:38:16 +00:00
Chris Lattner
9cc361579b Allow BuildMI that helps automate construction of SSA information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4443 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 01:48:41 +00:00
Chris Lattner
fa78fbf446 Add support for structured printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4432 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 00:46:48 +00:00
Chris Lattner
dea73839f6 Improve comments, add methods for structured printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4431 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 00:46:31 +00:00
Chris Lattner
8815c79ea4 Add method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4428 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:40:30 +00:00
Chris Lattner
7db458fb07 Add capability to have machine instruction autoinsert when it is created
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4424 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:18:23 +00:00
Chris Lattner
ba64363562 Merge with sparc backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4403 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:10:58 +00:00
Chris Lattner
35c9a6ded7 X86 merge complete, eliminate dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4401 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:07:50 +00:00
Chris Lattner
495fe2e087 X86 merge is complete, eliminate unused code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4400 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:07:16 +00:00
Vikram S. Adve
a2bae305fb Remove separate vector of implicit refs from MachineInstr, and
instead record them as extra operands in the operands[] vector.
Also, move CallArgsDescriptor into this class instead of making it an
annotation on the machine instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4399 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 19:41:18 +00:00
Vikram S. Adve
e68a3435ee Move CallArgsDescriptor into this class instead of making it an
annotation on the machine instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4398 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 19:38:46 +00:00
Chris Lattner
ad3136fee4 Remove old entrypoint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4385 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:15:01 +00:00
Chris Lattner
898c72b4d8 Remove unneeded #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4384 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:14:10 +00:00
Chris Lattner
770feb4bfc De-inline methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4379 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:50:33 +00:00
Chris Lattner
97d688515e Remove unneeded #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4377 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:50:06 +00:00
Chris Lattner
28760f4e77 Make assertIGNode be private to the InterferenceGraph.cpp file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4375 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:42:34 +00:00
Chris Lattner
9979895976 Remove unneccesary #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4374 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:34:12 +00:00
Chris Lattner
4b28abb57f Delete unused header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4373 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:32:08 +00:00
Chris Lattner
9ed63ee0fc Minor comment updates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4361 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 21:43:42 +00:00
Chris Lattner
f0136b376e Initial checkin of MachineInstrBuilder class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4360 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 21:31:48 +00:00
Chris Lattner
9a8e4121aa Remove all traces of the "Opcode Mask" field in the MachineInstr class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4359 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 21:17:20 +00:00
Chris Lattner
b98a53f201 Remove more default arguments that are never used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4358 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 21:02:40 +00:00
Chris Lattner
7279122e66 Remove default operands that are never used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4357 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:59:49 +00:00
Chris Lattner
413746e983 * Make MachineOperand ctors private, so MachineOperand can only be created
by MachineInstr.
* Add a bunch of new methods to allow incremental addition of operands to the
  machine instr instance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4356 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:48:39 +00:00
Misha Brukman
d5806ffb40 Iterator functions now line up together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4350 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:58:38 +00:00
Chris Lattner
2f305989b3 Remove two arguments that are never specified
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4348 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:46:59 +00:00
Chris Lattner
335d5c399b s/method/function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4338 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 05:58:46 +00:00
Chris Lattner
d0aa0cdbc6 Change MachineBasicBlock's to not be Annotations, instead they are kept as
part of a linked list tracked by MachineFunction.  MachineBasicBlock::get
is now linear time instead of constant time, and thus is deprecated!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4337 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 05:30:46 +00:00
Chris Lattner
1294a7e936 Remove typedef that is unneccesary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4332 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:50:01 +00:00
Chris Lattner
133f079c8c Rename the redundant MachineOperand::getOperandType() to MachineOperand::getType()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4331 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:45:29 +00:00
Chris Lattner
6d6c3f8618 Add new getOperandType(i) method to MachineInstr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4330 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:30:20 +00:00
Chris Lattner
572f5c8c0c Fairly major overhaul of MachineInstr & Operand classes
- Inline methods that are mostly a single line anyway
  - Eliminate several methods that were never called
  - Group methods a bit more consistently


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4329 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:24:49 +00:00
Chris Lattner
054c1f6cb6 Make MachineInstr.h not #include MachineInstrInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4328 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:29:46 +00:00
Chris Lattner
4a63b72df9 Don't #include <Support/*>, #include "Support/*"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4325 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:11:53 +00:00
Chris Lattner
8e7ae9860b Add BasicBlock list to MchineFunction that will eventually be the only
way to access MachineBasicBlocks.  For now, it is never filled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4324 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:08:43 +00:00
Chris Lattner
0551f542ab MachineFunction.h now includes MachineBasicBlock.h in preparation for
list changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4321 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:01:06 +00:00
Chris Lattner
506676de32 Remvoe dead fixme and typedef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4320 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:55:26 +00:00
Chris Lattner
aec11f1dec MachineBasicBlock doesn't need basicblock.h, it needs Annotation.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4319 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:53:00 +00:00
Chris Lattner
92eba0c49b Rename file to MachineBasicBlock.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4316 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:39:21 +00:00
Chris Lattner
9c6342d0cc Add note about state that should be removed when time permits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4315 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:27:51 +00:00
Chris Lattner
a4f808b54e Fixes to previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4314 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:27:30 +00:00
Chris Lattner
51a8d85281 Inline some methods from .cpp files into .h files, minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4313 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:21:55 +00:00
Chris Lattner
e42a84f64f Add prototypes for creation/destruction passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4309 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:11:58 +00:00
Chris Lattner
09124ab3e2 This header is renamed to MachineFunction.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4304 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 00:45:06 +00:00
Chris Lattner
2fce4132c6 We don't need the forwarding typedef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4303 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 00:44:09 +00:00
Misha Brukman
fce1143bcf Changed MachineCodeForMethod' to MachineFunction'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4301 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 00:28:31 +00:00
Chris Lattner
e4108ae577 Add support or other operand types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4298 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 21:17:45 +00:00
Chris Lattner
e8b5413e5d Prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4295 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 20:49:47 +00:00
Chris Lattner
d4dec05036 Initial checkin of Machine Code representation for X86 backend. This will
eventually be merged with the sparc backend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4286 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 23:00:13 +00:00
Chris Lattner
37ae4056bb Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4267 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 01:11:51 +00:00
Chris Lattner
27a08935ca - Two minor improvements to the MachineInstr class to reduce footprint and
overhead: Merge 3 parallel vectors into 1, change regsUsed hash_set to be a
    bitvector.  Sped up LLC a little less than 10% in a debug build!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4261 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 23:16:21 +00:00
Chris Lattner
1a33e6eb74 Small space optimization: Make MachineOperands take 16 bytes instead of
20 on intel or 24 on sparc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4256 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 00:15:13 +00:00
Chris Lattner
756a55000b Remove a 'using' directives from a header file. Using directives cause
global changes, so aren't good for headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4245 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:24:50 +00:00
Chris Lattner
c5819944a2 Add a missing std:: qualifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4244 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:23:42 +00:00
Vikram S. Adve
efc9433960 Removed misleading const keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4169 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 16:32:24 +00:00
Vikram S. Adve
bbac47893f Added several more helper functions for construction MachineInstrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3983 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:55:45 +00:00
Vikram S. Adve
f425884e27 Fixed method getReturnValue(): it should return NULL if the
callee does not return a value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3968 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:03:54 +00:00
Anand Shukla
33db9bae15 Initial version: it adds 2 empty slots at the top of stack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3872 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-21 04:58:26 +00:00
Vikram S. Adve
65ce103d8d Peephole optimization pass on final machine code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3863 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 16:33:03 +00:00
Vikram S. Adve
46d6a1aeb5 Add erase() method for a single element.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3849 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:55:57 +00:00
Vikram S. Adve
e8b57ef260 Add method MachineInstr::replace to rewrite a machine instruction in place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3843 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:47:49 +00:00
Vikram S. Adve
2796860297 New preselection pass that specializes LLVM code for a target machine,
while remaining in legal portable LLVM form and preserving type
information and type safety.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3759 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 18:08:17 +00:00
Vikram S. Adve
504fc5b7b5 Add method MachineOperand::hasAllocatedReg().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3747 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 15:58:54 +00:00
Vikram S. Adve
d5af164f01 Add a version of ChooseRegOrImmed to handle numerical constants
introduced by InstrSelection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3746 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 15:58:34 +00:00
Vikram S. Adve
521758fb79 Remove unnecessary include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3723 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-14 23:04:52 +00:00
Vikram S. Adve
7e914a967d Break RA_DEBUG option into several levels to get better output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3722 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-14 22:18:37 +00:00
Vikram S. Adve
7c26898401 Moving to lib/CodeGen/RegAlloc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3718 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-14 11:57:17 +00:00
Chris Lattner
71184414d6 Move TmpInstruction ctor to InstrSelection.cpp file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3622 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-08 21:07:51 +00:00
Vikram S. Adve
df3fe55e57 Added function GetMemInstArgs and made FoldGetElemChain private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3503 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-24 21:03:10 +00:00
Vikram S. Adve
2730a38485 Added support for type inquiry in subclasses of InstTreeNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3502 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-24 21:02:42 +00:00
Vikram S. Adve
4afd6c37c7 Just some extra comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3446 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-22 03:03:10 +00:00
Chris Lattner
546b027b3e - Do not expose ::ID from any of the analyses anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3417 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-21 17:09:49 +00:00
Vikram S. Adve
917d551969 Change opLabel numbers for Not and BNot.
Also, these tree nodes are now binary, not unary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3344 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 14:20:45 +00:00
Vikram S. Adve
a7710518da Add method MachineInstr::substituteValue() which substitutes
one Value with another one in all operands and implicit references
of the machine instruction.

Also add method MachineOperand::getVRegValueOrNull().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3307 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 16:54:11 +00:00
Chris Lattner
cc367a3ea0 Do not add an extra vtable to EVERY machineinstr created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3280 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-09 21:49:21 +00:00
Chris Lattner
179cdfb5c8 * Removed extraneous #includes
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3277 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-09 20:08:03 +00:00
Chris Lattner
919c4f8a44 Change machinecode for instruction to not inherit from vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3274 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-09 20:04:28 +00:00
Vikram S. Adve
b8a45c9fe9 Add function GetConstantValueAsUnsignedInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3249 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-04 20:55:59 +00:00
Chris Lattner
b5eb866882 Expose instruction selection as a pass instead of a global function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3145 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 03:55:29 +00:00
Chris Lattner
eb702350f7 * Eliminate the Provided set. All Passes now finally just automatically
provide themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3124 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 21:03:33 +00:00
Chris Lattner
5d549083e2 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3111 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 21:11:42 +00:00
Chris Lattner
00444d0630 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3107 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 19:19:31 +00:00
Chris Lattner
c6a4bf1251 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3077 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-25 15:00:45 +00:00
Chris Lattner
39d69009d0 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3067 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-24 22:20:06 +00:00
Chris Lattner
1089790546 Non-standard hash classes are not in the std:: namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3057 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-24 21:21:33 +00:00
Chris Lattner
09ff1126da *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3056 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-24 21:21:32 +00:00
Mehwish Nagda
c4e9a14847 Moved to Reoptimizer/Mapping directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2991 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-22 22:06:56 +00:00
Mehwish Nagda
0226fdb6e7 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2912 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-15 23:56:27 +00:00
Vikram S. Adve
975f6d4f44 Bug fix: cast (bool) has higher precedence than %... who knew!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2864 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:51:46 +00:00
Vikram S. Adve
69cacd4710 Add support for marking each operand as a %hh, %hm, %lm or %lo.
Represent previous bools and these ones with flags in a single byte
per operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2863 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:50:57 +00:00
Vikram S. Adve
e694366259 Added a few more methods for creating instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2862 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:49:38 +00:00
Anand Shukla
e086f4e897 added std:: to hash_set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2846 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-09 19:18:16 +00:00
Chris Lattner
53e9983790 Include header in the compiler-neutral location
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2843 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-09 16:50:24 +00:00
Vikram S. Adve
deb9654056 Interface to class MachineCodeForBasicBlock.
Moved here from MachineInstr.h to make it an annotation on BasicBlock.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2823 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 22:40:34 +00:00
Vikram S. Adve
7a4be9580e Moved class MachineCodeForBasicBlock to MachineCodeForBasicBlock.{cpp,h}.
An (explicit or implicit) operand may now be both a def and a use.
Also add a set of regs used by each instruction.
dump() no longer takes an optional argument, which doesn't work in gdb.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2821 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 22:38:45 +00:00
Vikram S. Adve
c920dc714d Added two more helper functions for instruction creation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2819 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 22:33:45 +00:00
Anand Shukla
4a9f933751 changes to make it compatible with 64bit gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2786 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 20:22:25 +00:00
Chris Lattner
18961504fc *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2777 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:12:52 +00:00
Chris Lattner
85c5465e07 Convert RegClass::IsColorUsedArr from a dynamically allocated array to
a vector.  This makes asserting on array bounds easier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2731 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-23 15:50:03 +00:00
Chris Lattner
e87adaac31 Avoid #including CommandLine.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2710 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 17:06:56 +00:00
Vikram S. Adve
67d6208d05 Better interface to generating machine instr for common cases
(many places still need to be updated to use this interface).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2648 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:40:41 +00:00
Vikram S. Adve
8eb04905e8 MachineInstr now inherits from Annotable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2647 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:39:59 +00:00
Vikram S. Adve
7e684a956a Annotation class for MachineInstr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2643 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:30:21 +00:00
Chris Lattner
9f7fab5feb remove deprecated getInstType() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2595 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-10 13:28:47 +00:00
Chris Lattner
c6f3ae5c66 Eliminate duplicate or unneccesary #include's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2397 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 17:42:12 +00:00
Chris Lattner
96c466b06a Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2395 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 14:57:45 +00:00
Chris Lattner
483e14ee04 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2336 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 07:27:19 +00:00
Chris Lattner
f57b845547 * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2333 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 06:56:12 +00:00
Vikram S. Adve
7b3640bd12 Optional args are no longer allocated as they are discovered.
(This can be improved to avoid making the initial pass over the method.)
Also, ensure automatic vars and reg. spills areas are not extended
if their sizes are used for computing some other offset.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2319 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-25 04:47:26 +00:00
Chris Lattner
8929cc230a Rewrite MachineCodeForBasicBlock in terms of containment rather than
inheritance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2200 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 18:00:49 +00:00
Chris Lattner
6111a87b3a Move the InsertPrologEpilogCode class out of the Sparc.cpp file into the
new PrologEpilogCodeInserter.cpp file, and include the bodies of the
GetInstructionsFor(Prolog|Epilog) functions from SparcInstrSelection.cpp
into the class.  This eliminates the need for a static global vector of
instructions and a class of errors that is really unneccesary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2194 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:20:15 +00:00
Chris Lattner
7884cd17aa Don't leak memory like a seive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2185 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 23:09:07 +00:00
Chris Lattner
b7653df085 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2180 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 22:03:57 +00:00
Vikram S. Adve
fa79e6e869 Include temp. values when computing max. size of stack frame!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2070 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-31 18:57:49 +00:00
Vikram S. Adve
dfe412dc8b Refix bug: Add back method MachineCodeForInstruction::dropAllReferences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1980 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:58:02 +00:00
Vikram S. Adve
4cbd55062d Fix padding when allocating local variables on stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1979 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:57:38 +00:00
Vikram S. Adve
4fad513704 Add methods to support type inquiry. Rename TmpInstruction values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1978 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:56:55 +00:00
Vikram S. Adve
6be4ebe1eb Change treeRoots data structure to make enumeration deterministic.
Also, add a flag to marked nodes that do not need code because they
have been folded into the user (parent in the BURG tree).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1963 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:25:17 +00:00
Chris Lattner
e7506a366e Rename Method to Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1957 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 22:51:58 +00:00
Vikram S. Adve
06fa17c1c2 Big bug fix: killed uses were being inserted instead of erased!
Also added a set of debug options.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1917 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-19 00:59:08 +00:00
Vikram S. Adve
ce0845aeba Added function computeOffsetforLocalVar to check how big the
offset-from-FP will be before allocating space for a local variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1900 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 03:23:29 +00:00
Vikram S. Adve
f1a51be375 Use vector for machine instructions in GetInstructionsByRule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1899 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 03:20:46 +00:00
Vikram S. Adve
9558b4a292 Bug fix in setting CC register.
Also use distinct names for the three types of SetMachineOperand
to avoid painful overloading problems and errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1894 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 03:10:17 +00:00
Chris Lattner
1ddf664f74 Make it compile with GCC 3.0.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1786 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-24 23:01:21 +00:00
Chris Lattner
6357a3f42d Convert BBLiveVar to be a BasicBlock annotation, this removes the BB2BBLVMap from MethodLiveVarInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1721 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 06:52:25 +00:00
Chris Lattner
2f898d2074 Convert operand iterator over to work like an STL iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1720 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 06:02:59 +00:00
Chris Lattner
748697d242 Minor change: Methods that return ValueSet's that are guaranteed to be valid
return references instead of pointers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1719 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 04:20:12 +00:00
Chris Lattner
eb5230c4f9 Remove generic routines to Support/SetOperations.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1715 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 03:35:31 +00:00
Chris Lattner
5e5dfa307a * Eliminate the LiveVarSet class, making applyTranferFuncForMInst a static
function in the one .cpp file that uses it.  Use ValueSet's instead.
* Prepare to delete LiveVarSet.h & LiveVarSet.cpp
* Eliminate the ValueSet class, making all old member functions into global
  templates that will eventually be moved to Support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1711 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 02:51:01 +00:00
Chris Lattner
0665a5f1f5 * Code Cleanups
* Introduce RAV to allow stream I/O instead of using printValue


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1710 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 01:43:49 +00:00
Chris Lattner
0174410fd0 * Big cleanups.
* Make BBLiveVar.h effectively an internal header file
* Prepare LiveVarMap.h for deletion


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1705 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 00:33:19 +00:00
Chris Lattner
bdfd328515 Clean up MethodLiveVarInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1703 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 20:49:04 +00:00
Chris Lattner
4fd2dbbf1d Turn live variable analysis into a real MethodPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1699 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 20:00:08 +00:00
Chris Lattner
017e4cca8c Instruction scheduling is a real pass now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1698 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 19:59:22 +00:00
Chris Lattner
387092e09c eliminate the add and remove methods, clients must use insert and erase directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1686 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 16:33:18 +00:00
Chris Lattner
c5d97bda46 Remove tons of include pollution
Remove frivolous const's
Make use of the -> operator


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1685 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 16:32:40 +00:00
Chris Lattner
2f9b28e59a Convert RegisterAllocator interface to opaque pass type, so that users do not
need to know _anything_ about RegAlloc to use it.  Well in the end maybe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1681 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 15:54:09 +00:00
Chris Lattner
2182c785c2 * Minor cleanups
* Reduce number of #includes, sometimes drastically (LiveRangeInfo.h lost _7_)
* Move instrIsFeasible() from InstrScheduling.h to SchedPriorities.h
* Delete blank lines at end of files


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1672 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 05:52:08 +00:00
Chris Lattner
77f66c131d * Move command line parsing debug stuff to InstrScheduling internal header file
SchedPriorities.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1669 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 02:44:20 +00:00
Chris Lattner
6dd98a6c31 Split RegisterAllocation stuff OUT of Sparc.cpp into a well defined pass
that has a very minimal interface (like it should have).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1667 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 00:33:08 +00:00
Chris Lattner
f2868ce228 Code pulled out of MAchineInstr.(h|cpp)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1660 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:54:50 +00:00
Chris Lattner
a730c86422 * Prune many #includes
* Remove MachineCodeForVMInstr -> MachineCodeForInstruction.h
* Remove MachineCodeForMethod  -> MachineCodeForMethod.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1636 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:11:59 +00:00
Chris Lattner
d101f22513 * Remove TMP_INSTRUCTION_OPCODE silliness
* Fix TmpInstruction copy ctor to not read uninitialized memory
* Fix TmpInstruction copy ctor to not copy 2 operands if there is only one
* Inline Initialize method into ctors


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1635 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:07:16 +00:00
Chris Lattner
697954c15d Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-20 22:54:45 +00:00
Ruchira Sasanka
42bd177eae Added comments, destructors where necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1491 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-07 19:16:26 +00:00
Vikram S. Adve
fa24897f9f Eliminate all uses of memInst->getIndicesBROKEN().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1485 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-15 00:36:32 +00:00
Ruchira Sasanka
b720a8bc1d Added comments are more documentation info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1434 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-08 21:04:22 +00:00