1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

14589 Commits

Author SHA1 Message Date
Misha Brukman
f8a2aee058 V8 is now a subdirectory of Sparc; adjust paths accordingly
llvm-svn: 16481
2004-09-22 20:08:52 +00:00
Reid Spencer
8304ac75a2 Update to add the HAVE_UINT64_T test and the STACK_DIRECTION indicator.
llvm-svn: 16480
2004-09-22 15:32:08 +00:00
Reid Spencer
182e31bdc5 The alloca function, strangely enough, is found in the malloc.h header file
on MINGW platform. Provide an #elseif case to #include malloc.h for this
platform if malloc.h is found.

Patch provided by Henrik Bach. Thanks Henrik!

llvm-svn: 16479
2004-09-22 15:28:32 +00:00
Nate Begeman
61d1797c03 add optimized code sequences for setcc x, 0
llvm-svn: 16478
2004-09-22 04:40:25 +00:00
Chris Lattner
537636bb55 Do not fold (X + C1 != C2) if there are other users of the add. Doing
this transformation used to take a loop like this:

int Array[1000];
void test(int X) {
  int i;
  for (i = 0; i < 1000; ++i)
    Array[i] += X;
}

Compiled to LLVM is:

no_exit:                ; preds = %entry, %no_exit
        %indvar = phi uint [ 0, %entry ], [ %indvar.next, %no_exit ]            ; <uint> [#uses=2]
        %tmp.4 = getelementptr [1000 x int]* %Array, int 0, uint %indvar                ; <int*> [#uses=2]
        %tmp.7 = load int* %tmp.4               ; <int> [#uses=1]
        %tmp.9 = add int %tmp.7, %X             ; <int> [#uses=1]
        store int %tmp.9, int* %tmp.4
***     %indvar.next = add uint %indvar, 1              ; <uint> [#uses=2]
***     %exitcond = seteq uint %indvar.next, 1000               ; <bool> [#uses=1]
        br bool %exitcond, label %return, label %no_exit

and turn it into a loop like this:

no_exit:                ; preds = %entry, %no_exit
        %indvar = phi uint [ 0, %entry ], [ %indvar.next, %no_exit ]            ; <uint> [#uses=3]
        %tmp.4 = getelementptr [1000 x int]* %Array, int 0, uint %indvar                ; <int*> [#uses=2]
        %tmp.7 = load int* %tmp.4               ; <int> [#uses=1]
        %tmp.9 = add int %tmp.7, %X             ; <int> [#uses=1]
        store int %tmp.9, int* %tmp.4
***     %indvar.next = add uint %indvar, 1              ; <uint> [#uses=1]
***     %exitcond = seteq uint %indvar, 999             ; <bool> [#uses=1]
        br bool %exitcond, label %return, label %no_exit

Note that indvar.next and indvar can no longer be coallesced.  In machine
code terms, this patch changes this code:

.LBBtest_1:     # no_exit
        mov %EDX, OFFSET Array
        mov %ESI, %EAX
        add %ESI, DWORD PTR [%EDX + 4*%ECX]
        mov %EDX, OFFSET Array
        mov DWORD PTR [%EDX + 4*%ECX], %ESI
        mov %EDX, %ECX
        inc %EDX
        cmp %ECX, 999
        mov %ECX, %EDX
        jne .LBBtest_1  # no_exit

into this:

.LBBtest_1:     # no_exit
        mov %EDX, OFFSET Array
        mov %ESI, %EAX
        add %ESI, DWORD PTR [%EDX + 4*%ECX]
        mov %EDX, OFFSET Array
        mov DWORD PTR [%EDX + 4*%ECX], %ESI
        inc %ECX
        cmp %ECX, 1000
        jne .LBBtest_1  # no_exit

We need better instruction selection to get this:

.LBBtest_1:     # no_exit
        add DWORD PTR [Array + 4*%ECX], EAX
        inc %ECX
        cmp %ECX, 1000
        jne .LBBtest_1  # no_exit

... but at least there is less register juggling

llvm-svn: 16473
2004-09-21 21:35:23 +00:00
Alkis Evlogimenos
3f8f30bcb8 The real x87 floating point registers should not be allocatable. They
are only used by the stackifier when transforming FPn register
allocations to the real stack file x87 registers.

llvm-svn: 16472
2004-09-21 21:22:11 +00:00
Misha Brukman
bd9f406b0b s/ISel/PPC64ISel/ to have unique class names for debugging via gdb because the
C++ front-end in gcc does not mangle classes in anonymous namespaces correctly.

llvm-svn: 16471
2004-09-21 18:22:33 +00:00
Misha Brukman
6ad6dd2ab9 s/ISel/PPC32ISel/ to have unique class names for debugging via gdb because the
C++ front-end in gcc does not mangle classes in anonymous namespaces correctly.

llvm-svn: 16470
2004-09-21 18:22:19 +00:00
Misha Brukman
e877aacbaa s/ISel/X86ISel/ to have unique class names for debugging via gdb because the C++
front-end in gcc does not mangle classes in anonymous namespaces correctly.

llvm-svn: 16469
2004-09-21 18:21:21 +00:00
Chris Lattner
55d0f3ae97 Make sure to set the operand list
llvm-svn: 16466
2004-09-21 17:30:54 +00:00
Reid Spencer
645c405a6d Fix a problem where the mmap_file test was generating an incorrect test
program that always failed (wouldn't compile).

llvm-svn: 16465
2004-09-21 17:14:44 +00:00
Reid Spencer
c8ea59b3c7 Change the warning text so that NO warnings are permitted. This is now the
case since the AC_CONFIG_SUBDIRS problem has been fixed.

llvm-svn: 16464
2004-09-21 17:13:23 +00:00
Reid Spencer
5c162ec83c Don't attempt to (illegally) configure a subdir if we don't recognize it.
Instead just create a warning message that says the directory cannot be
configured because it isn't recognized. This also gets rid of a bunch of
warning messages from the auto* tools.

llvm-svn: 16463
2004-09-21 17:12:35 +00:00
Reid Spencer
c90eff97f7 Fix the program passed to AC_LANG_PROGRAM to be only the BODY of the main
function, not the whole main function. This problem resulted during
conversion of scripts to the new autoconf standard. The effect was that
the mmap_file test would fail and if it does there is currently an
#ifdef'd #error that causes compilation to fail. Bad, bad, bad.

llvm-svn: 16462
2004-09-21 17:10:52 +00:00
Misha Brukman
0559022175 Thanks to Brad Jones for packed type support!
llvm-svn: 16461
2004-09-21 16:54:37 +00:00
Misha Brukman
03b712dfcc Thanks to Brad for documentation on adding a DerivedType
llvm-svn: 16460
2004-09-21 16:53:29 +00:00
Chris Lattner
424098cc84 This is an empty directory
llvm-svn: 16459
2004-09-21 16:26:13 +00:00
Chris Lattner
81eb16dd40 This is a dead directory now
llvm-svn: 16458
2004-09-21 16:25:41 +00:00
Reid Spencer
cfb05261bc Change the name of the "known" module for Java from llvm-java to Java.
llvm-svn: 16453
2004-09-20 22:14:56 +00:00
Alkis Evlogimenos
09eb7928db Use the right directory for the Java frontend
llvm-svn: 16448
2004-09-20 15:45:36 +00:00
Chris Lattner
b64bfebc25 Fix potential miscompilations: InstCombine/2004-09-20-BadLoadCombine*.llx
llvm-svn: 16447
2004-09-20 10:15:10 +00:00
Chris Lattner
258a4d3c8c Two testcases for invalid transformations that instcombine is doing
llvm-svn: 16446
2004-09-20 10:14:27 +00:00
Reid Spencer
d34acf9203 Documentation upgrade.
llvm-svn: 16445
2004-09-20 08:09:36 +00:00
Reid Spencer
1b666f9b79 Finish the documentation.
llvm-svn: 16444
2004-09-20 08:04:13 +00:00
Reid Spencer
7e9bb8eeda Tighten up the specification of what counts as a code file. The previous
specification was too liberal in some areas and missing things in others.
This specification is based on the actual extensions found in the source
tree.

llvm-svn: 16443
2004-09-20 08:00:09 +00:00
Reid Spencer
95d5c8f3c3 Base the implementation on the llvmdo script so that we only have to
maintain the logic for "what counts as a source file" in one place.

llvm-svn: 16442
2004-09-20 07:22:23 +00:00
Reid Spencer
eee6d1dc15 Fixed to actually work correctly and be the basis for other tools by
allowing the set of directories searched to be specified either by the
LLVMDO_DIRS env var or by the -dirs "dirs..." command line option.

llvm-svn: 16441
2004-09-20 07:21:19 +00:00
Alkis Evlogimenos
a3a9fa1d80 Fix loop condition so that we don't decrement off the beginning of the
list.

llvm-svn: 16440
2004-09-20 06:42:58 +00:00
Chris Lattner
dbba476620 Don't count .lo files :)
llvm-svn: 16439
2004-09-20 05:01:04 +00:00
Chris Lattner
43c0372c0b 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Chris Lattner
3acc541d97 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

Also, fix some undefined behavior, expecting | on booleans to evaluate
left-to-right.

llvm-svn: 16435
2004-09-20 04:47:19 +00:00
Chris Lattner
01bbefa96c Finegrainify namespacification
'Pass' should now not be derived from by clients.  Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16434
2004-09-20 04:44:31 +00:00
Chris Lattner
b65d7c65d6 Prototype more accurately
llvm-svn: 16433
2004-09-20 04:43:57 +00:00
Chris Lattner
c137c9ac39 Prototype these functions more accurately
llvm-svn: 16432
2004-09-20 04:43:15 +00:00
Chris Lattner
a4d3f95fa3 Do not prototype any of these passes as returning Pass*. Instead, be specific
llvm-svn: 16431
2004-09-20 04:41:39 +00:00
Chris Lattner
aef2bbf942 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16430
2004-09-20 04:36:29 +00:00
Reid Spencer
046d7d920a Put in a #error in the event that we don't have an mmap that can map a file
into memor. This is just a reminder that the ReadFileIntoAddressSpace
function needs to be properly converted to lib/System and implemented via
read/write if there's no mmap of file support.

llvm-svn: 16428
2004-09-20 04:13:43 +00:00
Reid Spencer
028111e37d Fix problems with AC_FUNC_MMAP_FILE and AC_LINK_USE_R that caused problems
with correctly recognizing mmap of files and the linker's support of -r.

llvm-svn: 16427
2004-09-20 04:09:56 +00:00
Reid Spencer
5fd27c9428 Correct the use AC_RUN_IFELSE to ensure it builds programs correctly by
using the AC_LANG_PROGRAM macro.

llvm-svn: 16426
2004-09-20 04:08:22 +00:00
Reid Spencer
1fe303c95c Allow the suffix for shared libraries to be obtained correctly so we can
build them again.

llvm-svn: 16425
2004-09-20 03:06:28 +00:00
Reid Spencer
cdfc10207e The problem with depending on the internal implementation of third party
tools is that you break when they change. This is a case in point.

llvm-svn: 16424
2004-09-20 03:05:46 +00:00
Reid Spencer
8fb0a02460 libtool's name is now back to mklib.
llvm-svn: 16423
2004-09-20 01:43:00 +00:00
Reid Spencer
61be2ebab7 Change to support creation of "mklib" instead of "libtool" in builddir.
llvm-svn: 16422
2004-09-20 01:42:32 +00:00
Reid Spencer
d16796d37b Update the script to generate mklib instead of libtool.
llvm-svn: 16421
2004-09-20 01:41:24 +00:00
Reid Spencer
a889e9e1df Adjust the libtool macros so that libtool's name is "mklib". Also, tidy up
the use of obsolete macros, hopefully making us more compliant on more sys.

llvm-svn: 16420
2004-09-19 23:53:36 +00:00
Reid Spencer
94bae39edc Various minor cleanups and replacement of obsoleted macro names.
llvm-svn: 16419
2004-09-19 23:43:52 +00:00
Reid Spencer
dd0df28d37 Numerous fixes to convert ~ into ; that (probably) occurred during data
transmission.

llvm-svn: 16418
2004-09-19 23:42:55 +00:00
Chris Lattner
d34f6978fb The lexicon doc is more of a user guide than programming dox
llvm-svn: 16417
2004-09-19 23:15:47 +00:00
Reid Spencer
1b4e38a275 Bring the script out of the dark ages and into modern autoconfness.
llvm-svn: 16415
2004-09-19 22:31:49 +00:00
Reid Spencer
4ae326c323 Make the "Warning" notice a LOT more prominent.
llvm-svn: 16414
2004-09-19 22:30:53 +00:00