1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 06:22:51 +01:00
Commit Graph

241 Commits

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