Ruchira Sasanka
20e105f4b1
Fixed a bug with pervious ColorCallArg
...
llvm-svn: 1278
2001-11-12 20:54:19 +00:00
Ruchira Sasanka
24e29431bc
Canged ColorCallArg so that when a call arg is directly pushed on to stack
...
for argument passing, that instruction is directly added to the InstructionsBefore
set of the called machine instruction - i.e., it is not reordered.
llvm-svn: 1277
2001-11-12 20:31:47 +00:00
Vikram S. Adve
01daa32a92
Disable use of the Phi machine instruction which is no longer needed
...
for register allocation.
llvm-svn: 1270
2001-11-12 18:54:11 +00:00
Ruchira Sasanka
fcdc2ff6e0
Added phi elimination code
...
llvm-svn: 1265
2001-11-12 14:45:33 +00:00
Vikram S. Adve
e7dc82ec0d
Fix dumb bug in alignment adjustment code!
...
llvm-svn: 1260
2001-11-12 05:16:39 +00:00
Vikram S. Adve
68d00415b4
Fix bogus code that was eliminating needed args.
...
llvm-svn: 1259
2001-11-11 23:11:36 +00:00
Ruchira Sasanka
80fc434970
Fixed FP and SP usage. SP for outgoing args - for everything else FP
...
llvm-svn: 1258
2001-11-11 22:37:51 +00:00
Ruchira Sasanka
2d5c48fcc9
cahnged StackPointer accesses to FramePointer
...
llvm-svn: 1257
2001-11-11 21:49:37 +00:00
Vikram S. Adve
b3b55ae4b1
Down-growing offsets from FP should start at 0, not -1.
...
llvm-svn: 1255
2001-11-11 21:22:11 +00:00
Ruchira Sasanka
0c0859846a
Corrected reodering code for instructions inserted before calls
...
llvm-svn: 1252
2001-11-10 21:20:43 +00:00
Vikram S. Adve
295600c417
Several bug fixes in printing constants, particularly with unsized
...
arrays and multi-dimensional arrays.
llvm-svn: 1239
2001-11-10 02:03:06 +00:00
Vikram S. Adve
209d8e1c3b
Must generate an instruction for GetElementPtr if single user is not
...
a memory instruction!
llvm-svn: 1238
2001-11-10 01:05:26 +00:00
Ruchira Sasanka
1812fc499d
Disabled some debuggin messages
...
llvm-svn: 1237
2001-11-10 00:26:55 +00:00
Ruchira Sasanka
d0d294afde
Added code for correct reordering of call arguments
...
llvm-svn: 1234
2001-11-09 23:49:14 +00:00
Vikram S. Adve
2ccb900add
Add support to print constant arrays and structures.
...
Align data larger than an L1 cache line on L1 cache line boundary.
llvm-svn: 1228
2001-11-09 02:19:29 +00:00
Vikram S. Adve
bc23cf5521
Do the same for float->int that we did for int->float earlier.
...
Also check IsPointerType() in addition to IsIntegral() in several places.
llvm-svn: 1227
2001-11-09 02:18:16 +00:00
Vikram S. Adve
e6642f93d4
Added function UltraSparcInstrInfo::CreateCodeToCopyFloatToInt.
...
llvm-svn: 1226
2001-11-09 02:16:40 +00:00
Vikram S. Adve
f34fa6956d
Added class UltraSparcCacheInfo.
...
llvm-svn: 1225
2001-11-09 02:16:04 +00:00
Vikram S. Adve
367f34f7cc
Bug fix: Need to include the stack offset "bias" in assembly code itself.
...
Added class UltraSparcCacheInfo.
Added function to convert float to int by copying via memory.
llvm-svn: 1224
2001-11-09 02:15:52 +00:00
Vikram S. Adve
56e61ec517
Bug fix: need to use .reserve for uninitialized data.
...
llvm-svn: 1205
2001-11-08 14:29:57 +00:00
Vikram S. Adve
81908213ae
Added support for bitwise logical operators. Use different labels for
...
for these than for boolean logicals to avoid making Burg diverge.
See Burg manual for more information.
llvm-svn: 1196
2001-11-08 05:14:02 +00:00
Vikram S. Adve
03f12f521f
Fixed function getEscapedString to follow the Sparc assembly rules
...
for symbol names! (And renamed it to getValidSymbolName).
Fixed format for float and other constants.
llvm-svn: 1195
2001-11-08 05:12:37 +00:00
Vikram S. Adve
f889a11590
Fix bugs in FITOS/D instruction generation.
...
The space for optional args in the stack frame is now being computed,
so finish the code generation for the variable `alloca'.
Finally, made a major overhaul of how stack frame is managed.
llvm-svn: 1194
2001-11-08 05:04:09 +00:00
Vikram S. Adve
503d3098fa
Added new function UltraSparcInstrInfo::CreateCodeToCopyIntToFloat.
...
Also major overhaul of how stack frame is managed.
llvm-svn: 1193
2001-11-08 04:57:53 +00:00
Vikram S. Adve
7a1524f971
Removed class RegStackOffsets and used class MachineCodeForMethod
...
directly to manage stack frame.
llvm-svn: 1192
2001-11-08 04:56:41 +00:00
Vikram S. Adve
6fcb28924b
Use MachineFrameInfo as base class of UltraSparcFrameInfo, and made
...
a major overhaul of this class and how stack frames are managed.
llvm-svn: 1191
2001-11-08 04:55:13 +00:00
Chris Lattner
e147d062fa
Killing warnings
...
llvm-svn: 1175
2001-11-07 14:01:59 +00:00
Chris Lattner
5e030830a3
Squelch warnings about not returning a value
...
llvm-svn: 1173
2001-11-07 13:49:12 +00:00
Vikram S. Adve
f5b4f47cff
Bug fix: Printing AdIBef and AdIAft outside the scope where they
...
were declared, and in some cases when they were unintialized.
llvm-svn: 1146
2001-11-06 05:01:54 +00:00
Vikram S. Adve
80cf60687d
Generate code for Rem instruction.
...
llvm-svn: 1124
2001-11-04 21:59:14 +00:00
Vikram S. Adve
ea5d1f5db8
Fixed instruction information for RDCCR and WRCCR.
...
Fixed selection to create a TmpInstruction for each integer CC register
(since it is an implicit side-effect, unlike FP CC registers which are
explicit operands).
llvm-svn: 1120
2001-11-04 19:34:49 +00:00
Chris Lattner
33d9cb9903
Minor method rename
...
llvm-svn: 1119
2001-11-04 08:08:34 +00:00
Ruchira Sasanka
9d8950d240
Added code to support correct saving of %ccr across calls
...
llvm-svn: 1111
2001-11-03 19:59:59 +00:00
Ruchira Sasanka
b7a397253f
Arranged stack frame - needs furhter organization
...
Moved InsertCallerSaveInstr to the SparcRegInfo.cpp
llvm-svn: 1106
2001-11-03 17:13:27 +00:00
Chris Lattner
41a8289eb8
Check in to use moved stringizing code
...
llvm-svn: 1024
2001-10-29 13:39:38 +00:00
Vikram S. Adve
5ff15721c9
Minor fix I omitted to check in.
...
llvm-svn: 1012
2001-10-28 22:19:06 +00:00
Vikram S. Adve
2f72cdd756
Generate SETX for 64-bit integers!
...
llvm-svn: 1007
2001-10-28 21:41:46 +00:00
Vikram S. Adve
a5619eb835
Add SETX instruction for 64-bit constants.
...
Add M_CC_FLAG for many instructions that use int or fp CC registers.
llvm-svn: 1006
2001-10-28 21:41:01 +00:00
Vikram S. Adve
b31f9c3ea6
Need to subtract, not add, stack size in SAVE instruction!
...
llvm-svn: 1005
2001-10-28 21:39:47 +00:00
Vikram S. Adve
71b265a848
Major overhaul to print globals and constants.
...
llvm-svn: 1004
2001-10-28 21:38:52 +00:00
Ruchira Sasanka
9c38dbc249
Added support for spilling
...
llvm-svn: 992
2001-10-28 18:15:12 +00:00
Ruchira Sasanka
0863c161e9
Fixed load syntax in EmitAssembly
...
Fixed cpReg2Mem (store) operand oreder in SparcRegInfo.cpp
llvm-svn: 984
2001-10-24 22:05:34 +00:00
Ruchira Sasanka
36bcd79050
Fixed logic for checking whether a LR received the correct color.
...
llvm-svn: 976
2001-10-24 15:56:58 +00:00
Ruchira Sasanka
6a7f02082b
Corrected a bug in SparcRegInfo.cpp - to add inserted instructions before a return
...
llvm-svn: 969
2001-10-23 21:40:39 +00:00
Vikram S. Adve
18a9e39214
UNUSED.
...
llvm-svn: 944
2001-10-22 13:46:38 +00:00
Vikram S. Adve
a0177cdca5
Split JMPL into JMPLCALL and JMPLRET.
...
llvm-svn: 943
2001-10-22 13:44:53 +00:00
Vikram S. Adve
9090b50ba9
Added a frame layout class, and code to insert prolog/epilog code.
...
llvm-svn: 942
2001-10-22 13:44:23 +00:00
Vikram S. Adve
5462dca9f1
Reordered registers slightly to simplify a new check.
...
Added a function to map between the caller's and callee's register windows.
llvm-svn: 941
2001-10-22 13:43:08 +00:00
Vikram S. Adve
8498277e77
Split JMPL into JMPLCALL and JMPLRET so that IsCall and IsReturn can
...
be used to distinguish those uses of the `jmpl' instruction.
llvm-svn: 940
2001-10-22 13:41:12 +00:00
Vikram S. Adve
52e41008e3
Added functions to generate prolog and epilog code.
...
Use JMPLRET instead of RETURN for method returns so that
llvm-svn: 939
2001-10-22 13:36:31 +00:00
Vikram S. Adve
6b492ddc15
Added SAVE and RESTORE. Duplicated JMPL into JMPLCALL and JMPLRET,
...
which have the same opcode and operands but different flags.
llvm-svn: 938
2001-10-22 13:32:55 +00:00
Vikram S. Adve
7c1a8d6d53
Reordered a couple of registers to simplify some new checks.
...
Added code to map between caller's and callee's register windows.
Added frame layout class.
llvm-svn: 937
2001-10-22 13:31:53 +00:00
Ruchira Sasanka
24729a34ce
Added support for both call/jmpl instructions
...
llvm-svn: 930
2001-10-21 16:43:41 +00:00
Vikram S. Adve
9bc488984f
Fixed printing of offset operand for RETURN instruction.
...
llvm-svn: 928
2001-10-20 21:33:50 +00:00
Vikram S. Adve
5731249137
Use CALL for direct function calls; JMPL for indirect ones.
...
llvm-svn: 927
2001-10-20 20:57:06 +00:00
Vikram S. Adve
72ebb454d0
Minor bug fix in printing operands of JMPL.
...
llvm-svn: 926
2001-10-20 20:56:40 +00:00
Ruchira Sasanka
6a073498ba
Added code so that colorIGNode does not unnecessarily reserve unusable
...
Suggested colors for neighbors.
llvm-svn: 921
2001-10-19 21:41:16 +00:00
Ruchira Sasanka
d77a1bbc2f
Corrected call interference bug - suggested color not allocated if
...
volatile and there are call interferences
llvm-svn: 918
2001-10-19 17:23:43 +00:00
Ruchira Sasanka
5f629318fa
Added support for condition code loading/stroing in methods cpReg2Reg etc.
...
llvm-svn: 911
2001-10-18 22:38:52 +00:00
Chris Lattner
ee6e199f0e
Change Sources specifier to ExtraSources
...
llvm-svn: 874
2001-10-18 01:48:09 +00:00
Vikram S. Adve
6c697526bf
1. Move most of the constant-fixup code into machine-independent file
...
InstrSelectionSupport.cpp. It now happens in a bottom-up pass on
each BURG tree after the original top-down selection pass on the tree.
2. Handle global values as constants (viz., constant addresses).
llvm-svn: 868
2001-10-18 00:26:20 +00:00
Vikram S. Adve
cc776df39c
Sparc-specific code shared between local files.
...
llvm-svn: 864
2001-10-18 00:03:20 +00:00
Vikram S. Adve
01e57a481e
Moved implementation of class UltraSparcInstrInfo to SparcInstrInfo.cpp.
...
llvm-svn: 863
2001-10-18 00:02:32 +00:00
Vikram S. Adve
505130cb30
Added virtual function to generate an instruction sequence to
...
load a constant into a register.
llvm-svn: 862
2001-10-18 00:02:06 +00:00
Vikram S. Adve
4cc2b3b155
Moved implementation of class UltraSparcInstrInfo here.
...
llvm-svn: 861
2001-10-18 00:01:48 +00:00
Vikram S. Adve
6b4ba47f31
Only list automatically generated .cpp files.
...
llvm-svn: 854
2001-10-17 12:34:26 +00:00
Ruchira Sasanka
5b8971f418
Added support for caller saving
...
llvm-svn: 847
2001-10-16 01:23:19 +00:00
Chris Lattner
3294e7c14b
Emit the proper .type declarations to tell the debugger what a function is
...
llvm-svn: 845
2001-10-15 19:34:17 +00:00
Chris Lattner
77d2c22d94
Handle abnormal jmpl syntax correctly
...
llvm-svn: 844
2001-10-15 19:21:31 +00:00
Chris Lattner
f3f1e452ea
Output to cerr rather than cout so that debug info doesn't mess up assembly generation
...
llvm-svn: 840
2001-10-15 18:15:27 +00:00
Ruchira Sasanka
086bf0fe3a
updated suggesting/coloring of call & return args & implicit operands
...
llvm-svn: 830
2001-10-15 16:25:28 +00:00
Chris Lattner
02b671388e
Be const correct
...
llvm-svn: 826
2001-10-15 15:54:43 +00:00
Vikram S. Adve
e6c611b990
Forward operands into implicit uses as well as explicit ones.
...
llvm-svn: 808
2001-10-14 23:28:43 +00:00
Vikram S. Adve
1679709b71
Two bug fixes that were suppressing some "load-constant-into-register" instrs.
...
llvm-svn: 795
2001-10-14 18:10:33 +00:00
Chris Lattner
b3368ac9db
Move the burg file to here. Add .in suffix to indicate that it gets
...
preprocessed before burg gets to it
llvm-svn: 794
2001-10-14 17:26:21 +00:00
Chris Lattner
1a176f15dc
Make the sparc.burg file be a little more flexible and rubust in the fact of
...
renumbering of instructions. It is still horribly broken and grossly dependant on the number of instructions, but now it is a least a little better.
Oh yeah it also works now.
llvm-svn: 793
2001-10-14 17:25:31 +00:00
Chris Lattner
8deb9e588e
Fix broken #endif
...
llvm-svn: 768
2001-10-13 06:54:54 +00:00
Chris Lattner
a742b6acf3
* Add #include
...
* Fix #endif problems
* Change to getCalledValue instead of getCalledMethod
llvm-svn: 767
2001-10-13 06:54:30 +00:00
Vikram S. Adve
8aeb09fcc7
Record implicitRefs for each machine instruction instead of
...
each VM instruction.
llvm-svn: 725
2001-10-11 04:23:19 +00:00
Vikram S. Adve
021d523b2f
Insert code to load constants used as Call or Return arguments.
...
Also, note return value of a Call as an "implicitUse".
llvm-svn: 720
2001-10-10 20:56:33 +00:00
Ruchira Sasanka
990d8fb3e8
--removed %g regs being allocated - fix later
...
llvm-svn: 714
2001-10-09 23:36:13 +00:00
Chris Lattner
7fac070215
* Both Method & GlobalVariable now subclass GlobalValue
...
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion
llvm-svn: 703
2001-10-03 14:53:21 +00:00
Chris Lattner
da55810666
Commit more code over to new cast style
...
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
3856934386
Convert more code to use new style casts
...
Eliminate old style casts from value.h
llvm-svn: 696
2001-10-01 20:11:19 +00:00
Chris Lattner
8f19112923
Add more support for new style casts
...
Convert more code to use them
llvm-svn: 695
2001-10-01 18:26:53 +00:00
Chris Lattner
4b717c0edc
Add support for new style casts
...
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner
0156ba6185
Fix emission of return instructions
...
llvm-svn: 688
2001-10-01 02:32:34 +00:00
Vikram S. Adve
3652ef7587
Several fixes:
...
(1) Avoid hard-coding some register numbers.
(2) Fix some incorrect branch opcodes.
(3) Don't try to move int register to float register!
(4) If an operand being forwarded is a constant and it doesn't fit
into the immed field of the copy machine instruction, then
generate a load-constant instead of a copy.
(5) Use (unsigned long) 0 for copying a pointer via "add 0, ptr -> ptr2".
llvm-svn: 683
2001-10-01 00:12:53 +00:00
Vikram S. Adve
40378e32cd
Change latency of setuw and setsw to 2 cycles.
...
llvm-svn: 681
2001-09-30 23:46:57 +00:00
Ruchira Sasanka
560b0ad482
added suggesting color support
...
llvm-svn: 673
2001-09-30 23:19:57 +00:00
Ruchira Sasanka
5867c7ae80
added support for suggesting colors
...
llvm-svn: 671
2001-09-30 23:16:47 +00:00
Chris Lattner
b021f68438
* Properly escape function names
...
* Ignore %xcc argument on conditional branches
llvm-svn: 663
2001-09-28 15:07:24 +00:00
Chris Lattner
c6635c9fa2
Check in bug fix for vadve
...
llvm-svn: 662
2001-09-28 15:06:55 +00:00
Ruchira Sasanka
ebd284dfe9
-- fixed a ret val bug
...
llvm-svn: 652
2001-09-19 22:40:51 +00:00
Chris Lattner
e86a0230aa
Seperate instruction definitions into new SparcInstr.def file
...
Move contents of SparcMachineInstrDesc[] out of SparcInternals.h
into Sparc.cpp
llvm-svn: 644
2001-09-19 15:56:23 +00:00
Chris Lattner
49726a21a5
Add EmitAssembly to mf
...
llvm-svn: 637
2001-09-19 13:48:18 +00:00
Chris Lattner
036a317f2a
First cut at assembly output
...
llvm-svn: 636
2001-09-19 13:47:27 +00:00
Chris Lattner
518da4f3cd
Add emitAssemblyMethod to TargetMachine
...
llvm-svn: 635
2001-09-19 13:47:12 +00:00
Ruchira Sasanka
dfc6c887da
-- ruchira
...
llvm-svn: 632
2001-09-18 22:52:44 +00:00
Chris Lattner
caa449cf5c
Remove extraneous #includes
...
llvm-svn: 627
2001-09-18 17:03:48 +00:00
Vikram S. Adve
8dd5e310e0
Renamed a header file.
...
llvm-svn: 619
2001-09-18 13:04:53 +00:00
Vikram S. Adve
514180ed83
Make class TargetMachine the common interface to all target-dependent
...
information, including instr, sched, and reg information.
This allows us to allocate them all in one place and use them much
more uniformly.
llvm-svn: 618
2001-09-18 13:04:24 +00:00
Vikram S. Adve
78d50d0f7a
Allow pointer constants as well as integer and booleans.
...
Skip over list nodes in ForwardOperand.
llvm-svn: 617
2001-09-18 13:03:13 +00:00
Vikram S. Adve
49d908a419
Make class TargetMachine the common interface to all target-dependent
...
information, including instr, sched, and reg information.
Rename files to match the primary classes they provide.
Commented out call to register allocation until more tests run correctly.
llvm-svn: 616
2001-09-18 13:01:29 +00:00
Ruchira Sasanka
970886e738
modified printing of debug messages
...
llvm-svn: 593
2001-09-15 19:11:31 +00:00
Ruchira Sasanka
7d144a8500
added register allocation code
...
llvm-svn: 585
2001-09-15 00:30:44 +00:00
Ruchira Sasanka
dfdab46dc1
*** empty log message ***
...
llvm-svn: 579
2001-09-14 20:31:39 +00:00
Chris Lattner
95c652b59b
Add support for loading and storing pointers...
...
llvm-svn: 575
2001-09-14 20:00:02 +00:00
Chris Lattner
ad2cbf0e18
Fix a bug that caused a crash if a setcc had zero uses.
...
llvm-svn: 574
2001-09-14 18:29:28 +00:00
Chris Lattner
8d44b99844
Chris seems fond of #include <vector>. Fix these. Also convert use list in
...
Value to a vector instead of a list.
Move SchedGraph.h & SchedPriorities.h into lib/CodeGen/InstrScheduling
llvm-svn: 572
2001-09-14 16:56:32 +00:00
Chris Lattner
22a6a90511
Make a new llvm/Target #include directory.
...
Move files from lib/CodeGen/TargetMachine to lib/Target
Move TargetData.h and TargetMachine.h to Target/{Data.h|Machine.h}
Prepare to split TargetMachine.h into several smaller files
llvm-svn: 566
2001-09-14 05:34:53 +00:00
Chris Lattner
f8464e4b8d
Checkin changes to:
...
1. Clean up the TargetMachine structure. No more wierd pointers that have to
be cast around and taken care of by the target.
2. Instruction Scheduling now takes the schedinfo as an argument. The same
should be done with the instinfo, it just isn't now.
llvm-svn: 565
2001-09-14 04:32:55 +00:00
Chris Lattner
5fae0de330
Move files to new sparc directory
...
llvm-svn: 563
2001-09-14 03:56:45 +00:00
Chris Lattner
06028541ab
Move the sparc target to a new lib/Target directory
...
llvm-svn: 562
2001-09-14 03:55:11 +00:00
Chris Lattner
b0ddffaae3
Move files.
...
llvm-svn: 561
2001-09-14 03:47:57 +00:00