Commit Graph

852 Commits

Author SHA1 Message Date
Chris Lattner
610234d5c9 Do not insert physical regsiters into the regsUsed set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7617 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 21:55:20 +00:00
Chris Lattner
a2dd745613 All callers of these methods actually wanted them to preserve the flags,
so get rid of the def/use parameters that were getting passed in.

**** This now changes the semantics of these methods to preserve the flags,
     not clobber them!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7602 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:58:46 +00:00
Chris Lattner
8c8194500d Fix bugs handling ESP in alloca references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7591 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 04:13:58 +00:00
Chris Lattner
d9ac6a7d3b Revert previous change, and be really anal about what physical registers can do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7588 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 00:49:09 +00:00
Chris Lattner
27615d7f21 Don't bother calculating info unless its needed. May reduce number of stack slots created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7584 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 23:42:37 +00:00
Chris Lattner
b8822ad224 * Fix spelling of 'necessary'
* Add a lot more DEBUG output, which is better structured than before
* Fix bug: Jello/2003-08-04-PhysRegLiveFailure.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7583 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 23:36:39 +00:00
Chris Lattner
e109de3166 Simplify code, eliminating the need for the X86 isVoid target instr flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7534 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:51:45 +00:00
Chris Lattner
4cc662b0ef Set debug types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7533 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:47:31 +00:00
Chris Lattner
925b771dc3 Remove using decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7531 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 20:24:29 +00:00
Chris Lattner
d3fd79f699 Wrap at 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7503 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 13:49:03 +00:00
Chris Lattner
a11136b16c Move DEBUG to Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7497 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:21:34 +00:00
Vikram S. Adve
b5161b60c2 All constant-evaluation code now unified into
TargetInstrInfo::ConvertConstantToIntType().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7390 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:50:12 +00:00
Vikram S. Adve
814030a0c5 1. Bug fix: Don't use branch operand reg. as temp. reg. when
spilling values used by an instruction in the delay slot of the branch
   (which will eventually be moved before the branch).
2. Bug fix:  Delete the delay slot instr, not the branch instr, when
   moving delay slot instr. out!!!!
3. Move code to insert caller-saves moved here from SparcRegInfo:
   it is now machine-independent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7389 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:49:21 +00:00
Vikram S. Adve
b403b2c019 Add const version of getLiveRangeForValue().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7386 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:38:22 +00:00
Vikram S. Adve
102f295114 Code to insert caller-saves moved here from SparcRegInfo: it is now
machine-independent.
Fix problem with using branch operand reg. as temp. reg. when
spilling values used by an instruction in the delay slot of the branch
(which will eventually be moved before the branch).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7385 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:37:41 +00:00
Chris Lattner
8d3f8e226d Making this code const-correct would be a pain, so I'll hack it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7350 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:29:51 +00:00
Chris Lattner
9e2dd8f8d7 Const correctness fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7349 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:24:56 +00:00
Chris Lattner
9cdaa63f57 Be const correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7348 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:23:41 +00:00
Chris Lattner
e5a61ccdc5 Hrm, another necesary one :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7347 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:22:19 +00:00
Chris Lattner
1d598fa25a Remove #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7342 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:01:04 +00:00
Chris Lattner
bae47e5691 Remove extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7341 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:00:29 +00:00
Vikram S. Adve
bc001b24a1 (1) Change the way unused regs. are marked and found to consider regType
info (since multiple reg types may share the same reg class).
(2) Remove machine-specific regalloc. methods that are no longer needed.
    In particular, arguments and return value from a call do not need
    machine-specific code for allocation.
(3) Rename TargetRegInfo::getRegType variants to avoid unintentional
    overloading when an include file is omitted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7329 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 21:06:09 +00:00
Vikram S. Adve
34a856749f Remove unused field. Change the way unused regs. are marked and
found to consider regType info (since multiple reg types may share
the same reg class, e.g., single and double on Sparc).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7327 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 21:00:13 +00:00
Chris Lattner
c8bf87af3e Remove unnecessary casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7250 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:17:51 +00:00
Chris Lattner
9daa8a12d3 Random cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7247 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 14:59:40 +00:00
Chris Lattner
1815383276 Remove using decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7246 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 14:55:59 +00:00
Vikram S. Adve
4d2faf6307 Values stored in CallArgsDescriptor cannot be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7156 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 19:46:15 +00:00
Vikram S. Adve
24d0410db0 isMarkedForSpill() should be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7155 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 19:45:28 +00:00
Vikram S. Adve
627eb31cd7 Change interface to MachineInstr::substituteValue to specify more precisely
which args can be substituted: defsOnly, defsAndUses or usesOnly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7154 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 19:45:07 +00:00
Vikram S. Adve
51bda6fccb Print out all neighbors in interference graph, not just higher-numbered ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7153 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 19:43:33 +00:00
Vikram S. Adve
3bf089227b Several fixes to handling of int CC register:
(1) An int CC live range must be spilled if there are any interferences,
    even if no other "neighbour" in the interf. graph has been allocated
    that reg. yet.  This is actually true of any class with only one reg!

(2) SparcIntCCRegClass::colorIGNode sets the color even if the LR must
    be spilled so that the machine-independent spill code doesn't have to
    make the machine-dependent decision of which CC name to use based on
    operand type: %xcc or %icc.  (These are two halves of the same
register.)

(3) LR->isMarkedForSpill() is no longer the same as LR->hasColor().
    These should never have been the same, and this is necessary now for #2.

(4) All RDCCR and WRCCR instructions are directly generated with the
    phony number for %ccr so that EmitAssembly/EmitBinary doesn't have to
    deal with this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7152 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 19:42:55 +00:00
Vikram S. Adve
97539fc4b6 Choose register instead of immediate for ConstantExpr in ChooseRegOrImmed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7112 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-06 20:33:21 +00:00
Vikram S. Adve
65b2f401af Minor beautification: fold a couple of lines of code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7054 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 01:24:00 +00:00
Vikram S. Adve
74d15d36f5 A def. operand of a machine instruction may be an ordinary Value*,
not just an Instruction*, at least in one unfortunate case:
the first operand to the va_arg instruction.
Modify ValueToDefVecMap to map from Value*, not Instruction*.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7052 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 01:16:01 +00:00
John Criswell
7a73b80b90 Merged in autoconf branch. This provides configuration via the autoconf
system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 21:59:07 +00:00
Chris Lattner
3889a2cb05 Remove a ton of extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:08:05 +00:00
Chris Lattner
2eb9a257c8 Actually, change it to use explicit new/delete, which is more likely to be
optimized INTO an alloca


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6727 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 22:29:09 +00:00
Chris Lattner
0bf9476701 Remove two using decls
Remove usage of alloca


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6725 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 22:18:28 +00:00
Brian Gaeke
ad95d9ef50 Isolate machine-dependent use of <alloca.h> in "Support/Alloca.h",
so that we can easily change its use to be conditional on the result of
an autoconf test later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6723 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 21:54:01 +00:00
John Criswell
be583b914d Included assert.h so that the code compiles under newer versions of GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6682 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-11 14:01:36 +00:00
Guochun Shi
0e93687cca add some comments
add a function ModuloScheduling::dumpFinalSchedule() to print out final schedule


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6677 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-10 20:04:30 +00:00
Guochun Shi
e95b827db2 add an brief instruction what this pass is
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6676 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-10 20:03:39 +00:00
Guochun Shi
0b970dad72 a simple introduction to this pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6675 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-10 20:02:16 +00:00
Guochun Shi
f325261856 cleaned code
add some comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6674 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-10 19:09:00 +00:00
Guochun Shi
8f1d4ab409 delete useless functions
add comment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6673 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-08 23:16:07 +00:00
Guochun Shi
33280524f4 change DEBUG to DEBUG_PRINT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6672 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-08 20:40:47 +00:00
Misha Brukman
6fe6905df2 Do not hastily change the Opcode from 'r' to 'i' type if we're not actually
SETTING the operand to be an immediate or have verified that one of the operands
is really a SignExtended or Unextended immediate value already, which warrants
an 'i' opcode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6662 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-07 02:34:43 +00:00
Chris Lattner
08d2e4e09a Fix bug: Jello/2003-06-04-bzip2-bug.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6624 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 17:15:04 +00:00
Misha Brukman
d15cd2752f I have finally seen the light. The code to change the opcode must live higher in
the loop, and in both cases. In the first case, it is a VReg that is a constant
so it may be actually converted to a constant. In the second case, it is already
a constant, but then if it doesn't change its type (e.g. to become a register
and have the value loaded from memory if it is too large to live in its
instruction field), we must change the opcode BEFORE the 'continue', otherwise
we miss the opportunity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6602 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-04 04:54:06 +00:00
Misha Brukman
d720da23db Pass through the emitConstantPool() call to the real emitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6590 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 20:00:49 +00:00
Misha Brukman
c740aae220 Moved code to modify the opcode from 'reg' to 'imm' form to a more logical place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6563 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 03:18:20 +00:00
Misha Brukman
0ee48d24fe Moved FInfo.cpp to lib/Target/Sparc as it is Sparc-specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6554 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 23:27:09 +00:00
Chris Lattner
78ddcd7b03 Minor cleanups.
This pass should be moved to lib/Target/Sparc since it's sparc specific
It also needs a file comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6553 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 22:57:41 +00:00
Chris Lattner
9efc4d6aaa Remove usage of noncopyable classes to clean up doxygen output.
In particular these classes are the last that link the noncopyable classes
with the hash_map, vector, and list classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6552 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 22:45:07 +00:00
Chris Lattner
747a044550 Add #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6550 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 22:05:13 +00:00
Misha Brukman
e6aa9e30b1 Removed a useless ofstream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6547 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 20:49:09 +00:00
Guochun Shi
099b064a46 compiled with the new SchedGraphCommon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6545 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 17:48:56 +00:00
Misha Brukman
53a7ba851d Remove spurious assert()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6529 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 04:10:41 +00:00
Chris Lattner
efc84a4082 Changes to be compatible with MachineCodeEmitter.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6515 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 23:22:11 +00:00
Vikram S. Adve
5cdb12f958 Minor changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6470 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:41:54 +00:00
Vikram S. Adve
f3d3ca18b5 Added MachineCodeForInstruction object as an argument to
TmpInstruction constructors because every TmpInstruction object has
to be registered with a MachineCodeForInstruction to prevent leaks.
This simplifies the user's code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6469 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:41:24 +00:00
Vikram S. Adve
3497782f38 Allow explicit physical registers for implicit operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6468 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:39:06 +00:00
Vikram S. Adve
7952d6088e Changes to allow explicit physical register arguments that have been
preallocated.  While reg-to-reg dependences were already handled, this
change required new code for adding edges to/from call instructions.
This was part of the extensive changes to the way code generation occurs
for function call arguments and return values.
See log for CodeGen/PhyRegAlloc.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6467 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:37:05 +00:00
Vikram S. Adve
d0d06ad4f3 Extensive changes to the way code generation occurs for function
call arguments and return values:
Now all copy operations before and after a call are generated during
selection instead of during register allocation.
The values are copied to virtual registers (or to the stack), but
in the former case these operands are marked with the correct physical
registers according to the calling convention.
Although this complicates scheduling and does not work well with
live range analysis, it simplifies the machine-dependent part of
register allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6465 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:32:01 +00:00
Misha Brukman
88ba25444c When converting virtual registers to immediate constants, change the opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6452 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 20:36:27 +00:00
Misha Brukman
da3a8b19ce Added saveBBreferences() for BasicBlock resolution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6451 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 20:32:45 +00:00
Guochun Shi
139f0c279d so far everything compiles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6423 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 00:17:09 +00:00
Misha Brukman
eae77de869 Correctly write out binary data as chars, before they're cast to ints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6385 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-28 18:27:19 +00:00
Misha Brukman
3432d1d1d5 Added a debugging code emitter that prints code to a file, debug to std::cerr,
and passes the real code to a memory-outputting code emitter. This may be
removed at a later point in development.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6379 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 22:43:19 +00:00
Vikram S. Adve
5f2180c533 (1) Added special register class containing (for now) %fsr.
Fixed spilling of %fcc[0-3] which are part of %fsr.

(2) Moved some machine-independent reg-class code to class TargetRegInfo
    from SparcReg{Class,}Info.

(3) Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
    and related functions and flags.  Fixed several bugs where only
    "isDef" was being checked, not "isDefAndUse".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6341 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 00:05:23 +00:00
Misha Brukman
6b77ec4156 Cleaned up code layout. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 21:49:18 +00:00
Misha Brukman
c2312df45c Kill `using' directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6301 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 21:24:35 +00:00
Chris Lattner
b52e0241c0 Use a kill, not a dead definition, update comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6131 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 17:37:30 +00:00
Chris Lattner
572c770668 * Keep LiveVariable information more up-to-date and consistent
* *** Finally mark values that are inputs to PHIs as killed when appropriate.
   This should make the generated code quite a bit better.  For example, the
   local-ra will not have to spill PHI inputs at the end of predecessor BB's
   anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6117 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 14:28:28 +00:00
Chris Lattner
a13f0d3f41 Fix bug where we could iterate off the end of a basic block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6116 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 14:26:38 +00:00
Chris Lattner
fb2cb69dc5 * Keep the BBMap around as long as the pass is live
* Change getVarInfo to take real virtual register numbers and offset them
  itself.  This has caused me so much grief, it's not even funny.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6115 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 14:24:00 +00:00
Chris Lattner
98719d7cdc Fix N^2 algorithm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6112 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 04:08:54 +00:00
Chris Lattner
927ce5dfae * Fix several comments
* Update LiveVar info better, fixing bug: Jello/2003-05-11-PHIRegAllocBug.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6110 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 03:55:21 +00:00
Chris Lattner
d5725631c5 Fix tab infestation!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6109 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 03:54:14 +00:00
Chris Lattner
e0e72177c0 Allow const functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6056 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-09 03:27:41 +00:00
Chris Lattner
fd33fb8726 Add methods for stub function generation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6054 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 21:54:18 +00:00
Chris Lattner
5cdfbad72d Add a vector to keep track of which registers are allocatable. Remove FIXMEs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6015 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-07 20:08:36 +00:00
Chris Lattner
dff780f046 Re-add gross hack, it's still necessary. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6012 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-06 21:44:54 +00:00
Chris Lattner
82a4d207aa Remove hideously nasty hack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6011 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-06 21:32:39 +00:00
Misha Brukman
15b55e20cc Debug output should go to cerr, not cout, because that's where bytecode goes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6002 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-04 22:51:30 +00:00
Chris Lattner
b589bf7d77 Fix a bug which occurred with empty basic blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5982 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-02 18:44:42 +00:00
Chris Lattner
f98358efc7 Minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5976 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-01 21:18:47 +00:00
Chris Lattner
2ee82e05e3 Remove unneccesary &*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5871 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:36:11 +00:00
Misha Brukman
63e04f3ccb Just some code beautification changes I had sitting around in my tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5859 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 23:00:08 +00:00
Misha Brukman
2c821cc06e Fixed compilation errors, command-line argument declarations, cleaned up code to
look nicer and removed useless stuff.

Also renamed a few variables, moved them into namespaces, converted outputting
to a file into a print to std::cerr with a DEBUG() guard, as all passes should
do anyway.

No functional changes have been made. However, this code now compiles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5769 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-10 19:19:23 +00:00
Misha Brukman
8baa01c1d7 Made the code readable:
* Lines must be wrapped at 80 chars. This is a hard limit.
* Consistent style on functions, braces, if, for, etc. Code must be readable.

No functional changes have been made, even though I added a new typedef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5768 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-09 21:51:34 +00:00
Guochun Shi
6fbe5fbce1 change the include file names and some class names to make it compile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5764 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-06 23:56:19 +00:00
Guochun Shi
f1c154f5e6 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5755 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-27 17:57:44 +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
0416d2a70a Fix problems with empty basic blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5326 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 18:06:43 +00:00
Chris Lattner
f85249ca73 Arg, fix bugs in previous checkin...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5322 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 02:24:20 +00:00
Chris Lattner
78d6db5627 Add assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5321 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 02:22:08 +00:00
Chris Lattner
4ac7d7302b * Insert prolog/epilog code before rewriting indexes
* Fix calculation of frame offsets when there is an offset.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5318 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 22:52:34 +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
9d4ed15c9e Adjust to new interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5314 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 21:14:01 +00:00
Chris Lattner
af3cdcf9b0 Move headers around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5312 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 21:02:16 +00:00
Chris Lattner
4cfd622252 Header is moved into local directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5311 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 21:00:02 +00:00
Chris Lattner
c7c7b7ab75 Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5310 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 20:32:15 +00:00
Chris Lattner
c520feb6f0 Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5309 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 20:28:36 +00:00
Chris Lattner
4309e736c1 #include RegClass.h explicitly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5307 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:57:07 +00:00
Chris Lattner
abb9c08a05 Remvoe dependency on RegClass.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5306 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:56:21 +00:00
Chris Lattner
a9b19b9002 Prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5303 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:48:13 +00:00
Chris Lattner
0412077faf Minor changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5302 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:47:53 +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
1531b63421 Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:22:38 +00:00
Chris Lattner
f6ee49fcf0 Use buildmi not MI ctor directly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5293 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 18:08:07 +00:00
Chris Lattner
92ba2aaa58 Rename llvm/Analysis/LiveVar/FunctionLiveVarInfo.h -> llvm/CodeGen/FunctionLiveVarInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5284 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 23:05:08 +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
3501feab81 Rename MachineInstrInfo -> TargetInstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5272 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:00:31 +00:00
Chris Lattner
bc40e898e1 New files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5262 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 20:01:16 +00:00
Chris Lattner
80a0478bbb * Use the PHI Elimination pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5220 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:26:08 +00:00
Chris Lattner
91a452b382 * Convert to use LiveVariable analysis
* Convert to use PHIElimination pass
* Don't spill values which have just been reloaded (big win reducing spills)
* Add experimental support for eliminating spills before TwoAddress
  instructions.  It currently is broken so it is #ifdef'd out.
* Use new "is terminator" flag on instructions instead of looking for
  branches and returns explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5219 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:25:40 +00:00
Chris Lattner
f00a3f905e Convert to MachineFunctionPass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5218 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:23:41 +00:00
Chris Lattner
8d95ef4973 Add support for 3 new forms of MachineOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5217 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:23:24 +00:00
Chris Lattner
4d149cdae1 Add support for constant pool
Add helper methods for MachineFrameInfo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5216 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:23:03 +00:00
Chris Lattner
7775df1a6c Add support for global address by string and constant pool values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5215 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:22:37 +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
f27eeea54f Rename MachineOptInfo to TargetoptInfo
Rename MachineCacheInfo to TargetCacheInfo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5203 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-29 02:50:35 +00:00
Chris Lattner
eb24db9727 Rename FunctionFrameInfo to MachineFrameInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5200 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 21:08:26 +00:00
Chris Lattner
8bd66e6907 Rename MachineFrameInfo to TargetFrameInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5199 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 21:00:25 +00:00
Chris Lattner
58b3328ac7 Initial checkin of Prolog/Epilog code inserter, which is an important part
of the abstract frame representation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5198 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:43:30 +00:00
Chris Lattner
600dee4aae * Convert to be a MachineFunctionPass instance
* Use new FunctionFrameInfo object to manage stack slots instead of doing
  it directly
* Adjust to new MRegisterInfo API
* Don't take a TM as a ctor argument
* Don't keep track of which callee saved registers are modified
* Don't emit prolog/epilog code or spill/restore code for callee saved regs
* Use new allocation_order_begin/end iterators to simplify dramatically the
  logic for picking registers to allocate
* Machine PHI nodes can no longer contain constant arguments

* Use a bitvector to keep track of registers used instead of a set
* Fix problem where explicitly referenced registers would be added to
  regsused set and never removed


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5196 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:42:14 +00:00
Chris Lattner
580f9be7ff * Convert to be a MachineFunctionPass instance
* Use new FunctionFrameInfo object to manage stack slots instead of doing
  it directly
* Adjust to new MRegisterInfo API
* Don't take a TM as a ctor argument
* Don't keep track of which callee saved registers are modified
* Don't emit prolog/epilog code or spill/restore code for callee saved regs
* Use new allocation_order_begin/end iterators to simplify dramatically the
  logic for picking registers to allocate
* Machine PHI nodes can no longer contain constant arguments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5195 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:40:43 +00:00
Chris Lattner
10cb79b484 * Add printing support for FrameIndex operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5194 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:37:37 +00:00
Chris Lattner
955fad1f99 * A bunch of functionality and data was removed from MachineFunction and put
into a new MachineFunctionInfo class
* Implement new FunctionFrameInfo class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5193 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:37:16 +00:00
Chris Lattner
e90fcb739a Frame info moved out of MachineFunction into a seperate object
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5192 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:35:34 +00:00
Chris Lattner
ff863ba610 Adjust to simpler spill interface
Only spill and reload caller saved registers that are actually modified.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5145 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-25 05:05:46 +00:00
Chris Lattner
5124aec32f Adjustments to work with the simpler spill interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5144 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-25 05:04:20 +00:00
Chris Lattner
831fdcf017 Remove dependency on SSARegMap.h by MachineFunction.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5143 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-25 05:03:22 +00:00
Chris Lattner
0eb172cc4a Substantial fixes to live range handling, fixing several problems, getting
strtol to not miscompile, and fixing bug: 2002-12-23-LocalRAProblem.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5132 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-24 00:04:55 +00:00
Chris Lattner
e500864619 Fix compilation on GCC 2.96
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5113 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-23 23:44:04 +00:00
Chris Lattner
82bee0f2c8 * Fix several register aliasing bugs
* Add a new option to eliminate spilling of registers that are only used
  within a basic block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5106 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-18 08:14:26 +00:00
Chris Lattner
aed967cc9e Implicit defs/uses list may be empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5103 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-18 01:11:14 +00:00
Chris Lattner
e7d361d15a Use new reginfo interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5099 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-17 04:19:40 +00:00
Chris Lattner
86c69a6cbe Add prolog/epilog spills/reloads to counters
Move X86 specific alignment gunk to X86 files


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5096 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-17 03:16:10 +00:00
Chris Lattner
ae64043737 Fix many bugs, regallocator now saves callee-save registers instead of target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5093 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-17 02:50:10 +00:00
Chris Lattner
c21be922bf * Fix a gross X86 hack that was intended to avoid allocating SP and BP
* Implement register alias set support


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5082 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 17:44:42 +00:00
Chris Lattner
69c198863d Keep the stack frame aligned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5081 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 17:42:40 +00:00
Chris Lattner
b74e83c898 Initial checkin of "local" register allocator. Bugs are still present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5078 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 16:15:28 +00:00
Chris Lattner
1d62cea90b Rename createSimpleX86RegisterAllocator to createSimpleRegisterAllocator.
Remvoe some dead code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5070 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 14:37:00 +00:00
Chris Lattner
b167c04e62 Some simpliciations to the spill/reload interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5067 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 23:01:26 +00:00
Chris Lattner
8ed9eb5ca3 Simplify PHI node elimination significantly by doing it as a prepass to
register allocation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5066 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 22:39:53 +00:00
Chris Lattner
9f366d7ab6 Variety of small or trivial simplifications to the code, completely eliminated
the dependence on PhysRegClassMap


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5064 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 22:19:19 +00:00
Chris Lattner
f605055994 Remove unused savePhysRegToStack method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5061 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 21:33:51 +00:00
Chris Lattner
01b08c59b4 Localize a map, remove another
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5060 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 21:24:30 +00:00
Chris Lattner
8233e2fe01 Give simple reg allocator a nice Pass Name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5058 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 21:13:12 +00:00
Chris Lattner
15f96db4d9 Add a big assert making sure 2 address instructions are formed right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5057 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 21:02:20 +00:00
Chris Lattner
3f91ad7ba7 Fix a problem that occurs when PHI nodes have multiple entries for the same predecessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5055 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 20:48:03 +00:00
Chris Lattner
da7e453aac Grab bag of minor cleanups. Export some statistics about the number of
spills and reloads emitted


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5054 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 20:36:09 +00:00
Chris Lattner
2109f502d6 Implement printing of MBB arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5053 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 20:35:25 +00:00
Chris Lattner
198ab640bb Simplify interfaces used by regalloc to insert code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5052 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 20:06:35 +00:00
Chris Lattner
c2db1a95df * Simplify code a bit by breaking the PHI node handling stuff out into a seperate
function from normal regalloc code
* Make the regalloc for a block a function instead of part of runOnMachineBB, which
  makes it easier to see what's going on in runOnMBB.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5051 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 19:51:14 +00:00
Chris Lattner
9593fb1503 * Remove some unneccesary instance variables
* Make allocateStackSpaceFor only allocate the right amount of space


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5048 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 19:07:34 +00:00
Chris Lattner
dd444f9242 pull inverse reg class mapping into a class that is sharable and out of the
target register description classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5045 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 18:38:59 +00:00
Chris Lattner
abe8dd592d Prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5044 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 18:19:24 +00:00
Chris Lattner
ad44bd99ff Remove extraneous #includes, perform FIXME
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5043 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 18:15:24 +00:00
Chris Lattner
71c83728b4 Fix borkness with not using MachineBasicBlocks in PHI nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5035 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 08:02:51 +00:00
Misha Brukman
0868667f78 Fixed a bug where moves due to phis were being neglected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5019 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 12:33:31 +00:00
Misha Brukman
74676da6f1 Need to insert all moves due to PHI nodes before *ALL* jumps in a predecessor
basic block, as there could be multiple.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5016 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 11:55:59 +00:00
Misha Brukman
972b03fa53 This should be more correct: invalidates physical registers that are used in
an instruction to avoid using them to allocate to other virtual registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5013 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 11:33:22 +00:00
Misha Brukman
59b3eedf31 Fixed bug with running out of registers. Also, reinstated namespace which
disappeared during the last checkin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5007 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 10:42:31 +00:00
Misha Brukman
203b769b20 This should handle register allocating PHI nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5002 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 09:54:36 +00:00
Misha Brukman
cea2245f04 Start allocating stack space at [ebp-4] to not overwrite the return address.
Also make all loads & stores 4-byte aligned for performance. ;)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4982 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 04:34:02 +00:00
Misha Brukman
d1bedcced2 Take advantage of our knowledge of 2-address X86 instructions and
register-allocated them appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4976 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-12 23:20:31 +00:00
Misha Brukman
dd46e2a81d Added code generation for function prologues and epilogues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4930 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 23:58:08 +00:00
Misha Brukman
06f8aecc88 Fun arithmetic with iterators aimed at fixing a bug: inserting instructions
after the *current* instruction while keeping the iterator in the same
'logical' place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4923 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 19:24:45 +00:00
Chris Lattner
b72d221d61 Print out direct global references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4906 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 06:44:41 +00:00
Misha Brukman
dc2ec004f1 This should fix the bug seen with some registers not being allocated
correctly: skipping instructions by incorrectly incrementing the pointer.

Also adds support for building a reg-to-regclass map, and splits the function
for saving register to stack into two, one suitable for virtual registers
(which also assigns it a physical register) and one for simply storing back
physical registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4898 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 23:15:19 +00:00
Chris Lattner
f815aebd20 Checkin debug implementation of MCE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4893 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 20:56:42 +00:00
Misha Brukman
f514d51b20 * Abstracted out stack space allocation into its own function
* Added saving of register values to the stack


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4858 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:11:58 +00:00
Misha Brukman
0721867c8d A simple (spilling) register allocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4828 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 22:44:32 +00:00
Misha Brukman
b7825bc725 Initialize the SSARegMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4782 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:55:27 +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
570f55de8d Remove only uses of markDef/markDefAndUse methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4719 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:14:08 +00:00
Chris Lattner
0006bd7520 Fix warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4649 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 00:49:43 +00:00
Chris Lattner
5da2e6ac70 Move function to cpp file from header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4510 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 22:07:51 +00:00
Chris Lattner
ec3e2f41cd New iostream definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4482 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-01 16:46:05 +00:00
Vikram S. Adve
26fbcec43b Restore support for indirect function calls (which briefly wasn't working
after I removed annotations on MachineInstr for the CallDescriptor).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4469 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 15:34:48 +00:00
Chris Lattner
188732c971 Remove fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4447 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 02:02:37 +00:00
Chris Lattner
6a592271fb Add special code to make printing SSA form machine instructions nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4446 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 01:55:38 +00:00
Chris Lattner
2a79a0927c Use MRegisterInfo, if available, to print symbolic register names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4438 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 00:58:19 +00:00
Chris Lattner
1049164aa6 Implement structured machine code printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4435 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 00:48:05 +00:00
Chris Lattner
88726188fe Make argsize calculation stuff optional, so that Targets without FrameInfo
objects yet don't die


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4427 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:40:03 +00:00
Chris Lattner
ddd7fcb887 Implement autoinserting ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4426 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:19:00 +00:00
Chris Lattner
e316efc0e7 Rename annotation id
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4425 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:18:43 +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
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
f1757c414c Move TargetInstrDescriptors extern to the one .cpp file that refers to it:
MachineInstr.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4392 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:40:30 +00:00
Chris Lattner
d9512caca8 Use higher level methods, don't use TargetInstrDescriptors directly!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4389 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:35:39 +00:00
Chris Lattner
8f7802727f Use higher level method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4386 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:25:41 +00:00
Chris Lattner
ea9d249595 Remove #include, misleading comment, and a typedef used only once
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4383 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:08:05 +00:00
Chris Lattner
88da77c739 Inline typedef, eliminate unused method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4382 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:03:19 +00:00
Chris Lattner
67eaf73c89 Remove long dead #if 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4381 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:00:19 +00:00
Chris Lattner
cb6b4bd1c6 Add #includes that were eliminated from headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4380 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:51:05 +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
a80848704a Remove #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4378 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:50:20 +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
9538cecf27 Remove forward decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4376 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:49:44 +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
c5b8b1a040 MachineInstrInfo no longer #includes this header, so we must
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4366 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 23:54:47 +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
b7551ef115 Replaced uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4351 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:00:31 +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
ccdf23ebbb Rename some regalloc fields
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4346 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:43:23 +00:00
Chris Lattner
f726e776b8 Eliminate usage of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4344 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:22:04 +00:00
Chris Lattner
fcffe865f9 Remove usage of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4342 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:01:16 +00:00
Chris Lattner
fb3a0aed9b Remove usage of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4341 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 18:50:08 +00:00
Chris Lattner
b84a2ba877 Eliminate unneccesary use of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4339 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 06:01:57 +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
c5ddc8b74b Make Scheduling Class variables be 'unsigned' instead of 'int'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4333 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:53:02 +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
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
0be79c6c1b Add #includes now that MachineInstr.h doesn't include llvm/Target/MachineInstrInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4327 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:28:39 +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
e61a584f98 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4323 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:01:37 +00:00
Chris Lattner
e7d27fa00b MachineFunction now includes MachineBasicBlock so there is no need to
reinclude it


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4322 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:01:35 +00:00
Chris Lattner
55291ead55 Rename MachineCodeForBasicBlock to MachineBasicBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4318 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:41:47 +00:00
Chris Lattner
32be9f6cd4 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4317 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:41:27 +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
6b9445389a Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4312 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:16:38 +00:00
Chris Lattner
227c3d355b Move machine code generation/destruction passes out of Sparc.cpp because
they are generic


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4310 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:12:41 +00:00
Chris Lattner
1febf88ef4 Prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4307 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:02:51 +00:00
Chris Lattner
0c68e8ce6e Updates to match misha's changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4302 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 00:37:53 +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
78cee7e7ab Initial checkin of codegen infrastructure for LLVM-JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4282 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 22:54:41 +00:00
Chris Lattner
a0877726df Tell PassManager that this pass does not invalidate the CFG so that dominator
information and Loop info will not have to be recomputed after this runs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4269 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 03:30:47 +00:00
Chris Lattner
0ceeb42c97 Ensure definate initialization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4263 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 23:34:11 +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
Vikram S. Adve
cf911de3c6 Significant improvement: GEP used by a load or store no longer generates
a separate ADD; instead just use the indexed load/store instruction!
Also, a bug fix: folding a GEP with a leading non-zero index with
its predecessor was incorrect: now it only happens if the predecessor
is pointing to an indexable type (aka SequentialType).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4168 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 16:30:55 +00:00
Vikram S. Adve
1632e882f1 Use vectors instead of hash_maps for issueGaps and conflictLists.
These hash lookups were a major sink of time because they happen so often!
Also, add option to disable scheduling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4138 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:40:37 +00:00
Vikram S. Adve
acf0f704f9 Major bug fix: was not adding CD edges for RETURNs!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4137 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:39:22 +00:00
Vikram S. Adve
cb202e3de5 Major bug fix: spill code for an instruction in a delay slot was
merrily being inserted before/after the instruction!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4116 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 16:12:40 +00:00
Vikram S. Adve
cde3982b02 Don't pad variables in stack slots for performance!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4115 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 16:10:53 +00:00
Vikram S. Adve
aebdbe6988 Bug fix in folding getElementPtr instructions: don't fold one into
a predecessor if it has a non-zero first index and the predecessor
ends with a struct index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3982 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:55:05 +00:00
Vikram S. Adve
4117459567 Convert DIRS to PARALLEL_DIRS. They can be built independently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3972 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 11:52:14 +00:00
Vikram S. Adve
1c397aae8e Added a couple of helper methods for live range construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3970 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:05:43 +00:00
Vikram S. Adve
9d67cd1468 Live ranges for Return value and return address of a Call are now
created here, simply by handling all implicit operands (which should
have been done anyway).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3969 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:05:22 +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
Vikram S. Adve
ad9c978874 Fixed incorrect assertion: spill code for function ptr should be
handled like normal operands, not like other call arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3967 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:02:40 +00:00