Commit Graph

227 Commits

Author SHA1 Message Date
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