Commit Graph

14439 Commits

Author SHA1 Message Date
Chris Lattner fbfb4d43c4 Testcases for rev 250 of InstructionCombining.cpp
llvm-svn: 16522
2004-09-27 16:21:26 +00:00
Chris Lattner 1023b8726e Fold: (setcc (shr X, ShAmt), CI), where 'cc' is eq or ne. This xform
triggers often, for example:

6x in povray, 1x in gzip, 279x in gcc, 1x in crafty, 8x in eon, 11x in perlbmk,
362x in gap, 4x in vortex, 14 in m88ksim, 211x in 126.gcc, 1x in compress,
11x in ijpeg, and 4x in 147.vortex.

llvm-svn: 16521
2004-09-27 16:18:50 +00:00
Alkis Evlogimenos 2622728248 Improve warning
llvm-svn: 16520
2004-09-27 07:35:19 +00:00
Nate Begeman 8656a156cf Correct some BuildMI arguments for the upcoming simple scheduler
llvm-svn: 16519
2004-09-27 05:08:17 +00:00
Misha Brukman a68d76ebfa Fix the copy-pasto that Brian noticed: V8 int regs are 32-bits wide, not 64.
llvm-svn: 16518
2004-09-26 21:07:43 +00:00
Reid Spencer 58ab77db8e Add some missing #includes
llvm-svn: 16517
2004-09-25 16:00:07 +00:00
Reid Spencer 6c0c9424f6 Qualify Path with sys:: namespace so this file compiles.
llvm-svn: 16516
2004-09-25 15:59:41 +00:00
Reid Spencer f71143c3e5 Updated to reflect changes in the interface of TimeValue::now().
llvm-svn: 16515
2004-09-25 08:32:37 +00:00
Reid Spencer 004ef2847b 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.

llvm-svn: 16514
2004-09-25 08:29:54 +00:00
Reid Spencer 1cc1994edf Added stub implementations of TimeValue concept for remaining platforms.
llvm-svn: 16513
2004-09-25 05:03:54 +00:00
Reid Spencer 8b2f9a298d Wrap to 80 cols.
llvm-svn: 16512
2004-09-25 05:03:22 +00:00
Reid Spencer ca141a5b28 Initial implementation of the TimeValue abstraction.
llvm-svn: 16511
2004-09-24 23:25:19 +00:00
John Criswell 71c8d5eae9 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.

llvm-svn: 16510
2004-09-24 21:19:06 +00:00
John Criswell 08e722647a Modified hash_map and hash_set configuration so that they are not
regenerated on every run of configure.

llvm-svn: 16509
2004-09-24 18:28:00 +00:00
Chris Lattner 7e794273f5 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.

llvm-svn: 16508
2004-09-24 15:21:34 +00:00
Chris Lattner 8c1c691755 Add some tests for shr-and folding
llvm-svn: 16507
2004-09-24 15:18:43 +00:00
John Criswell 3ed86d7540 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.

llvm-svn: 16506
2004-09-24 13:28:51 +00:00
Chris Lattner e1b4d2a470 Move LHSI->hasOneUse() into the arms of the conditional, reindenting code.
No functionality changes here.

llvm-svn: 16505
2004-09-23 21:52:49 +00:00
Chris Lattner 8fc5af4da9 Implement Transforms/InstCombine/and.ll:test18, a case that occurs 20 times
in perlbmk

llvm-svn: 16504
2004-09-23 21:46:38 +00:00
Chris Lattner 45a5ace32e New testcase for a pattern that occurs 20 times in perlbmk
llvm-svn: 16503
2004-09-23 21:42:49 +00:00
Reid Spencer bf6439fd27 Add a blurb about the use of class vs. struct keyword in class decls.
llvm-svn: 16500
2004-09-23 16:03:48 +00:00
Chris Lattner bdcf41a8a2 Implement select.ll:test16: fold load (select C, X, null) -> load X
llvm-svn: 16499
2004-09-23 15:46:00 +00:00
Chris Lattner fb4735980b load null is undefined behavior, this should fold
llvm-svn: 16498
2004-09-23 15:45:20 +00:00
Reid Spencer 3e95e7c99c Change Value from a "struct" to a "class" so that VC 7.1 doesn't generate
missing symbols when its referenced as a class.

llvm-svn: 16496
2004-09-23 14:49:45 +00:00
Reid Spencer 9904928ea3 Patch for MINGW. Patch provided by Henrik Bach.
llvm-svn: 16495
2004-09-23 14:47:10 +00:00
Reid Spencer 898eca3260 Missed one $*.a -> $@ conversion for the Release build.
llvm-svn: 16494
2004-09-23 06:07:24 +00:00
Nate Begeman 49cf74b26c 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.

llvm-svn: 16493
2004-09-23 05:31:33 +00:00
Alkis Evlogimenos 04da4252c0 Update email address
llvm-svn: 16492
2004-09-23 04:39:30 +00:00
Chris Lattner 29cf9a32e2 Grrr... I shouldn't have to do this one :)
llvm-svn: 16491
2004-09-23 04:36:01 +00:00
Chris Lattner 9544766cd3 Update credits
llvm-svn: 16490
2004-09-23 04:30:05 +00:00
Reid Spencer ef18cc48db Correct the rules for making shared libraries per libtool 1.5.10
llvm-svn: 16489
2004-09-23 00:58:06 +00:00
Misha Brukman 379a05b52a Use the V8/V9 shared register file description
llvm-svn: 16485
2004-09-22 21:48:50 +00:00
Misha Brukman 3c08658d56 Combine the F2 and F3 instruction classes into one file for simplicity
llvm-svn: 16484
2004-09-22 21:38:42 +00:00
Misha Brukman efce1ef9c3 Fix file header path
llvm-svn: 16483
2004-09-22 21:29:12 +00:00
Misha Brukman 009aaf9968 Prettify formatting of the file, adjust paths to making V8 a subdir of Sparc
llvm-svn: 16482
2004-09-22 20:09:29 +00:00
Misha Brukman d55f854a5d V8 is now a subdirectory of Sparc; adjust paths accordingly
llvm-svn: 16481
2004-09-22 20:08:52 +00:00
Reid Spencer 3c20f4b59f 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 c4eb57c525 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 033b816171 add optimized code sequences for setcc x, 0
llvm-svn: 16478
2004-09-22 04:40:25 +00:00
Chris Lattner b121ae1cec 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 89dd63733a 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 6b17bf7193 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 87201ce8f9 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 43bd39e04e 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 0f28cce60c Make sure to set the operand list
llvm-svn: 16466
2004-09-21 17:30:54 +00:00
Reid Spencer 5a6815d332 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 d057f2bc56 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 c6f9e0f512 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 7c3d8c0af8 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 62041800ed Thanks to Brad Jones for packed type support!
llvm-svn: 16461
2004-09-21 16:54:37 +00:00