oota-llvm.git
20 years agoReindent code, improve comments, move huge nested methods out of classes,
Chris Lattner [Thu, 30 Sep 2004 01:54:45 +0000 (01:54 +0000)]
Reindent code, improve comments, move huge nested methods out of classes,
prune #includes, add print/dump methods, etc.  No functionality changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16604 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDisable the 'WARNING: Found global types that are not compatible' warning
Chris Lattner [Thu, 30 Sep 2004 00:12:29 +0000 (00:12 +0000)]
Disable the 'WARNING: Found global types that are not compatible' warning
that always prints when linking programs to libstdc++ :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16603 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoChange the #ifdefs to allow compilation with a V8 compiler, but the JIT still
Misha Brukman [Wed, 29 Sep 2004 23:01:17 +0000 (23:01 +0000)]
Change the #ifdefs to allow compilation with a V8 compiler, but the JIT still
won't work if not compiled in V9 mode, currently by GCC only, because Sun's
system compiler does not tell us if it's a V8 or V9 system.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16602 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoHrm, debugging printouts do not need to be in here
Chris Lattner [Wed, 29 Sep 2004 21:21:14 +0000 (21:21 +0000)]
Hrm, debugging printouts do not need to be in here

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16598 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake sure to check select instructions for generic instruction properties
Chris Lattner [Wed, 29 Sep 2004 21:19:28 +0000 (21:19 +0000)]
Make sure to check select instructions for generic instruction properties

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16597 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUpdate list of shootout programs that should be working.
Brian Gaeke [Wed, 29 Sep 2004 20:45:06 +0000 (20:45 +0000)]
Update list of shootout programs that should be working.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16595 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTell the target description that calls clobber registers O0...O5.
Brian Gaeke [Wed, 29 Sep 2004 20:45:05 +0000 (20:45 +0000)]
Tell the target description that calls clobber registers O0...O5.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16594 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDon't use DominatorSet::dominates for intra-block instruction dom checks.
Chris Lattner [Wed, 29 Sep 2004 20:07:45 +0000 (20:07 +0000)]
Don't use DominatorSet::dominates for intra-block instruction dom checks.
This method is linear time in the size of the basic block, which is very
bad for large basic blocks.  On the Assembler/2004-09-29-VerifierIsReallySlow.llx
testcase, the verifier changes from taking 50s to 0.23s with this patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16593 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThe verifier takes 50s on this testcase, that is not good n stuff
Chris Lattner [Wed, 29 Sep 2004 20:07:25 +0000 (20:07 +0000)]
The verifier takes 50s on this testcase, that is not good n stuff

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16592 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFITOD is spelled "fitod", not "fitos". Ouch.
Brian Gaeke [Wed, 29 Sep 2004 19:59:07 +0000 (19:59 +0000)]
FITOD is spelled "fitod", not "fitos". Ouch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16591 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDon't use .quad to output double constants. The assembler must have a bug or
Brian Gaeke [Wed, 29 Sep 2004 19:59:06 +0000 (19:59 +0000)]
Don't use .quad to output double constants. The assembler must have a bug or
something, because the wrong bit patterns get output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16590 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Pull range optimization code out into new InsertRangeTest function.
Chris Lattner [Wed, 29 Sep 2004 17:40:11 +0000 (17:40 +0000)]
* Pull range optimization code out into new InsertRangeTest function.
* SubOne/AddOne functions always return ConstantInt, declare them as such
* Pull code for handling setcc X, cst, where cst is at the end of the range,
  or cc is LE or GE up earlier in visitSetCondInst.  This reduces #iterations
  in some cases.
* Fold: (div X, C1) op C2 -> range check, implementing div.ll:test6 - test9.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16588 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcasses for divides that can be eliminated.
Chris Lattner [Wed, 29 Sep 2004 17:37:07 +0000 (17:37 +0000)]
New testcasses for divides that can be eliminated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16587 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRecognize FpMOVD as a move.
Brian Gaeke [Wed, 29 Sep 2004 16:45:47 +0000 (16:45 +0000)]
Recognize FpMOVD as a move.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16586 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDo not insert trivially dead select instructions, which allows us to
Chris Lattner [Wed, 29 Sep 2004 05:43:32 +0000 (05:43 +0000)]
Do not insert trivially dead select instructions, which allows us to
potentially fold more in one pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16583 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFold binary expressions and casts into PHI nodes that have all constant inputs.
Chris Lattner [Wed, 29 Sep 2004 05:07:12 +0000 (05:07 +0000)]
Fold binary expressions and casts into PHI nodes that have all constant inputs.

This takes something like this:

%A = phi int [ 3, %cond_false.0 ], [ 2, %endif.0.i ], [ 2, %endif.1.i ]
%B = div int %tmp.243, 4

and turns it into:

%A = phi int [ 3/4, %cond_false.0 ], [ 2/4, %endif.0.i ], [ 2/4, %endif.1.i ]

which is later simplified (in this case) into %A = 0.

This triggers thousands of times in spec, for example, 269 times in 176.gcc.

This is tested by InstCombine/add.ll:test23 and set.ll:test18.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16582 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcases
Chris Lattner [Wed, 29 Sep 2004 05:06:12 +0000 (05:06 +0000)]
New testcases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16581 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoGenerate better code by being far less clever when it comes to the select instruction...
Nate Begeman [Wed, 29 Sep 2004 05:00:31 +0000 (05:00 +0000)]
Generate better code by being far less clever when it comes to the select instruction.  Don't create overlapping register lifetimes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16580 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoadd results
Brian Gaeke [Wed, 29 Sep 2004 03:48:55 +0000 (03:48 +0000)]
add results

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16579 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoimprove Type::BoolTy codegen by eliminating unnecessary clears and sign extends
Nate Begeman [Wed, 29 Sep 2004 03:45:33 +0000 (03:45 +0000)]
improve Type::BoolTy codegen by eliminating unnecessary clears and sign extends

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16578 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSimplify copyConstantToRegister() for longs, using a pair of recursive calls.
Brian Gaeke [Wed, 29 Sep 2004 03:34:41 +0000 (03:34 +0000)]
Simplify copyConstantToRegister() for longs, using a pair of recursive calls.
Copy constant-pool entries' addresses into registers before loading out of them,
to avoid errors from the assembler.
Handle loading call args past the 6th one off the stack.
Add IMPLICIT_DEF pseudo-instrs for double and long arguments passed in register
pairs.
Use FpMOVD to copy doubles around instead of the horrible store-load thing we
were doing before.
Handle 'ret double' and 'ret long'.
Fix a bug in handling 'and/or/xor long'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16577 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix bug recognizing moves: isMoveInstr should only treat ORs with %g0 as
Brian Gaeke [Wed, 29 Sep 2004 03:28:15 +0000 (03:28 +0000)]
Fix bug recognizing moves: isMoveInstr should only treat ORs with %g0 as
moves, not all ORs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16576 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUse FpMOVD pseudo-instruction to move doubles around.
Brian Gaeke [Wed, 29 Sep 2004 03:27:30 +0000 (03:27 +0000)]
Use FpMOVD pseudo-instruction to move doubles around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16575 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd new FpMOVD pseudo-instruction, used to move doubles around.
Brian Gaeke [Wed, 29 Sep 2004 03:27:29 +0000 (03:27 +0000)]
Add new FpMOVD pseudo-instruction, used to move doubles around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16574 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix double and long alignment.
Brian Gaeke [Wed, 29 Sep 2004 03:26:27 +0000 (03:26 +0000)]
Fix double and long alignment.
Call the FPMover pass after register allocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16573 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoPut quotes around argument to .section directive.
Brian Gaeke [Wed, 29 Sep 2004 03:25:40 +0000 (03:25 +0000)]
Put quotes around argument to .section directive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16572 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd createSparcV8FPMoverPass().
Brian Gaeke [Wed, 29 Sep 2004 03:25:39 +0000 (03:25 +0000)]
Add createSparcV8FPMoverPass().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16571 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoPass which converts FpMOVD (double move pseudoinstructions) to pairs
Brian Gaeke [Wed, 29 Sep 2004 03:24:34 +0000 (03:24 +0000)]
Pass which converts FpMOVD (double move pseudoinstructions) to pairs
of FMOVS instrs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16570 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMore testcases for recent instcombine patches
Chris Lattner [Wed, 29 Sep 2004 03:18:20 +0000 (03:18 +0000)]
More testcases for recent instcombine patches

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16569 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoHrm, really, all tests passed without this, but it is scary to think how...
Chris Lattner [Wed, 29 Sep 2004 03:16:24 +0000 (03:16 +0000)]
Hrm, really, all tests passed without this, but it is scary to think how...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16568 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove debugging printout
Chris Lattner [Wed, 29 Sep 2004 03:09:18 +0000 (03:09 +0000)]
Remove debugging printout
Instcombine (setcc (truncate X), C1).

This occurs THOUSANDS of times in many benchmarks.  Particularlly common
seem to be things like (seteq (cast bool X to int), int 0)

This turns it into (seteq bool %X, false), which then becomes (not %X).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16567 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTo go along with sabre's improved InstCombining, improve recognition of
Nate Begeman [Wed, 29 Sep 2004 02:35:05 +0000 (02:35 +0000)]
To go along with sabre's improved InstCombining, improve recognition of
integers that we can use as immediate values in instructions.

Example from yacr2:
-       lis r10, -1
-       ori r10, r10, 65535
-       add r28, r28, r10
+       addi r28, r28, -1
        addi r7, r7, 1
        addi r9, r9, 1
        b .LBB_main_9   ; loopentry.1.i214

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16566 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImprove validity checking of windows path names and fix file creation
Reid Spencer [Wed, 29 Sep 2004 00:01:17 +0000 (00:01 +0000)]
Improve validity checking of windows path names and fix file creation
problems.

Patch contributed by Jeff Cohen. Thanks Jeff!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16565 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUse llvm::sys::Path to destroy the file.
Reid Spencer [Tue, 28 Sep 2004 23:58:03 +0000 (23:58 +0000)]
Use llvm::sys::Path to destroy the file.

Patch contributed by Jeff Cohen. Thanks Jeff!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16564 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoWin32 implementation of TimeValue::now().
Reid Spencer [Tue, 28 Sep 2004 23:56:20 +0000 (23:56 +0000)]
Win32 implementation of TimeValue::now().

Patch contributed by Jeff Cohen. Thanks Jeff!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16563 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFreeBSD implementation of the TimeValue::now() method.
Reid Spencer [Tue, 28 Sep 2004 23:54:12 +0000 (23:54 +0000)]
FreeBSD implementation of the TimeValue::now() method.

Patch kindly contributed by Jeff Cohen. Thanks Jeff!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16562 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFold (X setcc C1) | (X setcc C2)
Chris Lattner [Tue, 28 Sep 2004 22:33:08 +0000 (22:33 +0000)]
Fold (X setcc C1) | (X setcc C2)

This implements or.ll:test1[89]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16561 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase
Chris Lattner [Tue, 28 Sep 2004 22:31:49 +0000 (22:31 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16560 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFold (and (setcc X, C1), (setcc X, C2))
Chris Lattner [Tue, 28 Sep 2004 21:48:02 +0000 (21:48 +0000)]
Fold (and (setcc X, C1), (setcc X, C2))

This is important for several reasons:

1. Benchmarks have lots of code that looks like this (perlbmk in particular):

  %tmp.2.i = setne int %tmp.0.i, 128              ; <bool> [#uses=1]
  %tmp.6343 = seteq int %tmp.0.i, 1               ; <bool> [#uses=1]
  %tmp.63 = and bool %tmp.2.i, %tmp.6343          ; <bool> [#uses=1]

   we now fold away the setne, a clear improvement.

2. In the more important cases, such as (X >= 10) & (X < 20), we now produce
   smaller code: (X-10) < 10.

3. Perhaps the nicest effect of this patch is that it really helps out the
   code generators.  In particular, for a 'range test' like the above,
   instead of generating this on X86 (the difference on PPC is even more
   pronounced):

        cmp %EAX, 50
        setge %CL
        cmp %EAX, 100
        setl %AL
        and %CL, %AL
        cmp %CL, 0

   we now generate this:

        add %EAX, -50
        cmp %EAX, 50

   Furthermore, this causes setcc's to be folded into branches more often.

These combinations trigger dozens of times in the spec benchmarks, particularly
in 176.gcc, 186.crafty, 253.perlbmk, 254.gap, & 099.go.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16559 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Add `deplibs' keyword for specifying a list of dependent libraries
Misha Brukman [Tue, 28 Sep 2004 21:46:18 +0000 (21:46 +0000)]
* Add `deplibs' keyword for specifying a list of dependent libraries
* Convert tabs to spaces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16558 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd `deplibs' keyword for specifying a list of dependent libraries
Misha Brukman [Tue, 28 Sep 2004 21:45:54 +0000 (21:45 +0000)]
Add `deplibs' keyword for specifying a list of dependent libraries

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16557 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcases
Chris Lattner [Tue, 28 Sep 2004 21:39:35 +0000 (21:39 +0000)]
New testcases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16556 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for the isLoad and isStore flags, needed by the instruction scheduler
Nate Begeman [Tue, 28 Sep 2004 21:29:00 +0000 (21:29 +0000)]
Add support for the isLoad and isStore flags, needed by the instruction scheduler

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16555 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for the isLoad and isStore flags, needed by the instruction scheduler
Nate Begeman [Tue, 28 Sep 2004 21:01:45 +0000 (21:01 +0000)]
Add support for the isLoad and isStore flags, needed by the instruction scheduler

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16554 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTurn the hasDelaySlot flag into the M_DELAY_SLOT_FLAG
Chris Lattner [Tue, 28 Sep 2004 18:38:01 +0000 (18:38 +0000)]
Turn the hasDelaySlot flag into the M_DELAY_SLOT_FLAG

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16553 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBe consistent with our naming
Chris Lattner [Tue, 28 Sep 2004 18:37:00 +0000 (18:37 +0000)]
Be consistent with our naming

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16552 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCapture delay slot info
Chris Lattner [Tue, 28 Sep 2004 18:34:14 +0000 (18:34 +0000)]
Capture delay slot info

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16551 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCapture information about whether the target instructions have delay slots
Chris Lattner [Tue, 28 Sep 2004 18:33:50 +0000 (18:33 +0000)]
Capture information about whether the target instructions have delay slots

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16550 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement X / C1 / C2 folding
Chris Lattner [Tue, 28 Sep 2004 18:22:15 +0000 (18:22 +0000)]
Implement X / C1 / C2 folding
Implement (setcc (shl X, C1), C2) folding.

The second one occurs several dozen times in spec.  The first was added
just in case.  :)

These are tested by shift.ll:test2[12], and div.ll:test5

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16549 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase
Chris Lattner [Tue, 28 Sep 2004 18:21:01 +0000 (18:21 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16548 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcases
Chris Lattner [Tue, 28 Sep 2004 18:18:35 +0000 (18:18 +0000)]
New testcases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16547 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoshl is always zero extending, so always use a zero extending shift right.
Chris Lattner [Tue, 28 Sep 2004 17:54:07 +0000 (17:54 +0000)]
shl is always zero extending, so always use a zero extending shift right.
This latent bug was exposed by recent changes, and is tested as:
llvm/test/Regression/Transforms/InstCombine/2004-09-28-BadShiftAndSetCC.llx

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16546 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase for a latent bug in instcombine that I have been chasing for
Chris Lattner [Tue, 28 Sep 2004 17:50:05 +0000 (17:50 +0000)]
New testcase for a latent bug in instcombine that I have been chasing for
1.5 days :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16545 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* InstructionReader.cpp was absorbed into Reader.cpp
Misha Brukman [Tue, 28 Sep 2004 16:58:12 +0000 (16:58 +0000)]
* InstructionReader.cpp was absorbed into Reader.cpp
* Wrap at 80 cols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16543 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix doxygen comment
Misha Brukman [Tue, 28 Sep 2004 16:57:46 +0000 (16:57 +0000)]
Fix doxygen comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16542 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTouch output files before reading or writing them, so that they are
Brian Gaeke [Tue, 28 Sep 2004 16:04:00 +0000 (16:04 +0000)]
Touch output files before reading or writing them, so that they are
always guaranteed to exist. This fixes PR444. Thanks to Alkis
for reporting the bug and testing the patch.
AddRecord used to return a big list, but that return value was never
used. So now it doesn't return anything.
Create the WebDir if it does not exist.
Fix a typo in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16541 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCorrected spelling of Makefile variable, thereby re-enabling profile
John Criswell [Tue, 28 Sep 2004 14:52:58 +0000 (14:52 +0000)]
Corrected spelling of Makefile variable, thereby re-enabling profile
builds for projects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16540 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd includes and use std:: for standard library calls to make code
Alkis Evlogimenos [Tue, 28 Sep 2004 14:42:44 +0000 (14:42 +0000)]
Add includes and use std:: for standard library calls to make code
compile on windows. This patch was contributed by Paolo Invernizzi.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16539 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBug fixed
Chris Lattner [Tue, 28 Sep 2004 03:45:22 +0000 (03:45 +0000)]
Bug fixed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16538 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTestcase for LLVM PR445
Chris Lattner [Tue, 28 Sep 2004 03:36:39 +0000 (03:36 +0000)]
Testcase for LLVM PR445

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16537 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSince we use alloca now make sure we include the proper headers for it.
Alkis Evlogimenos [Tue, 28 Sep 2004 02:53:15 +0000 (02:53 +0000)]
Since we use alloca now make sure we include the proper headers for it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16536 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUse alloca instead of a C99 style array. This should fix the
Alkis Evlogimenos [Tue, 28 Sep 2004 02:47:38 +0000 (02:47 +0000)]
Use alloca instead of a C99 style array. This should fix the
compilation problem in windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16535 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoPull assignment out of for loop conditional in order for this to
Alkis Evlogimenos [Tue, 28 Sep 2004 02:40:37 +0000 (02:40 +0000)]
Pull assignment out of for loop conditional in order for this to
compile under windows. Patch contributed by Paolo Invernizzi!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16534 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix includes. Patch contributed by Paolo Invernizzi!
Alkis Evlogimenos [Tue, 28 Sep 2004 02:38:58 +0000 (02:38 +0000)]
Fix includes. Patch contributed by Paolo Invernizzi!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16533 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase that crashes the C++ FE, encountered while working on PR445
Chris Lattner [Tue, 28 Sep 2004 02:29:40 +0000 (02:29 +0000)]
New testcase that crashes the C++ FE, encountered while working on PR445

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16532 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUse class instead of struct for defining classes. This unbreaks the
Alkis Evlogimenos [Tue, 28 Sep 2004 01:59:17 +0000 (01:59 +0000)]
Use class instead of struct for defining classes. This unbreaks the
build on windows. Patch contributed by Paolo Invernizzi!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16531 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoPatch contributed by Patrick Meredith:
Chris Lattner [Mon, 27 Sep 2004 21:51:25 +0000 (21:51 +0000)]
Patch contributed by Patrick Meredith:

added notes on the fact that the current implementation uses
sbyte* for va_list.  Updated all occurances of valist to va_list (it was
inconsistant and find/replace is so easy ;-) ).  Added <...> around all
occurances of va_list in the intrinsic functions to match the vaarg and
vanext instructions and to further show that va_list is a variable type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16530 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix grammar.
Misha Brukman [Mon, 27 Sep 2004 20:35:59 +0000 (20:35 +0000)]
Fix grammar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16529 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix two bugs: one where a condition was mistakenly swapped, and another
Chris Lattner [Mon, 27 Sep 2004 19:29:18 +0000 (19:29 +0000)]
Fix two bugs: one where a condition was mistakenly swapped, and another
where we folded (X & 254) -> X < 1 instead of X < 2.  These problems were
latent problems exposed by the latest patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16528 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase
Chris Lattner [Mon, 27 Sep 2004 19:25:20 +0000 (19:25 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16527 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSparcV8 int regs are not only 32-bits in width, but they are 32-bit aligned!
Misha Brukman [Mon, 27 Sep 2004 18:22:18 +0000 (18:22 +0000)]
SparcV8 int regs are not only 32-bits in width, but they are 32-bit aligned!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16526 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThe system ranlib on darwin occasionally adds two extra newlines to the
Chris Lattner [Mon, 27 Sep 2004 16:59:06 +0000 (16:59 +0000)]
The system ranlib on darwin occasionally adds two extra newlines to the
end of files, breaking the CFE build.  As a gross hack around this,
ignore any trailing garbage on bytecode files.  Thanks to Brian for digging
in and identifying the problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16525 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoHrm, if there is an error loading a file, try printing a message so the
Chris Lattner [Mon, 27 Sep 2004 16:41:01 +0000 (16:41 +0000)]
Hrm, if there is an error loading a file, try printing a message so the
user knows that...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16524 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTestcases for rev 250 of InstructionCombining.cpp
Chris Lattner [Mon, 27 Sep 2004 16:21:26 +0000 (16:21 +0000)]
Testcases for rev 250 of InstructionCombining.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16522 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFold: (setcc (shr X, ShAmt), CI), where 'cc' is eq or ne. This xform
Chris Lattner [Mon, 27 Sep 2004 16:18:50 +0000 (16:18 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16521 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImprove warning
Alkis Evlogimenos [Mon, 27 Sep 2004 07:35:19 +0000 (07:35 +0000)]
Improve warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16520 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCorrect some BuildMI arguments for the upcoming simple scheduler
Nate Begeman [Mon, 27 Sep 2004 05:08:17 +0000 (05:08 +0000)]
Correct some BuildMI arguments for the upcoming simple scheduler

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16519 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix the copy-pasto that Brian noticed: V8 int regs are 32-bits wide, not 64.
Misha Brukman [Sun, 26 Sep 2004 21:07:43 +0000 (21:07 +0000)]
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

20 years agoAdd some missing #includes
Reid Spencer [Sat, 25 Sep 2004 16:00:07 +0000 (16:00 +0000)]
Add some missing #includes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16517 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoQualify Path with sys:: namespace so this file compiles.
Reid Spencer [Sat, 25 Sep 2004 15:59:41 +0000 (15:59 +0000)]
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

20 years agoUpdated to reflect changes in the interface of TimeValue::now().
Reid Spencer [Sat, 25 Sep 2004 08:32:37 +0000 (08:32 +0000)]
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

20 years agoClean up the interface of TimeValue:
Reid Spencer [Sat, 25 Sep 2004 08:29:54 +0000 (08:29 +0000)]
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

20 years agoAdded stub implementations of TimeValue concept for remaining platforms.
Reid Spencer [Sat, 25 Sep 2004 05:03:54 +0000 (05:03 +0000)]
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

20 years agoWrap to 80 cols.
Reid Spencer [Sat, 25 Sep 2004 05:03:22 +0000 (05:03 +0000)]
Wrap to 80 cols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16512 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoInitial implementation of the TimeValue abstraction.
Reid Spencer [Fri, 24 Sep 2004 23:25:19 +0000 (23:25 +0000)]
Initial implementation of the TimeValue abstraction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16511 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUpdated the last two header files so that they are configured with
John Criswell [Fri, 24 Sep 2004 21:19:06 +0000 (21:19 +0000)]
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

20 years agoModified hash_map and hash_set configuration so that they are not
John Criswell [Fri, 24 Sep 2004 18:28:00 +0000 (18:28 +0000)]
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

20 years agoImplement shift-and combinations, implementing InstCombine/and.ll:test19-21
Chris Lattner [Fri, 24 Sep 2004 15:21:34 +0000 (15:21 +0000)]
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

20 years agoAdd some tests for shr-and folding
Chris Lattner [Fri, 24 Sep 2004 15:18:43 +0000 (15:18 +0000)]
Add some tests for shr-and folding

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16507 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoConfigure Datatypes.h.in with AC_CONFIG_HEADERS. This should prevent it
John Criswell [Fri, 24 Sep 2004 13:28:51 +0000 (13:28 +0000)]
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

20 years agoMove LHSI->hasOneUse() into the arms of the conditional, reindenting code.
Chris Lattner [Thu, 23 Sep 2004 21:52:49 +0000 (21:52 +0000)]
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

20 years agoImplement Transforms/InstCombine/and.ll:test18, a case that occurs 20 times
Chris Lattner [Thu, 23 Sep 2004 21:46:38 +0000 (21:46 +0000)]
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

20 years agoNew testcase for a pattern that occurs 20 times in perlbmk
Chris Lattner [Thu, 23 Sep 2004 21:42:49 +0000 (21:42 +0000)]
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

20 years agoAdd a blurb about the use of class vs. struct keyword in class decls.
Reid Spencer [Thu, 23 Sep 2004 16:03:48 +0000 (16:03 +0000)]
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

20 years agoImplement select.ll:test16: fold load (select C, X, null) -> load X
Chris Lattner [Thu, 23 Sep 2004 15:46:00 +0000 (15:46 +0000)]
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

20 years agoload null is undefined behavior, this should fold
Chris Lattner [Thu, 23 Sep 2004 15:45:20 +0000 (15:45 +0000)]
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

20 years agoChange Value from a "struct" to a "class" so that VC 7.1 doesn't generate
Reid Spencer [Thu, 23 Sep 2004 14:49:45 +0000 (14:49 +0000)]
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

20 years agoPatch for MINGW. Patch provided by Henrik Bach.
Reid Spencer [Thu, 23 Sep 2004 14:47:10 +0000 (14:47 +0000)]
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

20 years agoMissed one $*.a -> $@ conversion for the Release build.
Reid Spencer [Thu, 23 Sep 2004 06:07:24 +0000 (06:07 +0000)]
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

20 years agoFix the last of the major PPC GEP folding deficiencies. This will allow
Nate Begeman [Thu, 23 Sep 2004 05:31:33 +0000 (05:31 +0000)]
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