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

1612 Commits

Author SHA1 Message Date
Chris Lattner
5e975945a5 dform 8/9 are identical to dform 1
llvm-svn: 31637
2006-11-10 17:51:02 +00:00
Chris Lattner
1604b6a873 add an initial cut at preinc loads for ppc32. This is broken for ppc64
(because the 64-bit reg target versions aren't implemented yet), doesn't
support r+r addr modes, and doesn't handle stores, but it works otherwise. :)

This is disabled unless -enable-ppc-preinc is passed to llc for now.

llvm-svn: 31621
2006-11-10 02:08:47 +00:00
Chris Lattner
15c49af63f add note about ugly codegen with preinc
llvm-svn: 31617
2006-11-10 01:33:53 +00:00
Evan Cheng
d7df1a37bc PPC supports i32 / i64 pre-inc load / store.
llvm-svn: 31599
2006-11-09 19:11:50 +00:00
Evan Cheng
89ee587963 Rename ISD::MemOpAddrMode to ISD::MemIndexedMode
llvm-svn: 31595
2006-11-09 17:55:04 +00:00
Evan Cheng
736a8eb3cd Match tblegen changes.
llvm-svn: 31571
2006-11-08 20:34:28 +00:00
Chris Lattner
bd39c99fd1 Refactor all the addressing mode selection stuff into the isel lowering
class, where it can be used for preinc formation.

llvm-svn: 31536
2006-11-08 02:15:41 +00:00
Chris Lattner
35fb10e1a4 correct the (currently unused) pattern for lwzu.
llvm-svn: 31535
2006-11-08 02:13:12 +00:00
Chris Lattner
f64e5f5f3e add a note from viterbi
llvm-svn: 31506
2006-11-07 18:30:21 +00:00
Chris Lattner
bed20e1a25 fix encoding of BLR
llvm-svn: 31485
2006-11-07 01:51:50 +00:00
Chris Lattner
a193c9c977 encode BLR predicate info for the JIT
llvm-svn: 31450
2006-11-04 05:42:48 +00:00
Chris Lattner
a7687f805c Go through all kinds of trouble to mark 'blr' as having a predicate operand
that takes a register and condition code.  Print these pieces of BLR the
right way, even though it is currently set to 'always'.

Next up: get the JIT encoding right, then enhance branch folding to produce
predicated blr for simple examples.

llvm-svn: 31449
2006-11-04 05:27:39 +00:00
Chris Lattner
db04ba8502 Describe PPC predicates, which are a pair of CR# and condition.
llvm-svn: 31438
2006-11-03 23:53:25 +00:00
Chris Lattner
5f953f0927 remove dead vars
llvm-svn: 31433
2006-11-03 23:46:45 +00:00
Chris Lattner
d0b2340384 fix a bug reid noticed
llvm-svn: 31385
2006-11-02 23:39:53 +00:00
Reid Spencer
4bafa71dc1 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Chris Lattner
38c04a6bd6 Implement the getRegForInlineAsmConstraint method for PPC. With recent
sdisel changes, this eliminates a ton of copies around common inline asms.
For example:

int test2(int Y, int X) {
  asm("foo %0, %1" : "=r"(X): "r"(X));
  return X;
}

now compiles to:

_test2:
        foo r3, r4
        blr

instead of:

_test2:
        mr r2, r4
        foo r2, r2
        mr r3, r2
        blr

GCC produces:

_test2:
        foo r4, r4
        mr r3,r4
        blr

llvm-svn: 31367
2006-11-02 01:44:04 +00:00
Chris Lattner
d9afd310a6 Change the prototype for TargetLowering::isOperandValidForConstraint
llvm-svn: 31318
2006-10-31 19:40:43 +00:00
Anton Korobeynikov
e6ba8a819c 1. Clean up code due to changes in SwitchTo*Section(2)
2. Added partial debug support for mingw\cygwin targets (the same as
   Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format
   for storing debug info by default, thus many (runtime) libraries has
   this information included. These formats shouldn't be mixed in one binary
   ('stabs' & 'DWARF'), otherwise binutils tools will be confused.

llvm-svn: 31311
2006-10-31 08:31:24 +00:00
Chris Lattner
ed0b1b4b24 fix miscompilation of llvm.isunordered, where we branched on the opposite
condition.  This fixes miscompilation of Olden/bh and many others.

llvm-svn: 31301
2006-10-30 23:02:25 +00:00
Evan Cheng
5766dd6455 All targets expand BR_JT for now.
llvm-svn: 31294
2006-10-30 08:02:39 +00:00
Chris Lattner
a478e05437 implement the BlockHasNoFallThrough hook
llvm-svn: 31264
2006-10-28 17:35:02 +00:00
Evan Cheng
b60a58362a Doh. Must check if GV is constant first before putting it in .cstring.
llvm-svn: 31253
2006-10-28 05:56:51 +00:00
Chris Lattner
c94f21143f don't dist internal readme's
llvm-svn: 31246
2006-10-28 00:49:54 +00:00
Chris Lattner
838d0cbb0a this doesn't occur any more in mason
llvm-svn: 31236
2006-10-27 22:02:19 +00:00
Chris Lattner
6fe4efd730 the code in question is now:
cmpw cr0, r7, r3
        ble cr0, LBB1_5 ;bb25
LBB1_8: ;bb17
        cmpw cr0, r8, r5
        bgt cr0, LBB1_2 ;bb

which is just as good as crnand.

llvm-svn: 31235
2006-10-27 22:00:55 +00:00
Evan Cheng
65e78f3d08 Place cstrings in .cstring section.
llvm-svn: 31207
2006-10-26 21:48:57 +00:00
Devang Patel
0691019e12 Move getPreferredAlignmentLog from AsmPrinter to TargetData
llvm-svn: 31171
2006-10-24 20:32:14 +00:00
Chris Lattner
e38c95d2a3 Add intrinsics for the rest of the DCB* instructions.
llvm-svn: 31148
2006-10-24 01:08:42 +00:00
Chris Lattner
a9adb1e558 Implement support for branch reversal, fix a bug in branch analysis.
This provides stuff like:

        cmpw cr0, r15, r29
        mr r14, r15
-       bge cr0, LBB3_111       ;bb656
-       b LBB3_90       ;bb501
+       blt cr0, LBB3_90        ;bb501
 LBB3_111:      ;bb656
        lwz r18, 68(r1)

which is particularly good for dispatch group formation.

llvm-svn: 31101
2006-10-21 06:03:11 +00:00
Chris Lattner
20bb8bfd45 Simplify code, no functionality change
llvm-svn: 31097
2006-10-21 05:42:09 +00:00
Chris Lattner
d3e583b2e1 implement support for inserting a cond branch
llvm-svn: 31096
2006-10-21 05:36:13 +00:00
Chris Lattner
0f686ec438 set the ppc64 stack pointer right, dynamic alloca now works for ppc64
llvm-svn: 31028
2006-10-18 01:20:43 +00:00
Chris Lattner
6c403f7102 Expand alloca for ppc64
llvm-svn: 31027
2006-10-18 01:18:48 +00:00
Chris Lattner
7353b07275 expose DWARF_LABEL opcode# so the branch folder can update debug info properly.
llvm-svn: 31024
2006-10-17 22:41:45 +00:00
Chris Lattner
bf15d2f503 add support for inserting an uncond branch
llvm-svn: 31003
2006-10-17 18:06:55 +00:00
Jim Laskey
d266d999cb Use S_debug for dwarf info.
llvm-svn: 30994
2006-10-17 11:30:57 +00:00
Chris Lattner
b90d66b7da implement branch inspection/modification methods.
llvm-svn: 30946
2006-10-13 21:21:17 +00:00
Evan Cheng
fe5bb5dbe6 Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.
llvm-svn: 30945
2006-10-13 21:14:26 +00:00
Chris Lattner
b22754853b add note
llvm-svn: 30937
2006-10-13 20:20:58 +00:00
Chris Lattner
14f18d4896 set isBarrier correctly
llvm-svn: 30936
2006-10-13 19:10:34 +00:00
Chris Lattner
a3f4e611a4 Correctly handle instruction separators.
llvm-svn: 30935
2006-10-13 17:56:02 +00:00
Chris Lattner
e4e8893807 mark adjcallstack up/down as clobbering and using the SP
llvm-svn: 30908
2006-10-12 17:56:34 +00:00
Evan Cheng
ca66f49574 Add properties to ComplexPattern.
llvm-svn: 30891
2006-10-11 21:03:53 +00:00
Evan Cheng
d22f3dd3ed Reflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.
llvm-svn: 30844
2006-10-09 20:57:25 +00:00
Evan Cheng
275825195a Make use of getStore().
llvm-svn: 30759
2006-10-05 23:01:46 +00:00
Chris Lattner
08da1a510d Don't bother setting JumpTableTextSection, it is about to disappear
llvm-svn: 30745
2006-10-05 03:13:59 +00:00
Chris Lattner
068190eb91 Pass the MachineFunction into EmitJumpTableInfo.
llvm-svn: 30742
2006-10-05 03:01:21 +00:00
Chris Lattner
ca844c6695 Move getSectionForFunction to AsmPrinter, change it to return a string.
llvm-svn: 30735
2006-10-05 02:42:20 +00:00
Chris Lattner
0ca8a69c28 implement DarwinTargetAsmInfo::getSectionForFunction, use it when outputting
function bodies

llvm-svn: 30733
2006-10-05 00:35:50 +00:00