1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

19096 Commits

Author SHA1 Message Date
Andrew Lenharth
262477edde clean up prolouge and epilouge
llvm-svn: 22346
2005-07-07 19:52:58 +00:00
Reid Spencer
fb7bca6fa6 For PR495:
Change interface to Path class:
readable -> canRead
writable -> canWrite
executable -> canExecute

More (incremental) changes coming to close 495.

llvm-svn: 22345
2005-07-07 18:21:42 +00:00
Chris Lattner
e45dd7850d Restore some code that was accidentally removed by Nate's patch yesterday.
This fixes the regressions from last night.

llvm-svn: 22344
2005-07-07 17:12:53 +00:00
Chris Lattner
efccb190b5 Add support for emitting the symbol table (and its string table) of the
module to the ELF file.  Test it by adding support for emitting common
symbols.  This allows us to compile this:

%X = weak global int 0
%Y = weak global int 0
%Z = weak global int 0

to an elf file that 'readelf's this:

Symbol table '.symtab' contains 4 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 00000004     4 OBJECT  GLOBAL DEFAULT  COM X
     2: 00000004     4 OBJECT  GLOBAL DEFAULT  COM Y
     3: 00000004     4 OBJECT  GLOBAL DEFAULT  COM Z

llvm-svn: 22343
2005-07-07 07:02:20 +00:00
Chris Lattner
ad1e2361e9 Add support for building/representing the symbol table, add some enum constants
llvm-svn: 22342
2005-07-07 07:00:37 +00:00
Nate Begeman
667588d524 Fix a typo in my checkin today that caused regressions. Oops!
llvm-svn: 22341
2005-07-07 06:32:01 +00:00
Nate Begeman
e5314eb2c2 First round of support for doing scalar FP using the SSE2 ISA extension and
XMM registers.  There are many known deficiencies and fixmes, which will be
addressed ASAP.  The major benefit of this work is that it will allow the
LLVM register allocator to allocate FP registers across basic blocks.

The x86 backend will still default to x87 style FP.  To enable this work,
you must pass -enable-sse-scalar-fp and either -sse2 or -sse3 to llc.

An example before and after would be for:
double foo(double *P) { double Sum = 0; int i; for (i = 0; i < 1000; ++i)
                        Sum += P[i]; return Sum; }

The inner loop looks like the following:
x87:
.LBB_foo_1:     # no_exit
        fldl (%esp)
        faddl (%eax,%ecx,8)
        fstpl (%esp)
        incl %ecx
        cmpl $1000, %ecx
        #FP_REG_KILL
        jne .LBB_foo_1  # no_exit

SSE2:
        addsd (%eax,%ecx,8), %xmm0
        incl %ecx
        cmpl $1000, %ecx
        #FP_REG_KILL
        jne .LBB_foo_1  # no_exit

llvm-svn: 22340
2005-07-06 18:59:04 +00:00
Chris Lattner
199560c668 Make several cleanups to Andrews varargs change:
1. Pass Value*'s into lowering methods so that the proper pointers can be
   added to load/stores from the valist
2. Intrinsics that return void should only return a token chain, not a token
   chain/retval pair.
3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone.
4. Now that we have Value*'s available in the lowering methods, pass them
   into any load/stores from the valist that are emitted

llvm-svn: 22339
2005-07-05 19:58:54 +00:00
Chris Lattner
bf100c8bdb Make several cleanups to Andrews varargs change:
1. Pass Value*'s into lowering methods so that the proper pointers can be
   added to load/stores from the valist
2. Intrinsics that return void should only return a token chain, not a token
   chain/retval pair.
3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone.

llvm-svn: 22338
2005-07-05 19:57:53 +00:00
Andrew Lenharth
3543e3b3a9 2 fixes:
1: Legalize operand in UINT_TO_FP expanision

2: SRA x, const i8 was not promoting the constant to shift amount type.
llvm-svn: 22337
2005-07-05 19:52:39 +00:00
Chris Lattner
f8faaa8a39 Fit to 80 columns
llvm-svn: 22336
2005-07-05 17:50:16 +00:00
Chris Lattner
23a1b681d0 Fix PowerPC varargs
llvm-svn: 22335
2005-07-05 17:48:31 +00:00
Andrew Lenharth
dcc86e27ca oops
llvm-svn: 22334
2005-07-05 16:36:18 +00:00
Andrew Lenharth
e889dbed2d updates
llvm-svn: 22333
2005-07-05 15:18:33 +00:00
Andrew Lenharth
d2db55ec81 check the correct VT
llvm-svn: 22332
2005-07-04 20:07:21 +00:00
Andrew Lenharth
6a674b7805 fix loading address of fp symbols
llvm-svn: 22331
2005-07-03 20:06:13 +00:00
Chris Lattner
93a2576078 Percolate the call up to the right superclass
llvm-svn: 22330
2005-07-03 17:34:39 +00:00
Andrew Lenharth
c9903eb2cc I really didn't think this was necessary. But, Legalize wasn't running again
and legalizing the extload.  Strange.  Should fix most alpha regressions.

llvm-svn: 22329
2005-07-02 20:58:53 +00:00
Jeff Cohen
5c06ea68a5 Adding new files to Visual Studio projects.
llvm-svn: 22328
2005-07-02 02:04:26 +00:00
Nate Begeman
12d2961fd2 The statistic needs to be in the correct namespace.
llvm-svn: 22327
2005-07-01 23:56:38 +00:00
Chris Lattner
6a865d5a22 Varargs is apparently currently broken on PPC. This hacks it so that it
is at least overloading the right virtual methods.  The implementations
are currently wrong though.  This fixes Ptrdist/bc, but not other programs
(e.g. siod).

llvm-svn: 22326
2005-07-01 23:11:56 +00:00
Chris Lattner
b299933fc7 Refactor X86AsmPrinter.cpp into multiple files. Patch contributed
by Aaron Gray, cleaned up by me.

llvm-svn: 22324
2005-07-01 22:44:09 +00:00
Andrew Lenharth
b1de98d654 simplify call code, remove pseudo ops for div and rem, track more loads and stores
llvm-svn: 22323
2005-07-01 19:14:02 +00:00
Andrew Lenharth
f2c8cd0c36 simplify call code, remove pseudo ops for div and rem, track more loads and stores
llvm-svn: 22322
2005-07-01 19:12:13 +00:00
Chris Lattner
c2438fe76f remove some debugging code
llvm-svn: 22321
2005-07-01 06:40:58 +00:00
Andrew Lenharth
b8c48ce74e oops
llvm-svn: 22320
2005-06-30 19:32:57 +00:00
Andrew Lenharth
04aa18bd2a FP EXTLOAD is not support on all archs, expand to LOAD and FP_EXTEND
llvm-svn: 22319
2005-06-30 19:22:37 +00:00
Chris Lattner
02fe175f3d Fix PR590 and Transforms/Mem2Reg/2005-06-30-ReadBeforeWrite.ll.
The optimization for locally used allocas was not safe for allocas that
were read before they were written.  This change disables that optimization
in that case.

llvm-svn: 22318
2005-06-30 07:29:44 +00:00
Chris Lattner
b4c2302706 new testcase for PR590
llvm-svn: 22317
2005-06-30 07:28:54 +00:00
Nate Begeman
31e3028bac Make the x86 asm printer darwin-aware. This mostly entails doing the same
thing as cygwin most of the time, and printing our alignments in log2
rather than number of bytes.

llvm-svn: 22316
2005-06-30 00:53:20 +00:00
Andrew Lenharth
898efb338a restore old srcValueNode behavior and try to to work around it
llvm-svn: 22315
2005-06-29 18:54:02 +00:00
Chris Lattner
83170cd9ba Don't crash on a query where the block is not in any loop. Thanks to
Sameer D. Sahasrabuddhe for pointing this out!

llvm-svn: 22314
2005-06-29 17:41:25 +00:00
John Criswell
3ea45d49cd Bug fixed.
llvm-svn: 22313
2005-06-29 16:22:34 +00:00
John Criswell
a6620d4a6e Doh! Forgot to LLVMify the style.
llvm-svn: 22312
2005-06-29 15:57:50 +00:00
Andrew Lenharth
edccb834bb tracking the instructions causing loads and stores provides more information than just the pointer being loaded or stored
llvm-svn: 22311
2005-06-29 15:57:19 +00:00
John Criswell
1bafe064da Basic fix for PR#591; don't convert an fprintf() to an fwrite() if there
is a mismatch in their character type pointers (i.e. fprintf() prints an
array of ubytes while fwrite() takes an array of sbytes).
We can probably do better than this (such as casting the ubyte to an
sbyte).

llvm-svn: 22310
2005-06-29 15:03:18 +00:00
Andrew Lenharth
781dd8e05f thinko
llvm-svn: 22309
2005-06-29 13:35:05 +00:00
Andrew Lenharth
6b4dbd7cd5 unify SelectExpr and SelectFP
llvm-svn: 22308
2005-06-29 12:49:51 +00:00
Andrew Lenharth
88491475e2 fix most regressions
llvm-svn: 22307
2005-06-29 12:23:34 +00:00
Andrew Lenharth
172871ba0f support more relocations for stores also
llvm-svn: 22306
2005-06-29 00:39:17 +00:00
Andrew Lenharth
41d08a0bbe Get rid of all symbolic loads. I now do gernate all relocations sequences
rather than relying on the assembler.  Only a few more pseudo instructions
left.  Also merge load code paths.

llvm-svn: 22305
2005-06-29 00:31:08 +00:00
Jeff Cohen
d8982d4282 Add ElfWriter stuff to Visual Studio
llvm-svn: 22304
2005-06-28 02:43:03 +00:00
Andrew Lenharth
d1dbc8ab27 some call work
llvm-svn: 22303
2005-06-27 23:59:51 +00:00
Andrew Lenharth
d534c5cb2a Adapt the code for handling uint -> fp conversion for the 32 bit case to
handling it in the 64 bit case.  The two code paths should probably be merged.

llvm-svn: 22302
2005-06-27 23:28:32 +00:00
Andrew Lenharth
cc12cd8c5a So, it turns out I forgot that one valid way of restoring GP after a call
is to use RA, which assumes the called function uses RA for the register
holding the return address when it issues a ret.

llvm-svn: 22301
2005-06-27 23:24:11 +00:00
Nate Begeman
032a94775d Initial set of .td file changes necessary to get scalar fp in xmm registers
working.  The instruction selector changes will hopefully be coming later
this week once they are debugged.  This is necessary to support the darwin
x86 FP model, and is recommended by intel as the replacement for x87.  As
a bonus, the register allocator knows how to deal with these registers
across basic blocks, unliky the FP stackifier.  This leads to significantly
better codegen in several cases.

llvm-svn: 22300
2005-06-27 21:20:31 +00:00
Andrew Lenharth
34630b5ab0 get rid of another pseudo op
llvm-svn: 22299
2005-06-27 21:11:40 +00:00
Andrew Lenharth
b80c19b01a generate address of constant pool entries
llvm-svn: 22298
2005-06-27 21:02:56 +00:00
Andrew Lenharth
6e30e970ed Misha happification patch
llvm-svn: 22297
2005-06-27 17:39:17 +00:00
Andrew Lenharth
a3f70592a7 Reduce use of pseudo ops
Namely, output the rellocation flags explicitly when loading constants.
Added benifit: save a load when loading from the constant pool.

llvm-svn: 22296
2005-06-27 17:15:36 +00:00