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

22830 Commits

Author SHA1 Message Date
Chris Lattner
291e17764d add a method
llvm-svn: 26357
2006-02-24 18:53:51 +00:00
Chris Lattner
304aeda827 Fix a problem that Nate noticed that boils down to an over conservative check
in the code that does "select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y)))".
We now compile this loop:

LBB1_1: ; no_exit
        add r6, r2, r3
        subf r3, r2, r3
        cmpwi cr0, r2, 0
        addi r7, r5, 4
        lwz r2, 0(r5)
        addi r4, r4, 1
        blt cr0, LBB1_4 ; no_exit
LBB1_3: ; no_exit
        mr r3, r6
LBB1_4: ; no_exit
        cmpwi cr0, r4, 16
        mr r5, r7
        bne cr0, LBB1_1 ; no_exit

into this instead:

LBB1_1: ; no_exit
        srawi r6, r2, 31
        add r2, r2, r6
        xor r6, r2, r6
        addi r7, r5, 4
        lwz r2, 0(r5)
        addi r4, r4, 1
        add r3, r3, r6
        cmpwi cr0, r4, 16
        mr r5, r7
        bne cr0, LBB1_1 ; no_exit

llvm-svn: 26356
2006-02-24 18:05:58 +00:00
Jim Laskey
fe79552c25 Add pointer and reference types. Added short-term code to ignore NULL types
(to allow llvm-gcc4 to build.)

llvm-svn: 26355
2006-02-24 16:46:40 +00:00
Jeff Cohen
9773f9c447 Get VC++ building again.
llvm-svn: 26351
2006-02-24 02:52:40 +00:00
Chris Lattner
6248339a24 Implement (most of) selection of inline asm memory operands.
llvm-svn: 26350
2006-02-24 02:13:54 +00:00
Chris Lattner
1ffa8d3666 Select inline asm memory operands.
llvm-svn: 26349
2006-02-24 02:13:31 +00:00
Chris Lattner
3d451516ec Implement selection of inline asm memory operands
llvm-svn: 26348
2006-02-24 02:13:12 +00:00
Chris Lattner
0f3130afc2 Add some hooks for selecting memory addresses.
llvm-svn: 26347
2006-02-24 02:12:52 +00:00
Chris Lattner
3f267c1683 Lower C_Memory operands.
llvm-svn: 26346
2006-02-24 01:11:24 +00:00
Chris Lattner
b5df999862 Recognize memory operand codes
llvm-svn: 26345
2006-02-24 01:10:46 +00:00
Chris Lattner
0957a2e87c Add C_Memory operand type
llvm-svn: 26344
2006-02-24 01:10:14 +00:00
Chris Lattner
cd5ae150bb Parse the %*# constraint modifiers
llvm-svn: 26341
2006-02-23 23:36:53 +00:00
Chris Lattner
d150672d87 add a new flag
llvm-svn: 26340
2006-02-23 23:36:23 +00:00
Jim Laskey
ddac333e72 Added basic support for typedefs.
llvm-svn: 26339
2006-02-23 22:37:30 +00:00
Evan Cheng
2720cd1d7e PPC JIT relocation model should be DynamicNoPIC.
llvm-svn: 26338
2006-02-23 22:18:07 +00:00
Evan Cheng
cb9fb051a5 - Clean up the lowering and selection code of ConstantPool, GlobalAddress,
and ExternalSymbol.
- Use C++ code (rather than tblgen'd selection code) to match the above
  mentioned leaf nodes. Do not mutate and nodes and do not record the
  selection in CodeGenMap. These nodes should be safe to duplicate. This is
  a performance win.

llvm-svn: 26335
2006-02-23 20:41:18 +00:00
Chris Lattner
5a70e894d1 Fix an endianness problem on big-endian targets with expanded operands
to inline asms.  Mark some methods const.

llvm-svn: 26334
2006-02-23 20:06:57 +00:00
Chris Lattner
cdbd9d6d4c Implement the PPC inline asm "L" modifier. This allows us to compile:
long long test(long long X) {
  __asm__("foo %0 %L0 %1 %L1" : "=r"(X): "r"(X));
  return X;
}

to:
        foo r2 r3 r2 r3

llvm-svn: 26333
2006-02-23 19:31:10 +00:00
Chris Lattner
b4951fbe82 Record all of the expanded registers in the DAG and machine instr, fixing
several bugs in inline asm expanded operands.

llvm-svn: 26332
2006-02-23 19:21:04 +00:00
Jim Laskey
1ee7e91e5c DwarfWriter reading basic type information from llvm-gcc4 code.
llvm-svn: 26331
2006-02-23 16:58:18 +00:00
Chris Lattner
97cb3f51cd Match the case of other mailing lists in the list
llvm-svn: 26330
2006-02-23 16:18:29 +00:00
Chris Lattner
0e842bb8e4 document the llvm-testresults list
llvm-svn: 26329
2006-02-23 16:14:22 +00:00
Chris Lattner
b74e255d8b Code cleanups, no functionality change
llvm-svn: 26328
2006-02-23 06:44:17 +00:00
Chris Lattner
72d24be146 "." isn't enough to get a private label on linux, use ".L".
llvm-svn: 26327
2006-02-23 05:25:02 +00:00
Chris Lattner
23b302ce83 add a small and simple case.
llvm-svn: 26326
2006-02-23 05:17:43 +00:00
Evan Cheng
a85c267431 A couple of new entries.
llvm-svn: 26325
2006-02-23 02:50:21 +00:00
Evan Cheng
2977507828 PIC related bug fixes.
1. Various asm printer bug.
2. Lowering bug. Now TargetGlobalAddress is wrapped in X86ISD::TGAWrapper.

llvm-svn: 26324
2006-02-23 02:43:52 +00:00
Evan Cheng
b8000b03aa X86 codegen tweak to use lea in another case:
Suppose base == %eax and it has multiple uses, then instead of
  movl %eax, %ecx
  addl $8, %ecx
use
  leal 8(%eax), %ecx.

llvm-svn: 26323
2006-02-23 00:13:58 +00:00
Evan Cheng
41154489a2 Add a test case for 'lea'.
llvm-svn: 26322
2006-02-23 00:12:12 +00:00
Evan Cheng
4e31b8eaed Missing .globl for weak / link-once .text symbols.
llvm-svn: 26321
2006-02-22 23:59:57 +00:00
Chris Lattner
fafc1f9c51 Fix Regression/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll, which
caused SPASS to fail building last night.

We can't trivially unswitch a loop if the exit block has phi nodes in it,
because we don't know which predecessor to use.

llvm-svn: 26320
2006-02-22 23:55:00 +00:00
Chris Lattner
74ba4994e8 new testcase distilled from SPASS
llvm-svn: 26319
2006-02-22 23:54:15 +00:00
Chris Lattner
2fc133f091 This fixes a couple of problems with expansion
llvm-svn: 26318
2006-02-22 23:09:03 +00:00
Chris Lattner
db19979bea Don't return registers from register classes that aren't legal.
llvm-svn: 26317
2006-02-22 23:00:51 +00:00
Chris Lattner
d1886b8a4e Change a whole bunch of code to be built around RegsForValue instead of
a single register number.  This fully implements promotion for inline asms,
expand is close but not quite right yet.

llvm-svn: 26316
2006-02-22 22:37:12 +00:00
Evan Cheng
305141c1ba - Added option -relocation-model to set relocation model. Valid values include static, pic,
dynamic-no-pic, and default.
PPC and x86 default is dynamic-no-pic for Darwin, pic for others.
- Removed options -enable-pic and -ppc-static.

llvm-svn: 26315
2006-02-22 20:19:42 +00:00
Jim Laskey
b62a583c99 Coordinate activities with llvm-gcc4 and dwarf.
llvm-svn: 26314
2006-02-22 19:02:11 +00:00
Chris Lattner
ed45ad33b7 Make the LLVM headers "-ansi -pedantic -Wno-long-long" clean.
Patch by Martin Partel!

llvm-svn: 26313
2006-02-22 16:23:43 +00:00
Chris Lattner
2bd9a8623c Turn on loop unswitching tonight
llvm-svn: 26312
2006-02-22 07:33:49 +00:00
Chris Lattner
b539c70e07 Add some comments, simplify some code, and fix a bug that caused rewriting
to rewrite with the wrong value.

llvm-svn: 26311
2006-02-22 06:37:14 +00:00
Evan Cheng
005de9e2bb Added MMX, SSE1, and SSE2 vector instructions and some simple patterns.
Fixed some existing bugs (wrong predicates, prefixes) at the same time.

llvm-svn: 26310
2006-02-22 02:26:30 +00:00
Chris Lattner
eb069a779c reorder some libraries
llvm-svn: 26309
2006-02-22 00:59:06 +00:00
Chris Lattner
6bb2c3e9cd split register class handling from explicit physreg handling.
llvm-svn: 26308
2006-02-22 00:56:39 +00:00
Chris Lattner
086fd0f862 expose the set of values types holdable in a regclass to clients
llvm-svn: 26307
2006-02-21 23:51:58 +00:00
Chris Lattner
b5b7cc99c4 Adjust to changes in getRegForInlineAsmConstraint prototype
llvm-svn: 26306
2006-02-21 23:12:12 +00:00
Chris Lattner
a124432746 Updates to match change of getRegForInlineAsmConstraint prototype
llvm-svn: 26305
2006-02-21 23:11:00 +00:00
Chris Lattner
ed3b59056a Pass in a value type to getRegForInlineAsmConstraint, allowing targets to
select different sets of registers depending on the type requested.

llvm-svn: 26304
2006-02-21 23:10:29 +00:00
Evan Cheng
8ab6294f94 One more round of reorg so sabre doesn't freak out. :-)
llvm-svn: 26303
2006-02-21 20:00:20 +00:00
Evan Cheng
f7296d8fa5 A big more cleaning up.
llvm-svn: 26302
2006-02-21 19:30:30 +00:00
Evan Cheng
223d3a073a Moving things to their proper places.
llvm-svn: 26301
2006-02-21 19:26:52 +00:00