1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
Commit Graph

1945 Commits

Author SHA1 Message Date
Chris Lattner
0d66480e9e Add breaks
llvm-svn: 15365
2004-07-31 09:53:31 +00:00
Alkis Evlogimenos
1eb8a5dc09 Simplify code a bit.
llvm-svn: 15364
2004-07-31 09:44:32 +00:00
Alkis Evlogimenos
de150fb74b Correctly spell 'unconditional'.
llvm-svn: 15363
2004-07-31 09:41:44 +00:00
Alkis Evlogimenos
bc3d550391 Implement insertGoto and reverseBranchCondition for the X86.
llvm-svn: 15362
2004-07-31 09:38:47 +00:00
Chris Lattner
c21741420c I'm pretty sure that ba is branch always, which is a barrier. Brg should
check this :)

llvm-svn: 15357
2004-07-31 02:24:37 +00:00
Chris Lattner
9a23ab1e63 Mark barrier instructions. Execution does not fall through uncond branches
or return intructions.

llvm-svn: 15356
2004-07-31 02:10:53 +00:00
Chris Lattner
6ff86f8af6 New flag
llvm-svn: 15354
2004-07-31 02:07:07 +00:00
Misha Brukman
8209358fca * Conditional save/restore of LR disabled as it's not quite correct
* sumarray2d fixed: large fixed-size alloca
* make is now compileable
* Re-organized tests to fit them under proper headings

Patch by Nate Begeman.

llvm-svn: 15347
2004-07-30 15:53:09 +00:00
Misha Brukman
f0c6eaca10 Do not mark LR as callee-save: not quite correctly done. Patch: Nate Begeman.
llvm-svn: 15346
2004-07-30 15:51:51 +00:00
Misha Brukman
27ced926da * Temporarily suspend LR save/restore optimization as it is not quite correct
* Implement large fixed-size allocas            Entire patch by Nate Begeman.

llvm-svn: 15345
2004-07-30 15:50:45 +00:00
Chris Lattner
d5247fc917 Fix #includes of i*.h => Instructions.h as per PR403:
http://llvm.cs.uiuc.edu/PR403 .

llvm-svn: 15331
2004-07-29 17:11:37 +00:00
Brian Gaeke
636a3a9525 Get rid of a few dead method declarations.
llvm-svn: 15323
2004-07-29 06:43:10 +00:00
Brian Gaeke
e946e1fedf Get rid of calls to void llvm::printSet(const ValueSet &).
llvm-svn: 15322
2004-07-29 06:43:09 +00:00
Brian Gaeke
88dbff09db Get rid of calls to void llvm::printSet(const ValueSet &).
Use LiveRange's iterator types and operations instead of ValueSet's.

llvm-svn: 15321
2004-07-29 06:43:08 +00:00
Brian Gaeke
7de9b55c7e Don't derive from ValueSet to implement class LiveRange; instead, use a
SetVector<Value *> data member.
Add << operator for LiveRanges (a dumb one, for now.)

llvm-svn: 15320
2004-07-29 06:43:06 +00:00
Brian Gaeke
e7b655d971 Fix a few typoes and grammaroes in comments.
llvm-svn: 15319
2004-07-29 04:25:43 +00:00
Brian Gaeke
8061d1a01f Remove mustSaveAcrossCalls flag, which isn't ever read, and its mutator,
markForSaveAcrossCalls.

llvm-svn: 15317
2004-07-29 04:15:36 +00:00
Chris Lattner
6bea23ff54 Minor corrections
llvm-svn: 15309
2004-07-28 20:18:53 +00:00
Misha Brukman
8e19054114 Add notes on bug involving casting ulong -> double, thanks to Nate Begeman.
llvm-svn: 15307
2004-07-28 19:16:10 +00:00
Misha Brukman
a8bcaec663 Simplify loading (un)signed constants to registers, patch by Nate Begeman.
llvm-svn: 15306
2004-07-28 19:13:49 +00:00
Misha Brukman
b699e3d825 Remove an extra 8 byte distance penalty. Patch by Nate Begeman.
llvm-svn: 15305
2004-07-28 19:13:07 +00:00
Misha Brukman
6e134ad499 Find longs by type, not by their primitive size being 64. Patch by Nate Begeman.
llvm-svn: 15304
2004-07-28 19:12:24 +00:00
Misha Brukman
8c293deaad LI can only take signed values, so values > 32767 can only be loaded with ORI
llvm-svn: 15299
2004-07-28 00:56:04 +00:00
Misha Brukman
ac63bc04f8 Reorganize tests to place them in proper directories.
llvm-svn: 15298
2004-07-28 00:55:12 +00:00
Misha Brukman
8fc18d7d1c UnitTests 2003-05-26-Shorts and 2003-07-09-LoadShorts have been fixed;
2003-05-22-VarSizeArray is broken.

llvm-svn: 15297
2004-07-28 00:01:41 +00:00
Misha Brukman
1b4bc02316 Fix printing of immediate operands by looking at their operand types in
the TargetInstrInfo.  This fixes UnitTests 2003-05-26-Shorts and
2003-07-09-LoadShorts.

llvm-svn: 15296
2004-07-28 00:00:48 +00:00
Misha Brukman
148ad01de1 Renamed files:
* PowerPCReg.td => PowerPCRegisterinfo.td
* PowerPCInstrs.td => PowerPCInstrInfo.td

llvm-svn: 15295
2004-07-27 23:29:16 +00:00
Brian Gaeke
1ec15e0428 ConstantTypeMustBeLoaded has been incorporated into SparcV9PreSelection, its
only user.

llvm-svn: 15294
2004-07-27 21:43:38 +00:00
Brian Gaeke
ea9178e184 This was the only user of TargetInstrInfo::ConstantTypeMustBeLoaded().
llvm-svn: 15293
2004-07-27 21:11:20 +00:00
Brian Gaeke
5a8680850f Get rid of the (apparently non-working) filePrinterEmitter which is added in
debug mode.  Its only effect seems to be the creation of an empty file...

llvm-svn: 15289
2004-07-27 19:37:37 +00:00
Misha Brukman
b779843f6b Branch selection support implemented by Nate Begeman for long branches.
llvm-svn: 15288
2004-07-27 18:43:04 +00:00
Misha Brukman
b07f569386 Correctly print out long branches, assert on finding pseudo instr COND_BRANCH
Patch by Nate Begeman.

llvm-svn: 15286
2004-07-27 18:40:39 +00:00
Misha Brukman
ef0cbd830c Run the branch selection pass right before the asm printer.
Patch by Nate Begeman.

llvm-svn: 15285
2004-07-27 18:39:34 +00:00
Misha Brukman
0f26a3309f Remove empty unused method processFunctionBeforeFrameFinalized()
llvm-svn: 15284
2004-07-27 18:38:40 +00:00
Misha Brukman
8c047d4fad Add COND_BRANCH pseudo instruction, patch by Nate Begeman.
llvm-svn: 15283
2004-07-27 18:35:54 +00:00
Misha Brukman
d7d501d518 Build COND_BRANCHes which may become long or short, decided by a later pass.
Patch by Nate Begeman.

llvm-svn: 15282
2004-07-27 18:35:23 +00:00
Misha Brukman
8e2f8de3c3 Moved definition of invertPPCBranchOpcode() into PowerPCInstrInfo class.
Patch by Nate Begeman.

llvm-svn: 15281
2004-07-27 18:34:11 +00:00
Misha Brukman
0fe1f5d880 Add PowerPCBranchSelector to discover which are `long' branches.
Contributed by Nate Begeman.

llvm-svn: 15280
2004-07-27 18:33:06 +00:00
Brian Gaeke
fefef027f4 TargetInstrInfo::getNOPOpCode() has been replaced by a reference to V9::NOP.
llvm-svn: 15279
2004-07-27 17:43:24 +00:00
Brian Gaeke
c9b9016d72 Convert many of the virtual TargetInstrInfo methods used as helper
functions in SparcV9InstrSelection and SparcV9PreSelection into regular
old global functions.  As it happens, none of them really have anything
to do with TargetInstrInfo.

llvm-svn: 15278
2004-07-27 17:43:23 +00:00
Brian Gaeke
a71776e676 As it happens, none of these TargetInstrInfo methods which are only
used in the SparcV9 backend really have anything to do with
TargetInstrInfo, so we're converting them into regular old global
functions and moving their declarations to SparcV9InstrSelectionSupport.h.
(They're mostly used as helper functions for SparcV9InstrSelection.)

llvm-svn: 15277
2004-07-27 17:43:22 +00:00
Misha Brukman
c22bbdd36d Fixed saving/restoring LR unconditionally, only done as necessary.
llvm-svn: 15275
2004-07-27 17:17:48 +00:00
Misha Brukman
adb86dba29 Save and restore LR just like any other register and ONLY if we actually modify
it (due to calls or globals access).  We now compile `void empty(){}' to `blr'.

llvm-svn: 15274
2004-07-27 17:17:18 +00:00
Misha Brukman
6fec7336fe LR is a 32-bit int reg
llvm-svn: 15273
2004-07-27 17:15:32 +00:00
Misha Brukman
93b0ea58a2 MovePCtoLR (which is `bl' in disguise) modifies LR implicitly
llvm-svn: 15272
2004-07-27 17:15:05 +00:00
Misha Brukman
4be6841bc0 Register LR is callee-saved
llvm-svn: 15271
2004-07-27 17:14:34 +00:00
Misha Brukman
a3ac216fce Add IMPLICIT_DEF of LR for branch-and-link instrs (calls and global accesses)
llvm-svn: 15270
2004-07-27 17:13:58 +00:00
Misha Brukman
6272268028 Do not store the stack pointer if the stack size is 0.
Also, convert C-style comments to C++ and make sure code wraps at 80 cols.

llvm-svn: 15245
2004-07-26 22:00:26 +00:00
Misha Brukman
a979e8a08a ADDI can take several forms, including:
addi r1, r2, 0
  addi r1, <frame index #n>, 0

so we must check for the second parameter being a register for this instruction
to be considered a reg-to-reg copy.

llvm-svn: 15244
2004-07-26 21:50:38 +00:00
Misha Brukman
a2cf775362 assert() on MachineInstr properties instead of checking them dynamically
llvm-svn: 15243
2004-07-26 21:35:58 +00:00