Commit Graph

3543 Commits

Author SHA1 Message Date
Vikram S. Adve
24ce4d8eb8 Minor changes.
llvm-svn: 6470
2003-05-31 07:41:54 +00:00
Vikram S. Adve
ad83684c77 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.

llvm-svn: 6469
2003-05-31 07:41:24 +00:00
Vikram S. Adve
c468882155 Allow explicit physical registers for implicit operands.
llvm-svn: 6468
2003-05-31 07:39:06 +00:00
Vikram S. Adve
465f9b6738 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.

llvm-svn: 6467
2003-05-31 07:37:05 +00:00
Vikram S. Adve
a83804a29a 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.

llvm-svn: 6465
2003-05-31 07:32:01 +00:00
Misha Brukman
736e6172dc When converting virtual registers to immediate constants, change the opcode.
llvm-svn: 6452
2003-05-30 20:36:27 +00:00
Misha Brukman
94908b010e Added saveBBreferences() for BasicBlock resolution.
llvm-svn: 6451
2003-05-30 20:32:45 +00:00
Guochun Shi
856ee9154f so far everything compiles
llvm-svn: 6423
2003-05-30 00:17:09 +00:00
Misha Brukman
df88104198 Correctly write out binary data as chars, before they're cast to ints.
llvm-svn: 6385
2003-05-28 18:27:19 +00:00
Misha Brukman
cbd4678663 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.

llvm-svn: 6379
2003-05-27 22:43:19 +00:00
Vikram S. Adve
7366fa1aa6 (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".

llvm-svn: 6341
2003-05-27 00:05:23 +00:00
Misha Brukman
7ca74ef252 Cleaned up code layout. No functional changes.
llvm-svn: 6304
2003-05-22 21:49:18 +00:00
Misha Brukman
b674a1b95b Kill `using' directives.
llvm-svn: 6301
2003-05-22 21:24:35 +00:00
Chris Lattner
1103e8349d Use a kill, not a dead definition, update comment
llvm-svn: 6131
2003-05-12 17:37:30 +00:00
Chris Lattner
51ae817fd6 * 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.

llvm-svn: 6117
2003-05-12 14:28:28 +00:00
Chris Lattner
2e50ac75a0 Fix bug where we could iterate off the end of a basic block
llvm-svn: 6116
2003-05-12 14:26:38 +00:00
Chris Lattner
584bae4733 * 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.

llvm-svn: 6115
2003-05-12 14:24:00 +00:00
Chris Lattner
bd854dafec Fix N^2 algorithm
llvm-svn: 6112
2003-05-12 04:08:54 +00:00
Chris Lattner
00ee7cfa83 * Fix several comments
* Update LiveVar info better, fixing bug: Jello/2003-05-11-PHIRegAllocBug.ll

llvm-svn: 6110
2003-05-12 03:55:21 +00:00
Chris Lattner
5a78ee85c6 Fix tab infestation!
llvm-svn: 6109
2003-05-12 03:54:14 +00:00
Chris Lattner
2274c71150 Allow const functions
llvm-svn: 6056
2003-05-09 03:27:41 +00:00
Chris Lattner
c9a4f4c6b4 Add methods for stub function generation
llvm-svn: 6054
2003-05-08 21:54:18 +00:00
Chris Lattner
5ab42e5739 Add a vector to keep track of which registers are allocatable. Remove FIXMEs
llvm-svn: 6015
2003-05-07 20:08:36 +00:00
Chris Lattner
9eb2172176 Re-add gross hack, it's still necessary. :(
llvm-svn: 6012
2003-05-06 21:44:54 +00:00
Chris Lattner
824698b891 Remove hideously nasty hack
llvm-svn: 6011
2003-05-06 21:32:39 +00:00
Misha Brukman
e842da3dcc Debug output should go to cerr, not cout, because that's where bytecode goes.
llvm-svn: 6002
2003-05-04 22:51:30 +00:00
Chris Lattner
f22d1f5912 Fix a bug which occurred with empty basic blocks
llvm-svn: 5982
2003-05-02 18:44:42 +00:00
Chris Lattner
f641fd08bc Minor cleanup
llvm-svn: 5976
2003-05-01 21:18:47 +00:00
Chris Lattner
6ee2cf5d89 Remove unneccesary &*
llvm-svn: 5871
2003-04-23 16:36:11 +00:00
Misha Brukman
3b78995848 Just some code beautification changes I had sitting around in my tree.
llvm-svn: 5859
2003-04-22 23:00:08 +00:00
Misha Brukman
a45606276d 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.

llvm-svn: 5769
2003-04-10 19:19:23 +00:00
Misha Brukman
218a732724 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.

llvm-svn: 5768
2003-04-09 21:51:34 +00:00
Guochun Shi
b250dc6909 change the include file names and some class names to make it compile
llvm-svn: 5764
2003-04-06 23:56:19 +00:00
Guochun Shi
45d8f3279e *** empty log message ***
llvm-svn: 5755
2003-03-27 17:57:44 +00:00
Chris Lattner
eb45c982ae Print machine frame objects with the frame offset intrinsic to the machine
llvm-svn: 5329
2003-01-16 18:35:57 +00:00
Chris Lattner
176866caed Fix problems with empty basic blocks
llvm-svn: 5326
2003-01-16 18:06:43 +00:00
Chris Lattner
c52c791806 Arg, fix bugs in previous checkin...
llvm-svn: 5322
2003-01-16 02:24:20 +00:00
Chris Lattner
910ee768d0 Add assertion
llvm-svn: 5321
2003-01-16 02:22:08 +00:00
Chris Lattner
86ee825bce * Insert prolog/epilog code before rewriting indexes
* Fix calculation of frame offsets when there is an offset.

llvm-svn: 5318
2003-01-15 22:52:34 +00:00
Chris Lattner
dea36ca100 Move sparc specific code into the Sparc backend
llvm-svn: 5317
2003-01-15 21:36:50 +00:00
Chris Lattner
1ff57d914c Adjust to new interfaces
llvm-svn: 5314
2003-01-15 21:14:01 +00:00
Chris Lattner
e46165fcf0 Move headers around
llvm-svn: 5312
2003-01-15 21:02:16 +00:00
Chris Lattner
14802a539d Header is moved into local directory
llvm-svn: 5311
2003-01-15 21:00:02 +00:00
Chris Lattner
5f738161ae Fix bug in previous checkin
llvm-svn: 5310
2003-01-15 20:32:15 +00:00
Chris Lattner
c75dc4856e Add new method
llvm-svn: 5309
2003-01-15 20:28:36 +00:00
Chris Lattner
a23969b669 #include RegClass.h explicitly
llvm-svn: 5307
2003-01-15 19:57:07 +00:00
Chris Lattner
19a7cb2240 Remvoe dependency on RegClass.h
llvm-svn: 5306
2003-01-15 19:56:21 +00:00
Chris Lattner
d840ccd2e0 Prune #includes
llvm-svn: 5303
2003-01-15 19:48:13 +00:00
Chris Lattner
46d4d231c5 Minor changes
llvm-svn: 5302
2003-01-15 19:47:53 +00:00
Chris Lattner
5da071b265 Remove obsolete ctor
llvm-svn: 5301
2003-01-15 19:47:02 +00:00