Vikram S. Adve
940f3fa91b
Overhaul integer conversions to match C++ ISO standard.
...
Don't allow direct FP-to-uint conversion (must be eliminated by preselection).
Address arithmetic for arrays is now entirely 64-bit so no sign-ext needed.
llvm-svn: 3961
2002-09-27 14:33:08 +00:00
Vikram S. Adve
ae0af2a164
Modify operand order for Create{Sign,Zero}ExtensionInstructions.
...
llvm-svn: 3960
2002-09-27 14:29:45 +00:00
Vikram S. Adve
2a87b4496f
Bug fix: some redundant copies were not being deleted after detection :-|.
...
llvm-svn: 3959
2002-09-27 14:27:37 +00:00
Vikram S. Adve
6cff79b3e1
Decompose FP-to-UInt casts into FP-to-ULong-toUInt.
...
llvm-svn: 3957
2002-09-27 14:24:45 +00:00
Chris Lattner
0f9d9214ab
Convert TargetData to be an ImmutablePass
...
llvm-svn: 3927
2002-09-25 23:46:55 +00:00
Vikram S. Adve
a7e73bb0a0
Put intermediate source files in a subdirectory here instead of with
...
object files. Also,
llvm-svn: 3884
2002-09-23 13:12:28 +00:00
Vikram S. Adve
20fc3f0ffd
Disable reassociation pass in LLC until it is fixed.
...
llvm-svn: 3883
2002-09-23 12:55:50 +00:00
Anand Shukla
a34898d9ac
Changed codegen to add 2 empty slots at the top of stack using StackSlots pass
...
llvm-svn: 3873
2002-09-21 05:01:21 +00:00
Anand Shukla
508121e5d9
Initial version: it adds 2 empty slots at the top of stack
...
llvm-svn: 3872
2002-09-21 04:58:26 +00:00
Vikram S. Adve
bcab1ae6c9
Add peephole optimization pass at the end of code generation.
...
llvm-svn: 3846
2002-09-20 00:52:43 +00:00
Vikram S. Adve
ed466a713a
Added class MachineOptInfo as interface to target-specific
...
routines supporting machine code optimization.
Also added method MachineInstrInfo::getNOPOpCode().
llvm-svn: 3845
2002-09-20 00:52:09 +00:00
Vikram S. Adve
82b15d7253
Peephole optimization pass on final machine code.
...
llvm-svn: 3840
2002-09-20 00:42:11 +00:00
Vikram S. Adve
6f0ad9998b
Moving these files from Code/PreSelection to here.
...
Original logs for PreSelection.cpp:
revision 1.2
date: 2002/09/17 23:50:32; author: lattner; state: Exp; lines: +1 -3
Don't put default parameter values into .cpp files, it breaks 3.x compilers
revision 1.1
date: 2002/09/16 15:31:13; author: vadve; state: Exp;
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.
llvm-svn: 3838
2002-09-20 00:29:28 +00:00
Anand Shukla
4a62f43843
Removed debug info printing
...
llvm-svn: 3778
2002-09-17 20:24:46 +00:00
Vikram S. Adve
d43591bbc5
Use ulong instead of uint for size expressions.
...
llvm-svn: 3744
2002-09-16 15:56:45 +00:00
Vikram S. Adve
59b3b6c07b
Add methods to query about the representation of LLVM quantities (e.g.,
...
constants). Useful for target-dependent LLVM transformations like
Preselection.
llvm-svn: 3743
2002-09-16 15:56:01 +00:00
Vikram S. Adve
571ad069cc
Don't print out global names unnecesssarily. Also, expose pass
...
constructors so passes can be inserted by TargetMachine.cpp.
llvm-svn: 3742
2002-09-16 15:54:02 +00:00
Vikram S. Adve
58678cc06e
Move all the code that creates code generation passes from Sparc.cpp to
...
TargetMachine.cpp, since it is entirely machine-independent.
Also, add options to disable optional back-end passes (preselection and
instr. scheduling).
llvm-svn: 3740
2002-09-16 15:39:26 +00:00
Misha Brukman
9e054e1d17
Again, including Module makes Function unnecessary.
...
llvm-svn: 3714
2002-09-14 02:07:43 +00:00
Chris Lattner
cb973bf5ee
- Change getelementptr instruction to use long indexes instead of uint
...
indexes for sequential types.
llvm-svn: 3683
2002-09-11 01:21:35 +00:00
Chris Lattner
fb017cb38c
- Change getelementptr instruction to use long indexes instead of uint
...
indexes for sequential types.
llvm-svn: 3682
2002-09-11 01:21:33 +00:00
Vikram S. Adve
1b1f2b2f5e
Silly bug fix: Machine code vector could be empty for a no-op cast instruction,
...
e.g., cast double to double.
llvm-svn: 3633
2002-09-09 14:54:21 +00:00
Vikram S. Adve
58e8292647
Add new function UltraSparcInstrInfo::CreateZeroExtensionInstructions.
...
llvm-svn: 3581
2002-09-05 18:34:31 +00:00
Vikram S. Adve
e9990478f0
Bug fixes in casting between floats and ints smaller than 64 bits.
...
Add UltraSparcInstrInfo::CreateZeroExtensionInstructions to help with that.
llvm-svn: 3580
2002-09-05 18:33:59 +00:00
Vikram S. Adve
94b41af2f3
-- Use size of pointer element type instead of pointer type in array offsets!
...
-- A few bug fixes in casting between floats and ints.
-- Use SRL reg, 0 instead of AND reg, 0xffffffff to clear high 32 bits.
llvm-svn: 3579
2002-09-05 18:32:13 +00:00
Vikram S. Adve
e7aa2bf095
-- Bug fix: use byte offsets not typed offsets in output assembly!
...
-- Add support for ConstantExpr constants (only cast and add operators so far)
-- Avoid generating label Bbss.bss, which sometimes came out twice.
llvm-svn: 3578
2002-09-05 18:28:10 +00:00
Chris Lattner
3ce5b343c5
- Renamed Type::isIntegral() to Type::isInteger()
...
- Added new method Type::isIntegral() that is the same as isInteger, but
also accepts bool.
llvm-svn: 3574
2002-09-03 01:08:28 +00:00
Anand Shukla
9a0d43e242
moved this file from lib/Reoptimizer/Mapping
...
llvm-svn: 3519
2002-08-27 22:47:33 +00:00
Anand Shukla
b18da43529
Added getFunctionInfo and MappingInfoForFunction pass, and fixed the earlier error in compiling
...
llvm-svn: 3513
2002-08-27 16:45:17 +00:00
Vikram S. Adve
87367a8b67
LoadIdx non-terminal no longer needed.
...
llvm-svn: 3499
2002-08-24 20:58:04 +00:00
Vikram S. Adve
96a4efb0a6
Sign-extend values used to index arrays (and Simplify
...
SetOperandsForMemInstr significantly). Load and Store
no longer have any indices. Eliminate spurious sign-extension
on a cast to float/double.
llvm-svn: 3498
2002-08-24 20:56:53 +00:00
Vikram S. Adve
ec7858cc82
Fix sign-extension: it needs to happen *after* multiplying by type size.
...
llvm-svn: 3497
2002-08-24 14:44:58 +00:00
Vikram S. Adve
da747e6066
Simplify previous hack slightly.
...
llvm-svn: 3490
2002-08-23 03:21:01 +00:00
Vikram S. Adve
ced94f5f61
Force sign-extension for uint array indexes from 32-bit to 64-bits
...
since uint is not normally sign-extended when casting to uint64_t.
llvm-svn: 3489
2002-08-23 02:55:51 +00:00
Chris Lattner
9f18db8156
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3488
2002-08-22 23:37:24 +00:00
Chris Lattner
821de50a04
Change code to not use the copyOperands method added to User. It's now
...
more efficient to boot.
llvm-svn: 3453
2002-08-22 15:57:58 +00:00
Vikram S. Adve
e6c5ceeede
Fix two resource names.
...
llvm-svn: 3443
2002-08-22 02:58:57 +00:00
Vikram S. Adve
098c5d67ba
Add AsmPrinter::ConstantExprToString, which writes out a ConstantExpr
...
as an expression.
llvm-svn: 3442
2002-08-22 02:58:36 +00:00
Vikram S. Adve
39210a39ad
Eliminate bool, boolreg and boolconst nonterminals, and just use
...
reg and Constant instead.
llvm-svn: 3441
2002-08-22 02:56:10 +00:00
Vikram S. Adve
dae1fe230e
Change rules for Not, since it is now implemented as Xor(reg,11..1).
...
Eliminate bool, boolreg and boolconst nonterminals, and just use
reg and Constant instead.
llvm-svn: 3440
2002-08-22 02:55:21 +00:00
Chris Lattner
a477df934f
This case JUST handles constantpointer nulls, not all pointers.
...
llvm-svn: 3402
2002-08-20 17:02:48 +00:00
Vikram S. Adve
5e22d4f669
Revise code generation for unary Not (boolean and bitwise), which is
...
no longer a separate instruction but is instead implemented with XOR.
llvm-svn: 3342
2002-08-15 14:17:37 +00:00
Vikram S. Adve
19b35e6904
Bug fix in TargetData::getIndexedOffset: We were using the pointer
...
type instead of the element type for the element size for arrays.
llvm-svn: 3302
2002-08-13 18:17:56 +00:00
Vikram S. Adve
74af31c71e
Several bug fixes in casting to signed int values.
...
llvm-svn: 3301
2002-08-13 18:04:08 +00:00
Vikram S. Adve
5f028d4787
Handle small unsigned results correctly by clearing high bits.
...
Bug fixes in casting to signed int values.
llvm-svn: 3297
2002-08-13 17:40:54 +00:00
Brian Ensink
8395e5b203
Build correctly in the face of /shared.
...
-Chris
llvm-svn: 3296
2002-08-12 22:09:44 +00:00
Chris Lattner
4c524344b9
- Clean up interface to Sparc register handling a bit:
...
- Eliminate Sparc*Order classes, moving contents to Sparc*Class classes
- get register name methods now return const char * const pointers instead
of std::string's.
- Added file header comments to SparcRegClassInfo.(cpp|h)
- Moved BIG constant arrays out of SparcRegClassInfo.h, into
SparcRegInfo.cpp. This should allow a LOT of std::string constructors to
not have to be called.
llvm-svn: 3295
2002-08-12 21:25:05 +00:00
Chris Lattner
8a4787495a
* Removed extraneous #includes
...
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes
llvm-svn: 3278
2002-08-09 20:08:06 +00:00
Chris Lattner
4d9fadc44a
* Removed extraneous #includes
...
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes
llvm-svn: 3277
2002-08-09 20:08:03 +00:00
Chris Lattner
811987ce5c
Merge three loops into one.
...
llvm-svn: 3259
2002-08-07 21:39:48 +00:00
Chris Lattner
73ed86900d
Fix breakage in the build
...
llvm-svn: 3258
2002-08-07 21:39:39 +00:00
Mehwish Nagda
0517186a70
added Mapping and Function Pass
...
llvm-svn: 3251
2002-08-05 23:23:19 +00:00
Vikram S. Adve
5d16e242e1
Bug fix in CreateCodeToLoadConst(): use sign of dest, not operand,
...
in choosing how to create int-set instructions.
llvm-svn: 3248
2002-08-04 20:55:37 +00:00
Vikram S. Adve
9dd19151b8
Bug fix in TargetData::getIndexedOffset(): handle struct offset
...
after array offset correctly. The type was not being updated for
array offsets!
llvm-svn: 3246
2002-08-04 20:52:39 +00:00
Vikram S. Adve
03a5ca5dcc
Bug fix in SetOperandsForMemInstr: handle leading zeros correctly
...
when folding or not folding GEPs.
llvm-svn: 3245
2002-08-04 20:51:05 +00:00
Chris Lattner
6f818d501c
Fix compilation problem. IsIndexZero doesn't exist, use IsZero instead.
...
llvm-svn: 3243
2002-08-03 20:57:38 +00:00
Vikram S. Adve
6316385f3e
Simplified handling of array indexes in SetMemOperands_Internal.
...
llvm-svn: 3236
2002-08-03 13:48:21 +00:00
Vikram S. Adve
02b632401c
Bug fix: incorrect SAVE instruction when using register for stack size.
...
llvm-svn: 3198
2002-08-01 14:26:11 +00:00
Vikram S. Adve
836a811861
Just improved comments and assertions.
...
llvm-svn: 3191
2002-07-31 21:13:31 +00:00
Vikram S. Adve
d5185db5e8
Add a missing case: converting float/double to unsigned integer types.
...
llvm-svn: 3188
2002-07-31 21:01:34 +00:00
Chris Lattner
82f80aaa16
* Move InstructionSelection pass to lib/CodeGen/InstrSelection so it is
...
shared by backends.
llvm-svn: 3146
2002-07-30 03:56:16 +00:00
Mehwish Nagda
07aeba2eb9
changed implementation of LLVM BYTECODE Length
...
llvm-svn: 3089
2002-07-25 17:22:48 +00:00
Chris Lattner
05fe67c0d2
*** empty log message ***
...
llvm-svn: 3075
2002-07-25 06:17:51 +00:00
Chris Lattner
49ed01e60d
GCC 3.1 changes, finally the burm file builds the FIRST time a clean directory is built.
...
llvm-svn: 3073
2002-07-25 06:08:32 +00:00
Chris Lattner
9860e64083
*** empty log message ***
...
llvm-svn: 3056
2002-07-24 21:21:32 +00:00
Chris Lattner
24bcbdd155
*** empty log message ***
...
llvm-svn: 3002
2002-07-23 17:52:38 +00:00
Mehwish Nagda
e1186e3b90
moved from CodeGen to this dir
...
llvm-svn: 2992
2002-07-22 22:09:35 +00:00
Anand Shukla
e8d6f887b1
Adding code for outputing length in .s
...
llvm-svn: 2979
2002-07-21 09:35:01 +00:00
Chris Lattner
a01e139a76
* Make global variables with external linkage get emitted correctly
...
* Do NOT add a prefix to global variables that are external
* Add newline after emitting a constpointerref
llvm-svn: 2925
2002-07-16 18:35:16 +00:00
Mehwish Nagda
131db97ea3
Added the Mapping Pass to out put Mapping Info to .s file
...
llvm-svn: 2913
2002-07-15 23:58:21 +00:00
Anand Shukla
3d7a9691cc
added std:: to vector
...
llvm-svn: 2874
2002-07-11 00:16:28 +00:00
Vikram S. Adve
b2fc122acd
Changed interface to insertCallerSavingCode().
...
llvm-svn: 2859
2002-07-10 21:42:42 +00:00
Vikram S. Adve
56ae7788d7
Stop using pseudo-instructions (SETX, SETUW, SETSW)
...
and generate actual machine instruction sequences directly.
llvm-svn: 2858
2002-07-10 21:42:13 +00:00
Vikram S. Adve
268137274b
Add support to print %hh, %hm, %lm, or %lo in an operand field.
...
llvm-svn: 2857
2002-07-10 21:41:21 +00:00
Vikram S. Adve
3df324e6e8
Major overhaul to stop using pseudo-instructions (SETX, SETUW, SETSW)
...
and generate actual machine instruction sequences directly.
Also a couple of bug fixes in code for putting constants into registers:
-- Do *not* sign-extend unsigned constant that is shorter than int reg size
-- Fix handling of address constant (a GlobalValue) vs. constant that
must be loaded.
llvm-svn: 2856
2002-07-10 21:39:50 +00:00
Vikram S. Adve
9d7346bbf9
More important fixes:
...
-- FP argument to a function with no prototype going on stack
was not being copied to the stack in colorCallArgs().
-- Put caller-saving code *before* argument copying code so that
we don't trash a register before saving it!
-- Two other minor fixes.
llvm-svn: 2855
2002-07-10 21:36:00 +00:00
Anand Shukla
e2179159e5
Added std:: to mem_fun for 64-bit gcc
...
llvm-svn: 2845
2002-07-09 19:16:59 +00:00
Vikram S. Adve
f5760a424d
Added support for printing constant global references to
...
assembly.
llvm-svn: 2842
2002-07-09 12:30:29 +00:00
Vikram S. Adve
901578090d
Numerous changes in interface to class SparcRegInfo corresponding to
...
changes in class MachineRegInfo (see MachineRegInfo.h for details).
Added {LD,ST}[X]FSR instructions.
llvm-svn: 2839
2002-07-08 23:34:10 +00:00
Vikram S. Adve
35bc4cb020
class MachineCodeForBasicBlock is now an annotation on BasicBlock.
...
llvm-svn: 2838
2002-07-08 23:31:24 +00:00
Vikram S. Adve
8b06b38495
BA no longer has the unused CC operand.
...
llvm-svn: 2837
2002-07-08 23:30:59 +00:00
Vikram S. Adve
a771830ea1
Have to save a boolean (setCC) value whenever use is outside the current
...
basic block.
Mark setCCInstr used as dest. of conditional-move as both a def and a use.
BA instruction no longer has the unused CC argument.
llvm-svn: 2836
2002-07-08 23:30:14 +00:00
Vikram S. Adve
30cc745aec
BA has only one argument.
...
Added LDFSR, LDXFSR, STFSR and STXFSR.
Fixed operands info for RDCCR, WRCCR.
llvm-svn: 2835
2002-07-08 23:25:17 +00:00
Vikram S. Adve
b94ede185c
Significant changes to correctly spill CC registers and to correctly
...
handle conditional move instructions:
-- cpMem<->Reg functions now support CC registers (int and FP) correctly.
Also, cpMem<->Reg functions now return a vector of machine instructions.
-- Scratch registers must be explicitly provided to cpMem<->Reg when
needed, since CC regs need one to be copied to/from memory.
-- CC regs are saved to a scratch register instead of stack.
-- All regs used by a instruction are now recorded in MachineInstr::regsUsed,
since regs used to save values *across* an instruction are not obvious
either from the operands or from the LiveVar sets.
-- An (explicit or implicit) operand may now be both a def and a use.
This is needed for conditional move operations.
So an operand may need spill code both before and after the instruction.
Other changes:
-- Added several get{Class,Type} functions.
-- Added unified-to-local register number conversion.
-- class MachineCodeForBasicBlock is now an annotation on BasicBlock.
-- Suggest/Color methods may modify the MachineInstr (and always did),
so don't make that argument const!
-- Caller-saving code doesn't need its special purpose code for
handling CC registers since cpMem<->Reg handle those correctly now.
llvm-svn: 2834
2002-07-08 23:23:12 +00:00
Chris Lattner
362a0846af
Remove diff-cluttering tags
...
llvm-svn: 2808
2002-06-30 16:12:03 +00:00
Anand Shukla
ee7ed50bb4
changes to make it compatible with 64bit gcc
...
llvm-svn: 2791
2002-06-25 20:55:50 +00:00
Chris Lattner
d7cbd7d5d2
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2778
2002-06-25 16:13:21 +00:00
Chris Lattner
d3327b19e0
Fix constness
...
llvm-svn: 2762
2002-06-05 18:11:37 +00:00
Chris Lattner
1a37bd9d7e
Fix Constness problems
...
llvm-svn: 2761
2002-06-05 18:08:26 +00:00
Chris Lattner
3cd6295cb7
Disable debugging output
...
llvm-svn: 2756
2002-06-04 03:09:57 +00:00
Chris Lattner
e61bc07952
Convert RegClass::IsColorUsedArr from a dynamically allocated array to
...
a vector. This makes asserting on array bounds easier.
llvm-svn: 2731
2002-05-23 15:50:03 +00:00
Mehwish Nagda
54a7cdf7e9
Fixed the makefile to not die when compiling a new, empty, source directory
...
llvm-svn: 2688
2002-05-21 15:58:24 +00:00
Chris Lattner
db193d32ca
Rename IsPowerOf2 to isPowerOf2
...
llvm-svn: 2663
2002-05-19 21:20:19 +00:00
Vikram S. Adve
a5968c518f
Add integer register size field.
...
Make all sizes and offsets uint64_t instead of uint.
Fixed GetIndexedOffset to handle mixed array and struct indices.
llvm-svn: 2641
2002-05-19 15:28:02 +00:00
Vikram S. Adve
fa6c24db76
Numerous bug fixes:
...
-- correct sign extensions for integer casts and for shift-by-constant
instructions generated for integer multiply
-- passing FP arguments to functions with more than 6 arguments
-- passing FP arguments to varargs functions
-- passing FP arguments to functions with no prototypes
-- incorrect stack frame size when padding a section
-- folding getelementptr operations with mixed array and struct indexes
-- use uint64_t instead of uint for constant offsets in mem operands
-- incorrect coloring for CC registers (both int and FP): interferences
were being completely ignored for int CC and were considered but no
spills were marked for fp CC!
Also some code improvements:
-- better interface to generating machine instr for common cases
(many places still need to be updated to use this interface)
-- annotations on MachineInstr to communicate information from
one codegen phase to another (now used to pass information about
CALL/JMPLCALL operands from selection to register allocation)
-- all sizes and offests in class TargetData are uint64_t instead of uint
llvm-svn: 2640
2002-05-19 15:25:51 +00:00
Chris Lattner
c038503630
Extend TargetData::getIndexedOffset to support arrays and pointers!
...
llvm-svn: 2535
2002-05-07 20:00:33 +00:00
Chris Lattner
fd8d5b852c
Replace all usages of Type::isPointerType with isa<PointerType>
...
llvm-svn: 2486
2002-05-06 16:15:30 +00:00
Chris Lattner
96e0c48175
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
589debc4ba
Add new optional getPassName() virtual function that a Pass can override
...
to make debugging output a lot nicer.
llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner
ec70d92221
Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
...
llvm-svn: 2386
2002-04-28 21:27:06 +00:00
Chris Lattner
7102c8f2c9
Add #include that was removed from TargetMachine.h
...
llvm-svn: 2381
2002-04-28 20:40:59 +00:00
Chris Lattner
321a8cf4ba
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
7b48239cc1
Simplify code
...
Remove unneccesary getID variant for module's
llvm-svn: 2353
2002-04-28 04:50:54 +00:00
Chris Lattner
2f0ee1833d
s/Method/Function
...
llvm-svn: 2336
2002-04-27 07:27:19 +00:00
Chris Lattner
536cf1b13f
* Rename MethodPass class to FunctionPass
...
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
- Method is now const
- It now takes one AnalysisUsage object to fill in instead of 3 vectors
to fill in
- Pass's now specify which other passes they _preserve_ not which ones
they modify (be conservative!)
- A pass can specify that it preserves all analyses (because it never
modifies the underlying program)
* s/Method/Function/g in other random places as well
llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner
0196db7833
Use the cast<> operator in favor of C style casts
...
llvm-svn: 2331
2002-04-27 03:14:39 +00:00
Chris Lattner
078d292f4c
Change Constant::getNullConstant to Constant::getNullValue
...
llvm-svn: 2323
2002-04-27 02:25:14 +00:00
Chris Lattner
dfdfae42df
Simplify code a bit
...
llvm-svn: 2322
2002-04-27 02:24:17 +00:00
Vikram S. Adve
1004ba9d5f
Don't pad spills and temp. stack areas for alignment.
...
Freeze auto vars and spill areas when their sizes are used
for computing other offsets.
llvm-svn: 2317
2002-04-25 04:43:45 +00:00
Vikram S. Adve
a9037d5d60
Major changes to how int and FP arguments are handled. Varargs
...
function calls were simply wrong; other functions were just not
using all available registers.
llvm-svn: 2316
2002-04-25 04:42:21 +00:00
Vikram S. Adve
10ba17d6fe
Added functions to compute which register, if any, to use
...
for a particular argument in a list of arguments.
llvm-svn: 2315
2002-04-25 04:40:24 +00:00
Vikram S. Adve
9995ae21c2
Insert copy operations for FP arguments to a varargs function,
...
to copy the FP arg. to an integer. Necessary so that the
register allocator has two different live ranges for the FP value
and the int. argument.
llvm-svn: 2314
2002-04-25 04:37:51 +00:00
Vikram S. Adve
1837d86a85
Implementation of class MachineFrameInfo.
...
llvm-svn: 2313
2002-04-25 04:35:27 +00:00
Chris Lattner
2789c27277
* getAsString requires that the input array is string compatible, so
...
assert it.
* Use WriteAsOperand instead of getStringValue for constants
llvm-svn: 2296
2002-04-18 18:15:38 +00:00
Chris Lattner
9799e40136
Only print debug message if DEBUG_RA is on
...
llvm-svn: 2254
2002-04-15 22:41:48 +00:00
Chris Lattner
c9d79fd15f
Handle the FP format problem, where outputed FP constants were not precise
...
enough. This fixes compilation of the health benchmark.
llvm-svn: 2228
2002-04-11 21:44:02 +00:00
Chris Lattner
7186b402ec
Eliminate unneccesary extraneous iterators
...
llvm-svn: 2215
2002-04-09 19:46:27 +00:00
Chris Lattner
b2038512b2
Add explicit #includes of Function.h to make up for the removed #include
...
in iOther.h
llvm-svn: 2209
2002-04-09 19:08:28 +00:00
Chris Lattner
fb97e6628c
iUse new form of pop_back to make code more concise
...
llvm-svn: 2202
2002-04-09 18:02:02 +00:00
Chris Lattner
3557e076c5
Delete NOP instructions as they are eliminated.
...
llvm-svn: 2199
2002-04-09 15:05:04 +00:00
Chris Lattner
dbc90d1c0c
* Add a useful file comment
...
* Move InsertPrologEpilogCode class to PrologEpilogCodeInserter.cpp
-> Among other things, this eliminates the need for the minstrVec static
global array.
llvm-svn: 2195
2002-04-09 05:21:26 +00:00
Chris Lattner
259b748661
Move the InsertPrologEpilogCode class out of the Sparc.cpp file into the
...
new PrologEpilogCodeInserter.cpp file, and include the bodies of the
GetInstructionsFor(Prolog|Epilog) functions from SparcInstrSelection.cpp
into the class. This eliminates the need for a static global vector of
instructions and a class of errors that is really unneccesary.
llvm-svn: 2194
2002-04-09 05:20:15 +00:00
Chris Lattner
c738b9e631
Move the InsertPrologEpilogCode class out of the Sparc.cpp file, and include
...
the bodies of the GetInstructionsFor(Prolog|Epilog) functions from
SparcInstrSelection.cpp into the class. This eliminates the need for a static
global vector of instructions and a class of errors that is really unneccesary.
llvm-svn: 2193
2002-04-09 05:18:31 +00:00
Chris Lattner
2a77170587
Include prototype for interface to PrologEpilogCodeInserter.cpp file
...
llvm-svn: 2192
2002-04-09 05:16:36 +00:00
Chris Lattner
5db83c9e2e
Use new higher level isFloatingPoint() function
...
llvm-svn: 2191
2002-04-09 05:16:08 +00:00
Chris Lattner
ee0fa0eb15
Convert AddedInstrMapType to contain AddedInstrns by value instead of by
...
pointer so that they do not all get leaked!
llvm-svn: 2188
2002-04-09 05:13:04 +00:00
Chris Lattner
c8166cec07
s/Method/Function
...
llvm-svn: 2180
2002-04-08 22:03:57 +00:00
Chris Lattner
137fa92dce
* Move include/llvm/Analysis/SlotCalculator.h to include/llvm/SlotCalculator.h
...
because the slot calculator is already part of the VMCore library.
* Rename incorporateMethod and purgeMethod to *Function
llvm-svn: 2154
2002-04-07 22:49:37 +00:00
Chris Lattner
bc15ae64dd
Change references to the Method class to be references to the Function
...
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner
8afff0c29a
s/MethodType/FunctionType
...
llvm-svn: 2115
2002-04-04 22:19:18 +00:00
Vikram S. Adve
0035fcbea1
Case numbers were not updated when Sparc.burg.in was changed
...
to add separate label for bitwise NOT operator.
llvm-svn: 2091
2002-04-01 20:28:48 +00:00
Vikram S. Adve
e665a992a9
1. Fix a leftover bug in generating memory instructions.
...
2. Fix type used for TmpInstruction holding the return address.
llvm-svn: 2075
2002-03-31 19:07:35 +00:00
Vikram S. Adve
257e4d18da
Added function getCallInstIndirectAddrVal() to set call interference
...
for that value.
llvm-svn: 2074
2002-03-31 19:04:50 +00:00
Vikram S. Adve
8efa40ac63
Minor cleanup in printing constants. I think this included a bug
...
fix related to putting a read-write variable in a read-only section,
but I'm not sure now.
llvm-svn: 2073
2002-03-31 19:03:58 +00:00
Vikram S. Adve
f057ff78fb
Fix CreateUIntSetInstruction() to handle sign extensions correctly.
...
llvm-svn: 2059
2002-03-31 00:13:12 +00:00
Chris Lattner
8c98acc07f
s/Method/Function
...
llvm-svn: 2035
2002-03-29 03:51:11 +00:00
Chris Lattner
8972179a78
Convert to use new style casts instead of direct checking
...
llvm-svn: 1990
2002-03-26 17:58:12 +00:00
Vikram S. Adve
8ada4c031e
Bug re-fix: put back MachineCodeForInstruction::get(*I).dropAllReferences().
...
Also re-enable instr. scheduling pass.
llvm-svn: 1966
2002-03-24 03:35:16 +00:00
Vikram S. Adve
7b84ec22d8
Change latencies for Load, Store and Branch instructions.
...
llvm-svn: 1965
2002-03-24 03:33:53 +00:00
Vikram S. Adve
57d735db7a
Major enhancements to how array and structure indices are handled.
...
Improve checking for constants in Multiply.
Simpler method to keep track of when a node is folded into its parent.
Several other bug fixes.
llvm-svn: 1964
2002-03-24 03:33:02 +00:00
Vikram S. Adve
7f139ccf85
Add support for code generation for array references.
...
Also, use distinct names for the three types of SetMachineOperand to
avoid painful overloading problems and errors.
Bug fix in converting-int-to-float. Other minor stuff.
llvm-svn: 1896
2002-03-18 03:15:35 +00:00
Vikram S. Adve
217f7b1fe1
Bug fixes for not using unified reg. numbers, and for using the
...
wrong register class for saving CC registers.
Also, use distinct names for the three types of SetMachineOperand.
llvm-svn: 1895
2002-03-18 03:12:16 +00:00
Vikram S. Adve
6a74ad7030
Use distinct names for the three types of SetMachineOperand to
...
avoid painful overloading problems and errors.
llvm-svn: 1893
2002-03-18 03:09:15 +00:00
Vikram S. Adve
f7d5ad2124
Minor fixes.
...
llvm-svn: 1892
2002-03-18 03:08:07 +00:00
Vikram S. Adve
23d4011ea1
Handling of global names was severely broken when converting to 2 passes.
...
Different labels were generated for the same name in different passes.
Use an annotation to hold a fixed table of names.
llvm-svn: 1891
2002-03-18 03:07:26 +00:00
Vikram S. Adve
d311d0d546
Several sundry bug fixes.
...
llvm-svn: 1890
2002-03-18 03:02:42 +00:00
Vikram S. Adve
17ec828187
Fix include error.
...
llvm-svn: 1819
2002-03-03 20:46:32 +00:00
Chris Lattner
242f5139fb
Clean up std namespace issues
...
Silence warning
llvm-svn: 1790
2002-02-24 23:02:40 +00:00
Chris Lattner
8e9be000a7
* Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
...
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
InstrTypes.h anymore
llvm-svn: 1750
2002-02-12 22:39:50 +00:00
Chris Lattner
b0a2c5546b
Method.h no longer includes BasicBlock.h
...
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h
llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner
44572782a9
Write llvm bytecode to output .s file as last step of LLC.
...
llvm-svn: 1728
2002-02-11 22:35:46 +00:00
Chris Lattner
2f9f8dbc92
Fix build error
...
llvm-svn: 1722
2002-02-11 17:11:43 +00:00
Chris Lattner
e282c0b592
Convert operand iterator over to work like an STL iterator
...
llvm-svn: 1720
2002-02-05 06:02:59 +00:00
Chris Lattner
5337fbec40
Minor change: Methods that return ValueSet's that are guaranteed to be valid
...
return references instead of pointers.
llvm-svn: 1719
2002-02-05 04:20:12 +00:00
Chris Lattner
862fab4da7
* Code Cleanups
...
* Removal dependencies on Type.h & remove uses of getTypeID()
llvm-svn: 1718
2002-02-05 03:52:29 +00:00
Chris Lattner
f3d0ae9fdb
* Eliminate the LiveVarSet class, making applyTranferFuncForMInst a static
...
function in the one .cpp file that uses it. Use ValueSet's instead.
* Prepare to delete LiveVarSet.h & LiveVarSet.cpp
* Eliminate the ValueSet class, making all old member functions into global
templates that will eventually be moved to Support.
* Eliminate some irrelevant const's
llvm-svn: 1712
2002-02-05 02:52:05 +00:00
Chris Lattner
a8170f0944
* Code Cleanups
...
* Introduce RAV to allow stream I/O instead of using printValue
llvm-svn: 1710
2002-02-05 01:43:49 +00:00
Chris Lattner
a576f85e4b
The interface to instruction scheduling is now just a call to get the pass.
...
llvm-svn: 1702
2002-02-04 20:03:43 +00:00
Chris Lattner
e9cece61b7
* ValueSet interface converted from add/remove to insert/erase
...
llvm-svn: 1690
2002-02-04 16:37:09 +00:00
Chris Lattner
8bfb48c8d3
Convert RegisterAllocator interface to opaque pass type, so that users do not
...
need to know _anything_ about RegAlloc to use it. Well in the end maybe.
llvm-svn: 1681
2002-02-04 15:54:09 +00:00
Chris Lattner
cc9876c869
EmitAssembly doesn't need an UltraSparc, it can do with any TargetMachine
...
llvm-svn: 1680
2002-02-04 15:53:23 +00:00
Chris Lattner
4c0bf66bdd
* Minor cleanups
...
* Reduce number of #includes
* Remove blatently misleading qualifiers (how do you have an inlined pure virtual function?)
* Remove unnecesary & ignored qualifiers (const int argument vs int argument)
* SparcInternals.h now no longer #includes RegClass.h or SparcRegClassInfo.h
* Pull inlined functions out of .h file if they are virtual and interfere with dependencies
llvm-svn: 1677
2002-02-04 05:59:25 +00:00
Chris Lattner
cfc28e1cce
Add code that used to be inline in MachineSchedInfo.h
...
llvm-svn: 1676
2002-02-04 05:56:30 +00:00
Chris Lattner
8dcb5c3736
SparcRegInfo does NOT need anything about instruction scheduling.
...
llvm-svn: 1670
2002-02-04 02:44:38 +00:00
Chris Lattner
b3e9cea0cd
Pull all of the scheduling related stuff out of Sparc.cpp into it's own file
...
llvm-svn: 1668
2002-02-04 00:39:14 +00:00
Chris Lattner
9a8ff2595a
Split RegisterAllocation stuff OUT of Sparc.cpp into a well defined pass
...
that has a very minimal interface (like it should have).
llvm-svn: 1667
2002-02-04 00:33:08 +00:00
Chris Lattner
78017556fc
Move a ton of tables out of SparcInternals.h and move them to Sparc.cpp.
...
Eventually they will probably get moved again, but at least now they aren't
having to be compiled by 7 different .cpp files...
llvm-svn: 1666
2002-02-04 00:04:35 +00:00
Chris Lattner
b940cea55f
Convert sparc backend over to use pass based compilation structure.
...
Try to decouple stuff as much as possible.
llvm-svn: 1664
2002-02-03 23:42:19 +00:00
Chris Lattner
b4df1958a9
Convert sparc backend over to use pass based compilation structure.
...
Convert some stages into passes in preparation for more splitting up.
Try to decouple stuff as much as possible.
llvm-svn: 1663
2002-02-03 23:41:51 +00:00
Chris Lattner
a4ae518ba6
Convert assembly emission over to a two pass approach.
...
llvm-svn: 1662
2002-02-03 23:41:08 +00:00
Chris Lattner
1099347f1e
Add a file level comment
...
Remove #includes
llvm-svn: 1657
2002-02-03 07:52:04 +00:00
Chris Lattner
f26ffbbabc
Implement new method by method assembly output & memory releasing
...
llvm-svn: 1656
2002-02-03 07:51:17 +00:00
Chris Lattner
de742eb319
* Switch to new TmpInstruction model
...
* Switch to new MachineCodeForInstruction model
llvm-svn: 1655
2002-02-03 07:50:56 +00:00
Chris Lattner
fe52dade08
* Switch to new TmpInstruction model
...
llvm-svn: 1654
2002-02-03 07:49:49 +00:00
Chris Lattner
40d9e197ee
* Swithc to new MachineCodeForInstruction model
...
* Implement memory freeing for instruction temporaries
llvm-svn: 1653
2002-02-03 07:49:15 +00:00
Chris Lattner
8c0451be47
* prune #includes
...
* Implement permethod output of machine code to assembly
llvm-svn: 1652
2002-02-03 07:48:06 +00:00
Chris Lattner
fa7bc523a1
Add #include that is no longer implicitly included
...
llvm-svn: 1651
2002-02-03 07:47:05 +00:00
Chris Lattner
0431e5fad5
Remove dead variable
...
llvm-svn: 1515
2002-01-21 22:50:38 +00:00
Chris Lattner
d40b986b74
Remove dead variable.
...
llvm-svn: 1514
2002-01-21 22:44:57 +00:00
Chris Lattner
3dc9a2a61f
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Ruchira Sasanka
b45080c5ba
Added more comments
...
llvm-svn: 1498
2002-01-07 21:03:42 +00:00
Ruchira Sasanka
66b5593b96
removed SizeOfStackOperand constant from the SparcRegInfo class - no longer used
...
by code.
llvm-svn: 1497
2002-01-07 20:33:44 +00:00
Ruchira Sasanka
1d566afc16
Added more comments
...
llvm-svn: 1496
2002-01-07 20:28:49 +00:00
Ruchira Sasanka
04da4f197f
Added comments and correct logic for finding register sizes.
...
llvm-svn: 1494
2002-01-07 19:20:28 +00:00
Vikram S. Adve
0607fbbf01
Eliminate all uses of memInst->getIndicesBROKEN().
...
llvm-svn: 1485
2001-12-15 00:36:32 +00:00
Vikram S. Adve
1d755bccee
getIndexedOffset() shd take vector of Values, not of Constants!
...
llvm-svn: 1484
2001-12-15 00:35:48 +00:00
Vikram S. Adve
605a47ebe4
Remove int hack to allow unsigned numbers greater than 2^63 - 1...
...
llvm-svn: 1483
2001-12-15 00:33:36 +00:00
Chris Lattner
831b4ac558
Allow pointer indexing
...
llvm-svn: 1462
2001-12-14 16:31:26 +00:00
Chris Lattner
43c92f9dbd
Remove unsized array support
...
llvm-svn: 1461
2001-12-14 16:30:51 +00:00
Chris Lattner
e5172702f4
Not just arrays are unsized
...
llvm-svn: 1450
2001-12-13 00:46:11 +00:00
Chris Lattner
c4a5815033
Renamed inst_const_iterator -> const_inst_iterator
...
Renamed op_const_iterator -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()
llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
f6b7da2bb5
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
463cc31132
Create a new #include "Support/..." directory structure to move things
...
from "llvm/Support/..." that are not llvm dependant.
Move files and fix #includes
llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
9236d30e29
The old getIndices has been deprecated, because it no longer works. It now
...
is named getIndicesBROKEN() and shall be removed when the codebase is updated
to not call it
llvm-svn: 1338
2001-11-26 16:56:19 +00:00
Ruchira Sasanka
50f9f0242a
commented out popAllTempValues since it leads to a bug - see code
...
llvm-svn: 1327
2001-11-15 22:03:04 +00:00
Ruchira Sasanka
22092f4ced
changed since names of some methods in PhyRegAlloc changed
...
llvm-svn: 1324
2001-11-15 20:25:07 +00:00
Vikram S. Adve
8fbf76e494
Fix use of AllocateLocalVar for alloca instruction!
...
llvm-svn: 1319
2001-11-15 15:22:39 +00:00
Vikram S. Adve
b9a32dab69
Fix int->float conversion.
...
llvm-svn: 1314
2001-11-15 14:59:56 +00:00
Vikram S. Adve
48b926e060
Fix cute little bug that was causing the last
...
structure offset to be ignored in computing an offset!
llvm-svn: 1310
2001-11-14 21:24:44 +00:00
Vikram S. Adve
3baa8cefc0
Add function returning which operand holds immediate constant
...
for a given opcode.
llvm-svn: 1307
2001-11-14 18:48:36 +00:00
Vikram S. Adve
1c7f39af14
Change latency of SETX to improve schedule -- just a hack.
...
llvm-svn: 1304
2001-11-14 15:54:44 +00:00
Ruchira Sasanka
0f38515129
Added M_PSEUDO_FLAG for SETX .. instr
...
llvm-svn: 1301
2001-11-14 15:35:13 +00:00
Chris Lattner
4046596beb
Remove much cruft from the MemAccessInst instruction
...
llvm-svn: 1298
2001-11-14 11:27:58 +00:00
Ruchira Sasanka
7fe45d1136
Changed checking for invalid register number - earlier it was uisng a contant
...
llvm-svn: 1293
2001-11-13 23:08:19 +00:00
Vikram S. Adve
af9c0a766a
When allocating space on stack for writing a register,
...
use the size of the register, not the size of the Value type,
to get the right alignment.
llvm-svn: 1284
2001-11-12 23:26:35 +00:00
Ruchira Sasanka
3484bbb97c
Fixed a bug with pervious ColorCallArg
...
llvm-svn: 1278
2001-11-12 20:54:19 +00:00
Ruchira Sasanka
67478b7484
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
a3f0115c71
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
426d6e2b10
Added phi elimination code
...
llvm-svn: 1265
2001-11-12 14:45:33 +00:00
Vikram S. Adve
bb424a4fe1
Fix dumb bug in alignment adjustment code!
...
llvm-svn: 1260
2001-11-12 05:16:39 +00:00
Vikram S. Adve
2b5e92123c
Fix bogus code that was eliminating needed args.
...
llvm-svn: 1259
2001-11-11 23:11:36 +00:00
Ruchira Sasanka
661bf856f5
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
9d20df621c
cahnged StackPointer accesses to FramePointer
...
llvm-svn: 1257
2001-11-11 21:49:37 +00:00
Vikram S. Adve
b98d36462b
Down-growing offsets from FP should start at 0, not -1.
...
llvm-svn: 1255
2001-11-11 21:22:11 +00:00
Ruchira Sasanka
bf341d2d5d
Corrected reodering code for instructions inserted before calls
...
llvm-svn: 1252
2001-11-10 21:20:43 +00:00
Vikram S. Adve
ca73b36000
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
cbc2cec180
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
e98f033070
Disabled some debuggin messages
...
llvm-svn: 1237
2001-11-10 00:26:55 +00:00
Ruchira Sasanka
a4a64f3755
Added code for correct reordering of call arguments
...
llvm-svn: 1234
2001-11-09 23:49:14 +00:00
Vikram S. Adve
68306457ae
Added class MachineCacheInfo.
...
llvm-svn: 1229
2001-11-09 02:20:18 +00:00
Vikram S. Adve
6c5f14ebbc
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
91f30ac019
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
61173418a7
Added function UltraSparcInstrInfo::CreateCodeToCopyFloatToInt.
...
llvm-svn: 1226
2001-11-09 02:16:40 +00:00
Vikram S. Adve
8766f0ad37
Added class UltraSparcCacheInfo.
...
llvm-svn: 1225
2001-11-09 02:16:04 +00:00
Vikram S. Adve
1b7faa892c
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
9073d4427a
Bug fix: need to use .reserve for uninitialized data.
...
llvm-svn: 1205
2001-11-08 14:29:57 +00:00
Vikram S. Adve
2bb61e90a3
Add handle to TargetMachine object in all Machine...Info classes.
...
llvm-svn: 1197
2001-11-08 05:15:08 +00:00
Vikram S. Adve
347a3cab9e
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
ef146ce336
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
a7383895cd
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
61f4694d6e
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
77dca53970
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
1cc04e4908
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
15f524c88e
Killing warnings
...
llvm-svn: 1175
2001-11-07 14:01:59 +00:00
Chris Lattner
bf8d5bd2f7
Squelch warnings about not returning a value
...
llvm-svn: 1173
2001-11-07 13:49:12 +00:00
Vikram S. Adve
d3f33a7d2f
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
843f32ad9b
Generate code for Rem instruction.
...
llvm-svn: 1124
2001-11-04 21:59:14 +00:00
Vikram S. Adve
cb87df31db
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
ea63d43a07
Minor method rename
...
llvm-svn: 1119
2001-11-04 08:08:34 +00:00
Ruchira Sasanka
20c3c4be28
Added code to support correct saving of %ccr across calls
...
llvm-svn: 1111
2001-11-03 19:59:59 +00:00
Ruchira Sasanka
7673c5f6e0
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
1153a795eb
Check in to use moved stringizing code
...
llvm-svn: 1024
2001-10-29 13:39:38 +00:00
Vikram S. Adve
c3bc8c623a
Minor fix I omitted to check in.
...
llvm-svn: 1012
2001-10-28 22:19:06 +00:00
Vikram S. Adve
98a0f1fa14
Generate SETX for 64-bit integers!
...
llvm-svn: 1007
2001-10-28 21:41:46 +00:00
Vikram S. Adve
64c463355b
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
165284e269
Need to subtract, not add, stack size in SAVE instruction!
...
llvm-svn: 1005
2001-10-28 21:39:47 +00:00
Vikram S. Adve
b354629285
Major overhaul to print globals and constants.
...
llvm-svn: 1004
2001-10-28 21:38:52 +00:00
Ruchira Sasanka
3c4d2dea7c
Added support for spilling
...
llvm-svn: 992
2001-10-28 18:15:12 +00:00
Ruchira Sasanka
f8a3d5f0ca
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
603b617221
Fixed logic for checking whether a LR received the correct color.
...
llvm-svn: 976
2001-10-24 15:56:58 +00:00
Ruchira Sasanka
a215e9d233
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
f5810ae651
UNUSED.
...
llvm-svn: 944
2001-10-22 13:46:38 +00:00
Vikram S. Adve
f80c58a7d6
Split JMPL into JMPLCALL and JMPLRET.
...
llvm-svn: 943
2001-10-22 13:44:53 +00:00
Vikram S. Adve
1f7055b694
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
b581a10ba4
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
8d3d8c5788
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
18bfb1399a
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
bebf9c9763
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
3ae28be821
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
6df15c541f
Added support for both call/jmpl instructions
...
llvm-svn: 930
2001-10-21 16:43:41 +00:00
Vikram S. Adve
a52d8bfb65
Fixed printing of offset operand for RETURN instruction.
...
llvm-svn: 928
2001-10-20 21:33:50 +00:00
Vikram S. Adve
1b4a9b22ad
Use CALL for direct function calls; JMPL for indirect ones.
...
llvm-svn: 927
2001-10-20 20:57:06 +00:00
Vikram S. Adve
e98e4a0526
Minor bug fix in printing operands of JMPL.
...
llvm-svn: 926
2001-10-20 20:56:40 +00:00
Ruchira Sasanka
dcac0518dd
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
2c39252eaf
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
7c37ba859b
Added support for condition code loading/stroing in methods cpReg2Reg etc.
...
llvm-svn: 911
2001-10-18 22:38:52 +00:00
Chris Lattner
bfbbc83298
Change Sources specifier to ExtraSources
...
llvm-svn: 874
2001-10-18 01:48:09 +00:00
Vikram S. Adve
0ba9c3d61b
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
abb85bb24c
Sparc-specific code shared between local files.
...
llvm-svn: 864
2001-10-18 00:03:20 +00:00
Vikram S. Adve
00436e5f21
Moved implementation of class UltraSparcInstrInfo to SparcInstrInfo.cpp.
...
llvm-svn: 863
2001-10-18 00:02:32 +00:00
Vikram S. Adve
b66fc8ac17
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
0b1e8f2577
Moved implementation of class UltraSparcInstrInfo here.
...
llvm-svn: 861
2001-10-18 00:01:48 +00:00
Vikram S. Adve
44769fbb57
Only list automatically generated .cpp files.
...
llvm-svn: 854
2001-10-17 12:34:26 +00:00
Ruchira Sasanka
26ab9c8e61
Added support for caller saving
...
llvm-svn: 847
2001-10-16 01:23:19 +00:00
Chris Lattner
4737d9ac3d
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
06e9785523
Handle abnormal jmpl syntax correctly
...
llvm-svn: 844
2001-10-15 19:21:31 +00:00
Chris Lattner
683166c06e
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
de15e9b64e
updated suggesting/coloring of call & return args & implicit operands
...
llvm-svn: 830
2001-10-15 16:25:28 +00:00
Chris Lattner
eba2b7cf61
Be const correct
...
llvm-svn: 826
2001-10-15 15:54:43 +00:00
Vikram S. Adve
54bfbca17f
Forward operands into implicit uses as well as explicit ones.
...
llvm-svn: 808
2001-10-14 23:28:43 +00:00
Vikram S. Adve
45536008e9
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
f1104f9d8a
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
23de05d818
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
e479974c19
Fix broken #endif
...
llvm-svn: 768
2001-10-13 06:54:54 +00:00
Chris Lattner
9fb95b57db
* 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
cc2f052087
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
2f08c4c828
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
b7ab4088e7
--removed %g regs being allocated - fix later
...
llvm-svn: 714
2001-10-09 23:36:13 +00:00
Chris Lattner
a01eda3091
* 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
08b1dde37e
Commit more code over to new cast style
...
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
ad1b0a1a83
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
4c684cde80
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
43781f1f96
Add support for new style casts
...
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner
716c1ac09e
Fix emission of return instructions
...
llvm-svn: 688
2001-10-01 02:32:34 +00:00
Vikram S. Adve
4bdadf3b6f
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
5201cd7f93
Change latency of setuw and setsw to 2 cycles.
...
llvm-svn: 681
2001-09-30 23:46:57 +00:00
Ruchira Sasanka
cfc7b10745
added suggesting color support
...
llvm-svn: 673
2001-09-30 23:19:57 +00:00
Ruchira Sasanka
897da2bda1
added support for suggesting colors
...
llvm-svn: 671
2001-09-30 23:16:47 +00:00
Chris Lattner
082a95ea67
* Properly escape function names
...
* Ignore %xcc argument on conditional branches
llvm-svn: 663
2001-09-28 15:07:24 +00:00
Chris Lattner
5390f15d0b
Check in bug fix for vadve
...
llvm-svn: 662
2001-09-28 15:06:55 +00:00
Ruchira Sasanka
b43f15e73a
-- fixed a ret val bug
...
llvm-svn: 652
2001-09-19 22:40:51 +00:00
Chris Lattner
2635fee3a8
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
14d60a1971
Add EmitAssembly to mf
...
llvm-svn: 637
2001-09-19 13:48:18 +00:00
Chris Lattner
d30d71f9e1
First cut at assembly output
...
llvm-svn: 636
2001-09-19 13:47:27 +00:00
Chris Lattner
05d1751f8d
Add emitAssemblyMethod to TargetMachine
...
llvm-svn: 635
2001-09-19 13:47:12 +00:00
Ruchira Sasanka
ee3ad646e2
-- ruchira
...
llvm-svn: 632
2001-09-18 22:52:44 +00:00
Chris Lattner
30d7546b7d
Remove extraneous #includes
...
llvm-svn: 627
2001-09-18 17:03:48 +00:00
Vikram S. Adve
ef4f0a345c
Renamed files to match the primary classes they provide.
...
llvm-svn: 620
2001-09-18 13:10:05 +00:00
Vikram S. Adve
a163e94412
Renamed a header file.
...
llvm-svn: 619
2001-09-18 13:04:53 +00:00
Vikram S. Adve
916f962d8b
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
a9b6105720
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
cfb2776d53
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
Vikram S. Adve
bdbc6292fa
Renamed files to match the main classes they provide.
...
Some other minor changes.
llvm-svn: 615
2001-09-18 12:58:33 +00:00
Ruchira Sasanka
9517b55411
modified printing of debug messages
...
llvm-svn: 593
2001-09-15 19:11:31 +00:00
Ruchira Sasanka
422a5cb539
added register allocation code
...
llvm-svn: 585
2001-09-15 00:30:44 +00:00
Ruchira Sasanka
803a63ced2
*** empty log message ***
...
llvm-svn: 579
2001-09-14 20:31:39 +00:00
Chris Lattner
eb286a8ad2
Add support for loading and storing pointers...
...
llvm-svn: 575
2001-09-14 20:00:02 +00:00
Chris Lattner
45ab5fc1ae
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
d6a98c11bc
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
add21b5643
Add a comment
...
llvm-svn: 571
2001-09-14 16:08:12 +00:00
Chris Lattner
16dc47075f
Break scheduling infrastructure out of TargetMachine.cpp into SchedInfo.cpp
...
llvm-svn: 569
2001-09-14 15:43:58 +00:00
Chris Lattner
de29307caa
Split Target/Machine.h into three files:
...
* Machine.h
* InstInfo.h
* SchedInfo.h
TODO: Split out reg info stuff
llvm-svn: 567
2001-09-14 06:08:03 +00:00
Chris Lattner
a0a3946882
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
7e70cdb641
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
33a2812c8a
Move files to new sparc directory
...
llvm-svn: 563
2001-09-14 03:56:45 +00:00
Chris Lattner
2057603b65
Move the sparc target to a new lib/Target directory
...
llvm-svn: 562
2001-09-14 03:55:11 +00:00
Chris Lattner
1f823b04b3
Move files.
...
llvm-svn: 561
2001-09-14 03:47:57 +00:00