Commit Graph

14435 Commits

Author SHA1 Message Date
Misha Brukman
c6e7430499 Fix the copy-pasto that Brian noticed: V8 int regs are 32-bits wide, not 64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16518 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-26 21:07:43 +00:00
Reid Spencer
aefd04b6d0 Add some missing #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16517 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-25 16:00:07 +00:00
Reid Spencer
8d9b6800f6 Qualify Path with sys:: namespace so this file compiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16516 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-25 15:59:41 +00:00
Reid Spencer
725f2c82c9 Updated to reflect changes in the interface of TimeValue::now().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16515 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-25 08:32:37 +00:00
Reid Spencer
45392b694f Clean up the interface of TimeValue:
- get rid of unneeded constructors
- get rid of duplicate methods/constructors/operators
- normalize to LLVM coding standards
- wrap to 80 columns.

Many thanks to Alkis Evlogimenos for his suggestions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16514 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-25 08:29:54 +00:00
Reid Spencer
0d5716e3af Added stub implementations of TimeValue concept for remaining platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16513 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-25 05:03:54 +00:00
Reid Spencer
1fc194c610 Wrap to 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16512 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-25 05:03:22 +00:00
Reid Spencer
9926c31351 Initial implementation of the TimeValue abstraction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16511 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-24 23:25:19 +00:00
John Criswell
4046846d2c Updated the last two header files so that they are configured with
AC_CONFIG_HEADERS.  This should prevent LLVM from needlessly re-compiling
on a re-configure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16510 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-24 21:19:06 +00:00
John Criswell
9f011866e9 Modified hash_map and hash_set configuration so that they are not
regenerated on every run of configure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16509 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-24 18:28:00 +00:00
Chris Lattner
0c96766c90 Implement shift-and combinations, implementing InstCombine/and.ll:test19-21
These combinations trigger 4 times in povray, 7x in gcc, 4x in gap, and 2x in bzip2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16508 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-24 15:21:34 +00:00
Chris Lattner
71dd801055 Add some tests for shr-and folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16507 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-24 15:18:43 +00:00
John Criswell
5fbb1f8fcc Configure Datatypes.h.in with AC_CONFIG_HEADERS. This should prevent it
from being re-generated if the new version is identical to the old version.
Hence, it should save us some recompiling after re-configures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16506 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-24 13:28:51 +00:00
Chris Lattner
648e3bc39c Move LHSI->hasOneUse() into the arms of the conditional, reindenting code.
No functionality changes here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16505 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 21:52:49 +00:00
Chris Lattner
b20ba0a83f Implement Transforms/InstCombine/and.ll:test18, a case that occurs 20 times
in perlbmk


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16504 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 21:46:38 +00:00
Chris Lattner
7502ae6640 New testcase for a pattern that occurs 20 times in perlbmk
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16503 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 21:42:49 +00:00
Reid Spencer
b40df56f26 Add a blurb about the use of class vs. struct keyword in class decls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16500 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 16:03:48 +00:00
Chris Lattner
684fe210a9 Implement select.ll:test16: fold load (select C, X, null) -> load X
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16499 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 15:46:00 +00:00
Chris Lattner
60a11f1970 load null is undefined behavior, this should fold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16498 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 15:45:20 +00:00
Reid Spencer
530036b5e8 Change Value from a "struct" to a "class" so that VC 7.1 doesn't generate
missing symbols when its referenced as a class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16496 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 14:49:45 +00:00
Reid Spencer
f6cbc0fd64 Patch for MINGW. Patch provided by Henrik Bach.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16495 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 14:47:10 +00:00
Reid Spencer
ad9590e12c Missed one $*.a -> $@ conversion for the Release build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16494 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 06:07:24 +00:00
Nate Begeman
645495d2e6 Fix the last of the major PPC GEP folding deficiencies. This will allow
the ISel to use indexed and non-zero immediate offsets for GEPs that have
more than one use.  This is common for instruction sequences such as a load
followed by a modify and store to the same address.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16493 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 05:31:33 +00:00
Alkis Evlogimenos
ab5948f242 Update email address
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16492 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 04:39:30 +00:00
Chris Lattner
4ce08a0a47 Grrr... I shouldn't have to do this one :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16491 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 04:36:01 +00:00
Chris Lattner
f69dcb15c3 Update credits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16490 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 04:30:05 +00:00
Reid Spencer
53a4b60a76 Correct the rules for making shared libraries per libtool 1.5.10
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16489 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-23 00:58:06 +00:00
Misha Brukman
c95759c2f5 Use the V8/V9 shared register file description
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16485 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-22 21:48:50 +00:00
Misha Brukman
c42077d371 Combine the F2 and F3 instruction classes into one file for simplicity
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16484 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-22 21:38:42 +00:00
Misha Brukman
31b5edd2e9 Fix file header path
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16483 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-22 21:29:12 +00:00
Misha Brukman
981eefd5f7 Prettify formatting of the file, adjust paths to making V8 a subdir of Sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16482 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-22 20:09:29 +00:00
Misha Brukman
2ec09e713e V8 is now a subdirectory of Sparc; adjust paths accordingly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16481 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-22 20:08:52 +00:00
Reid Spencer
358e685597 Update to add the HAVE_UINT64_T test and the STACK_DIRECTION indicator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16480 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-22 15:32:08 +00:00
Reid Spencer
023f212f3c 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16479 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-22 15:28:32 +00:00
Nate Begeman
a2de102a5b add optimized code sequences for setcc x, 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16478 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-22 04:40:25 +00:00
Chris Lattner
3d834bf2c3 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16473 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 21:35:23 +00:00
Alkis Evlogimenos
65cbfa0f37 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16472 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 21:22:11 +00:00
Misha Brukman
540c82a700 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16471 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 18:22:33 +00:00
Misha Brukman
a1dca55a3a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16470 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 18:22:19 +00:00
Misha Brukman
eae1bf10ea 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16469 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 18:21:21 +00:00
Chris Lattner
8cbee4ea5b Make sure to set the operand list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16466 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 17:30:54 +00:00
Reid Spencer
8b93e7ae4a Fix a problem where the mmap_file test was generating an incorrect test
program that always failed (wouldn't compile).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16465 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 17:14:44 +00:00
Reid Spencer
5d6c4a5581 Change the warning text so that NO warnings are permitted. This is now the
case since the AC_CONFIG_SUBDIRS problem has been fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16464 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 17:13:23 +00:00
Reid Spencer
c2186e23b6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16463 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 17:12:35 +00:00
Reid Spencer
91b538024a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16462 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 17:10:52 +00:00
Misha Brukman
323ed35e4f Thanks to Brad Jones for packed type support!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16461 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 16:54:37 +00:00
Misha Brukman
39dccd8130 Thanks to Brad for documentation on adding a DerivedType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16460 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 16:53:29 +00:00
Chris Lattner
e704e49ea7 This is an empty directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16459 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 16:26:13 +00:00
Chris Lattner
9c15698355 This is a dead directory now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16458 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-21 16:25:41 +00:00
Reid Spencer
641f7ef4fc Change the name of the "known" module for Java from llvm-java to Java.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16453 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 22:14:56 +00:00