oota-llvm.git
18 years agoKeep Visual Studio happy.
Jeff Cohen [Wed, 3 May 2006 00:28:50 +0000 (00:28 +0000)]
Keep Visual Studio happy.

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

18 years agoSimplify some code
Chris Lattner [Wed, 3 May 2006 00:13:06 +0000 (00:13 +0000)]
Simplify some code

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

18 years agoSeveral related changes:
Chris Lattner [Tue, 2 May 2006 23:22:24 +0000 (23:22 +0000)]
Several related changes:

1. Change several methods in the MachineCodeEmitter class to be pure virtual.
2. Suck emitConstantPool/initJumpTableInfo into startFunction, removing them
   from the MachineCodeEmitter interface, and reducing the amount of target-
   specific code.
3. Change the JITEmitter so that it allocates constantpools and jump tables
   *right* next to the functions that they belong to, instead of in a separate
   pool of memory.  This makes all memory for a function be contiguous, and
   means the JITEmitter only tracks one block of memory now.

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

18 years agoAdd a method for allocating space from the code buffer.
Chris Lattner [Tue, 2 May 2006 22:51:03 +0000 (22:51 +0000)]
Add a method for allocating space from the code buffer.

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

18 years agoRemove some stuff from the README
Nate Begeman [Tue, 2 May 2006 22:43:31 +0000 (22:43 +0000)]
Remove some stuff from the README

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

18 years agoDo not make the JIT memory manager manage the memory for globals. Instead
Chris Lattner [Tue, 2 May 2006 21:57:51 +0000 (21:57 +0000)]
Do not make the JIT memory manager manage the memory for globals.  Instead
just have the JIT malloc them.

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

18 years agoMinor cleanups, no functionality change.
Chris Lattner [Tue, 2 May 2006 21:44:14 +0000 (21:44 +0000)]
Minor cleanups, no functionality change.

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

18 years agoFix a purely hypothetical problem (for now): emitWord emits in the host
Chris Lattner [Tue, 2 May 2006 19:14:47 +0000 (19:14 +0000)]
Fix a purely hypothetical problem (for now): emitWord emits in the host
byte format.  This doesn't work when using the code emitter in a cross target
environment.  Since the code emitter is only really used by the JIT, this
isn't a current problem, but if we ever start emitting .o files, it would be.

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

18 years agoRefactor the machine code emitter interface to pull the pointers for the current
Chris Lattner [Tue, 2 May 2006 18:27:26 +0000 (18:27 +0000)]
Refactor the machine code emitter interface to pull the pointers for the current
code emission location into the base class, instead of being in the derived classes.

This change means that low-level methods like emitByte/emitWord now are no longer
virtual (yaay for speed), and we now have a framework to support growable code
segments.  This implements feature request #1 of PR469.

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

18 years agoSince we don't handle callee-save CRs right yet, don't allocate them. Also
Nate Begeman [Tue, 2 May 2006 17:37:31 +0000 (17:37 +0000)]
Since we don't handle callee-save CRs right yet, don't allocate them.  Also
don't step on R11 in the middle of a function when saving and restoring CRs

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

18 years agoPrint function number instead of name
Nate Begeman [Tue, 2 May 2006 17:36:46 +0000 (17:36 +0000)]
Print function number instead of name

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

18 years agoHooray, everyone now uses the same printBasicBlockLabel implementation
Nate Begeman [Tue, 2 May 2006 17:34:51 +0000 (17:34 +0000)]
Hooray, everyone now uses the same printBasicBlockLabel implementation

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

18 years agoRemove dead method
Chris Lattner [Tue, 2 May 2006 17:20:28 +0000 (17:20 +0000)]
Remove dead method

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

18 years agoRemove a now-dead method
Chris Lattner [Tue, 2 May 2006 17:17:13 +0000 (17:17 +0000)]
Remove a now-dead method

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

18 years agoThere is no reason to use a virtual method to store this word.
Chris Lattner [Tue, 2 May 2006 17:16:20 +0000 (17:16 +0000)]
There is no reason to use a virtual method to store this word.

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

18 years agoRemove the debug machine code emitter. The "FilePrinterEmitter" is moreuseful for...
Chris Lattner [Tue, 2 May 2006 16:59:49 +0000 (16:59 +0000)]
Remove the debug machine code emitter.  The "FilePrinterEmitter" is moreuseful for debugging.

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

18 years agoRemove the debug machine code emitter. The "FilePrinterEmitter" is more
Chris Lattner [Tue, 2 May 2006 16:59:24 +0000 (16:59 +0000)]
Remove the debug machine code emitter.  The "FilePrinterEmitter" is more
useful for debugging.

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

18 years agoExtend printBasicBlockLabel a bit so that it can be used to print all
Nate Begeman [Tue, 2 May 2006 05:37:32 +0000 (05:37 +0000)]
Extend printBasicBlockLabel a bit so that it can be used to print all
basic block labels, consolidating the code to do so in one place for each
target.

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

18 years agoUpdate the PPC compilation callback code to not need weird abi-violating
Nate Begeman [Tue, 2 May 2006 04:50:05 +0000 (04:50 +0000)]
Update the PPC compilation callback code to not need weird abi-violating
prologs and epilogs, keep all the asm in one place, and remove use of
compiler builtin functions.

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

18 years agoAdd pass ID's for various passes, so they can be AddRequiredID. Patch by
Chris Lattner [Tue, 2 May 2006 04:24:36 +0000 (04:24 +0000)]
Add pass ID's for various passes, so they can be AddRequiredID.  Patch by
Domagoj Babic!

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

18 years agoDe-virtualize SwitchSection.
Jeff Cohen [Tue, 2 May 2006 03:58:45 +0000 (03:58 +0000)]
De-virtualize SwitchSection.

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

18 years agoDe-virtualize EmitZeroes.
Jeff Cohen [Tue, 2 May 2006 03:46:13 +0000 (03:46 +0000)]
De-virtualize EmitZeroes.

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

18 years agoFinish support for Microsoft ML/MASM. May still be a few rough edges.
Jeff Cohen [Tue, 2 May 2006 03:11:50 +0000 (03:11 +0000)]
Finish support for Microsoft ML/MASM.  May still be a few rough edges.

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

18 years agoMake Intel syntax mode friendlier to Microsoft ML assembler (still needs more work).
Jeff Cohen [Tue, 2 May 2006 01:16:28 +0000 (01:16 +0000)]
Make Intel syntax mode friendlier to Microsoft ML assembler (still needs more work).

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

18 years agoPut instruction names into the first non TargetInstrInfo namespace found.
Chris Lattner [Mon, 1 May 2006 23:46:16 +0000 (23:46 +0000)]
Put instruction names into the first non TargetInstrInfo namespace found.

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

18 years agoNew testcase that crashes the new CFE.
Chris Lattner [Mon, 1 May 2006 23:18:55 +0000 (23:18 +0000)]
New testcase that crashes the new CFE.

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

18 years agoFix a latent bug that my spiller patch last week exposed: we were leaving
Chris Lattner [Mon, 1 May 2006 22:03:24 +0000 (22:03 +0000)]
Fix a latent bug that my spiller patch last week exposed: we were leaving
instructions in the virtregfolded map that were deleted.  Because they
were deleted, newly allocated instructions could end up at the same address,
magically finding themselves in the map.  The solution is to remove entries
from the map when we delete the instructions.

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

18 years agoWhen promoting a load to a reg-reg copy, where the load was a previous
Chris Lattner [Mon, 1 May 2006 21:17:10 +0000 (21:17 +0000)]
When promoting a load to a reg-reg copy, where the load was a previous
instruction folded with spill code, make sure the remove the load from
the virt reg folded map.

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

18 years agoRemove previous patch, which wasn't quite right.
Chris Lattner [Mon, 1 May 2006 21:16:03 +0000 (21:16 +0000)]
Remove previous patch, which wasn't quite right.

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

18 years agoinstructions can be in different namespaces. Make sure to use the right
Chris Lattner [Mon, 1 May 2006 17:01:17 +0000 (17:01 +0000)]
instructions can be in different namespaces.  Make sure to use the right
one for each instruction.

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

18 years agoPut PHI/INLINEASM into the correct namespace.
Chris Lattner [Mon, 1 May 2006 17:00:49 +0000 (17:00 +0000)]
Put PHI/INLINEASM into the correct namespace.

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

18 years agoFormating
Evan Cheng [Mon, 1 May 2006 09:30:17 +0000 (09:30 +0000)]
Formating

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

18 years agoDis-favor stores more
Evan Cheng [Mon, 1 May 2006 09:20:44 +0000 (09:20 +0000)]
Dis-favor stores more

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

18 years agoBottom up register-pressure reduction scheduler now pushes store operations
Evan Cheng [Mon, 1 May 2006 09:14:40 +0000 (09:14 +0000)]
Bottom up register-pressure reduction scheduler now pushes store operations
up the schedule. This helps code that looks like this:

loads ...
computations (first set) ...
stores (first set) ...
loads
computations (seccond set) ...
stores (seccond set) ...

Without this change, the stores and computations are more likely to
interleave:

loads ...
loads ...
computations (first set) ...
computations (second set) ...
computations (first set) ...
stores (first set) ...
computations (second set) ...
stores (stores set) ...

This can increase the number of spills if we are unlucky.

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

18 years agoMark instructions whose pattern is (store ...) isStore.
Evan Cheng [Mon, 1 May 2006 09:04:20 +0000 (09:04 +0000)]
Mark instructions whose pattern is (store ...) isStore.

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

18 years agoDidn't mean ScheduleDAGList.cpp to make the last checkin.
Evan Cheng [Mon, 1 May 2006 08:56:34 +0000 (08:56 +0000)]
Didn't mean ScheduleDAGList.cpp to make the last checkin.

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

18 years agoRemove temp. option -spiller-check-liveout, it didn't cause any failure nor performan...
Evan Cheng [Mon, 1 May 2006 08:54:57 +0000 (08:54 +0000)]
Remove temp. option -spiller-check-liveout, it didn't cause any failure nor performance regressions.

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

18 years agoIntel mode no longer uses %'s on registers
Chris Lattner [Mon, 1 May 2006 05:56:51 +0000 (05:56 +0000)]
Intel mode no longer uses %'s on registers

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

18 years agoRemove %'s from register names when in intel mode.
Chris Lattner [Mon, 1 May 2006 05:53:50 +0000 (05:53 +0000)]
Remove %'s from register names when in intel mode.

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

18 years agoFormat #APP lines a bit nicer
Chris Lattner [Mon, 1 May 2006 04:11:03 +0000 (04:11 +0000)]
Format #APP lines a bit nicer

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

18 years agoLocal spiller kills a store if the folded restore is turned into a copy.
Evan Cheng [Sun, 30 Apr 2006 08:41:47 +0000 (08:41 +0000)]
Local spiller kills a store if the folded restore is turned into a copy.
But this is incorrect if the spilled value live range extends beyond the
current BB.
It is currently controlled by a temporary option -spiller-check-liveout.

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

18 years agoMingw32 patches supplied by Anton Korobeynikov.
Jeff Cohen [Sat, 29 Apr 2006 18:41:44 +0000 (18:41 +0000)]
Mingw32 patches supplied by Anton Korobeynikov.

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

18 years agoRemove a bogus transformation. This fixes SingleSource/UnitTests/2006-01-23-Initiali...
Chris Lattner [Fri, 28 Apr 2006 23:33:20 +0000 (23:33 +0000)]
Remove a bogus transformation.  This fixes SingleSource/UnitTests/2006-01-23-InitializedBitField.c
with some changes I have to the new CFE.

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

18 years agoI can't spell: Register, not Regsiter.
Evan Cheng [Fri, 28 Apr 2006 23:19:39 +0000 (23:19 +0000)]
I can't spell: Register, not Regsiter.

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

18 years agoImplemented x86 inline asm b, h, w, k modifiers.
Evan Cheng [Fri, 28 Apr 2006 23:11:40 +0000 (23:11 +0000)]
Implemented x86 inline asm b, h, w, k modifiers.

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

18 years agoFix InstCombine/2006-04-28-ShiftShiftLongLong.ll
Chris Lattner [Fri, 28 Apr 2006 22:21:41 +0000 (22:21 +0000)]
Fix InstCombine/2006-04-28-ShiftShiftLongLong.ll

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

18 years agonew testcase miscompiled by instcombine
Chris Lattner [Fri, 28 Apr 2006 22:17:20 +0000 (22:17 +0000)]
new testcase miscompiled by instcombine

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

18 years agoFix CodeGen/Generic/2006-04-28-Sign-extend-bool.ll
Chris Lattner [Fri, 28 Apr 2006 21:56:10 +0000 (21:56 +0000)]
Fix CodeGen/Generic/2006-04-28-Sign-extend-bool.ll

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

18 years agotestcase that crashes the ppc backend, which can't sextinreg(i1)
Chris Lattner [Fri, 28 Apr 2006 21:52:24 +0000 (21:52 +0000)]
testcase that crashes the ppc backend, which can't sextinreg(i1)

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

18 years agoInitial caller side support (for CCC only, not FastCC) of 128-bit vector
Evan Cheng [Fri, 28 Apr 2006 21:29:37 +0000 (21:29 +0000)]
Initial caller side support (for CCC only, not FastCC) of 128-bit vector
passing by value.

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

18 years agoBare-bone X86 inline asm printer support.
Evan Cheng [Fri, 28 Apr 2006 21:19:05 +0000 (21:19 +0000)]
Bare-bone X86 inline asm printer support.

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

18 years agoUpdate. It should use two shufps, not three!
Evan Cheng [Fri, 28 Apr 2006 18:55:34 +0000 (18:55 +0000)]
Update. It should use two shufps, not three!

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

18 years agoRemove the temporary option: -no-isel-fold-inflight
Evan Cheng [Fri, 28 Apr 2006 18:54:11 +0000 (18:54 +0000)]
Remove the temporary option: -no-isel-fold-inflight

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

18 years agoImplement four-wide shuffle with 2 shufps if no more than two elements come
Evan Cheng [Fri, 28 Apr 2006 07:03:38 +0000 (07:03 +0000)]
Implement four-wide shuffle with 2 shufps if no more than two elements come
from each vector. e.g.
        shuffle(G1, G2, 7, 1, 5, 2)
==>
        movaps _G2, %xmm0
        shufps $151, _G1, %xmm0
        shufps $216, %xmm0, %xmm0

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

18 years agoFix PR743: emit -help output of a tool to cout, not cerr.
Chris Lattner [Fri, 28 Apr 2006 05:36:25 +0000 (05:36 +0000)]
Fix PR743: emit -help output of a tool to cout, not cerr.

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

18 years agoTargetLowering::LowerArguments should return a VBIT_CONVERT of
Evan Cheng [Fri, 28 Apr 2006 05:25:15 +0000 (05:25 +0000)]
TargetLowering::LowerArguments should return a VBIT_CONVERT of
FORMAL_ARGUMENTS SDOperand in the return result vector.

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

18 years agoMapping of physregs can make it so that the designated and input physregs are
Chris Lattner [Fri, 28 Apr 2006 04:43:18 +0000 (04:43 +0000)]
Mapping of physregs can make it so that the designated and input physregs are
the same.  In this case, don't emit a noop copy.

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

18 years agoFix Transforms/Reassociate/2006-04-27-ReassociateVector.ll
Chris Lattner [Fri, 28 Apr 2006 04:14:49 +0000 (04:14 +0000)]
Fix Transforms/Reassociate/2006-04-27-ReassociateVector.ll

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

18 years agonew testcase
Chris Lattner [Fri, 28 Apr 2006 04:14:29 +0000 (04:14 +0000)]
new testcase

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

18 years agoUse movaps instead of movapd for spill / restore.
Evan Cheng [Fri, 28 Apr 2006 02:23:35 +0000 (02:23 +0000)]
Use movaps instead of movapd for spill / restore.

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

18 years agoAdded a temporary option -no-isel-fold-inflight to control whether a "inflight"
Evan Cheng [Fri, 28 Apr 2006 02:09:19 +0000 (02:09 +0000)]
Added a temporary option -no-isel-fold-inflight to control whether a "inflight"
node can be folded.

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

18 years agoWhen isel'ing a node, mark its operands "InFlight" before selecting them. These
Evan Cheng [Fri, 28 Apr 2006 02:08:10 +0000 (02:08 +0000)]
When isel'ing a node, mark its operands "InFlight" before selecting them. These
nodes should not be folded into other nodes.
This fixes the miscompilation of PR 749.
Temporarily under flag control.

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

18 years agoWhen we have a two-address instruction where the input cannot be clobbered
Chris Lattner [Fri, 28 Apr 2006 01:46:50 +0000 (01:46 +0000)]
When we have a two-address instruction where the input cannot be clobbered
and is already available, instead of falling back to emitting a load, fall
back to emitting a reg-reg copy.  This generates significantly better code
for some SSE testcases, as SSE has lots of two-address instructions and
none of them are read/modify/write.  As one example, this change does:

        pshufd %XMM5, XMMWORD PTR [%ESP + 84], 255
        xorps %XMM2, %XMM5
        cmpltps %XMM1, %XMM0
-       movaps XMMWORD PTR [%ESP + 52], %XMM0
-       movapd %XMM6, XMMWORD PTR [%ESP + 52]
+       movaps %XMM6, %XMM0
        cmpltps %XMM6, XMMWORD PTR [%ESP + 68]
        movapd XMMWORD PTR [%ESP + 52], %XMM6
        movaps %XMM6, %XMM0
        cmpltps %XMM6, XMMWORD PTR [%ESP + 36]
        cmpltps %XMM3, %XMM0
-       movaps XMMWORD PTR [%ESP + 20], %XMM0
-       movapd %XMM7, XMMWORD PTR [%ESP + 20]
+       movaps %XMM7, %XMM0
        cmpltps %XMM7, XMMWORD PTR [%ESP + 4]
        movapd XMMWORD PTR [%ESP + 20], %XMM7
        cmpltps %XMM4, %XMM0

... which is far better than a store followed by a load!

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

18 years agoTest case for PR748
Evan Cheng [Fri, 28 Apr 2006 01:21:37 +0000 (01:21 +0000)]
Test case for PR748

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

18 years agoAdd a note
Chris Lattner [Fri, 28 Apr 2006 00:04:05 +0000 (00:04 +0000)]
Add a note

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

18 years agoAdd a note
Chris Lattner [Thu, 27 Apr 2006 21:40:57 +0000 (21:40 +0000)]
Add a note

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

18 years agoAdd support for inserting undef into a vector. This implements
Chris Lattner [Thu, 27 Apr 2006 21:14:21 +0000 (21:14 +0000)]
Add support for inserting undef into a vector.  This implements
Transforms/InstCombine/vec_insert_to_shuffle.ll

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

18 years agoThis should turn into one vector shuffle instruction.
Chris Lattner [Thu, 27 Apr 2006 21:13:58 +0000 (21:13 +0000)]
This should turn into one vector shuffle instruction.

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

18 years agoMake x86 isel lowering produce tailcall nodes. They are match to normal calls
Evan Cheng [Thu, 27 Apr 2006 08:40:39 +0000 (08:40 +0000)]
Make x86 isel lowering produce tailcall nodes. They are match to normal calls
for now.

Patch contributed by Alexander Friedman.

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

18 years agoA couple of new entries.
Evan Cheng [Thu, 27 Apr 2006 08:31:33 +0000 (08:31 +0000)]
A couple of new entries.

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

18 years agoSupport for passing 128-bit vector arguments via XMM registers.
Evan Cheng [Thu, 27 Apr 2006 08:31:10 +0000 (08:31 +0000)]
Support for passing 128-bit vector arguments via XMM registers.

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

18 years agoInsert a VBIT_CONVERT between a FORMAL_ARGUMENT node and its vector uses
Evan Cheng [Thu, 27 Apr 2006 08:29:42 +0000 (08:29 +0000)]
Insert a VBIT_CONVERT between a FORMAL_ARGUMENT node and its vector uses
(VAND, VADD, etc.). Legalizer will assert otherwise.

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

18 years agoFor PR747:
Reid Spencer [Thu, 27 Apr 2006 07:49:24 +0000 (07:49 +0000)]
For PR747:
If we fail to find a required program, simply set that program to echo
out something that tells the user the situation. That is, instead of just
"true runtest" we now get "echo 'Skipped: runtest not found'".

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

18 years agoOops
Evan Cheng [Thu, 27 Apr 2006 05:44:50 +0000 (05:44 +0000)]
Oops

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

18 years agoBug fix: not updating NumIntRegs.
Evan Cheng [Thu, 27 Apr 2006 05:35:28 +0000 (05:35 +0000)]
Bug fix: not updating NumIntRegs.

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

18 years agoFix Regression/CodeGen/Generic/2006-04-26-SetCCAnd.ll and
Chris Lattner [Thu, 27 Apr 2006 05:01:07 +0000 (05:01 +0000)]
Fix Regression/CodeGen/Generic/2006-04-26-SetCCAnd.ll and
PR748.

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

18 years agonew testcase
Chris Lattner [Thu, 27 Apr 2006 05:00:43 +0000 (05:00 +0000)]
new testcase

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

18 years ago- Clean up formal argument lowering code. Prepare for vector pass by value work.
Evan Cheng [Thu, 27 Apr 2006 01:32:22 +0000 (01:32 +0000)]
- Clean up formal argument lowering code. Prepare for vector pass by value work.
- Fixed vararg support.

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

18 years agoFix some nondeterminstic behavior in the mem2reg pass that (in addition to
Chris Lattner [Thu, 27 Apr 2006 01:14:43 +0000 (01:14 +0000)]
Fix some nondeterminstic behavior in the mem2reg pass that (in addition to
nondeterminism being bad) could cause some trivial missed optimizations (dead
phi nodes being left around for later passes to clean up).

With this, llvm-gcc4 now bootstraps and correctly compares.  I don't know
why I never tried to do it before... :)

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

18 years agoActually, semantical doesn't appear to be a word.
Jeff Cohen [Wed, 26 Apr 2006 21:03:17 +0000 (21:03 +0000)]
Actually, semantical doesn't appear to be a word.

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

18 years agoImplement Transforms/IndVarsSimplify/complex-scev.ll, a case where we didn't
Chris Lattner [Wed, 26 Apr 2006 18:34:07 +0000 (18:34 +0000)]
Implement Transforms/IndVarsSimplify/complex-scev.ll, a case where we didn't
recognize some simple affine IV's.

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

18 years agonew testcase
Chris Lattner [Wed, 26 Apr 2006 18:32:59 +0000 (18:32 +0000)]
new testcase

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

18 years agoFix fastcc failures.
Evan Cheng [Wed, 26 Apr 2006 18:21:31 +0000 (18:21 +0000)]
Fix fastcc failures.

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

18 years agoUnfortunately this really isn't the place for advertisement.
Chris Lattner [Wed, 26 Apr 2006 18:10:59 +0000 (18:10 +0000)]
Unfortunately this really isn't the place for advertisement.

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

18 years agoFix typo.
Jeff Cohen [Wed, 26 Apr 2006 18:05:25 +0000 (18:05 +0000)]
Fix typo.

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

18 years agoFix some anchors.
Reid Spencer [Wed, 26 Apr 2006 15:46:53 +0000 (15:46 +0000)]
Fix some anchors.

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

18 years agoAdd some notes about the current state of source (front end) languages
Reid Spencer [Wed, 26 Apr 2006 14:52:19 +0000 (14:52 +0000)]
Add some notes about the current state of source (front end) languages
so we can point to them on llvm-dev.

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

18 years agoSwitching over FORMAL_ARGUMENTS mechanism to lower call arguments.
Evan Cheng [Wed, 26 Apr 2006 01:20:17 +0000 (01:20 +0000)]
Switching over FORMAL_ARGUMENTS mechanism to lower call arguments.

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

18 years agoDon't forget return void.
Evan Cheng [Tue, 25 Apr 2006 23:03:35 +0000 (23:03 +0000)]
Don't forget return void.

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

18 years agoKeep the stack from on darwin 16-byte aligned. This fixes many JIT
Nate Begeman [Tue, 25 Apr 2006 20:54:26 +0000 (20:54 +0000)]
Keep the stack from on darwin 16-byte aligned.  This fixes many JIT
failres.

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

18 years agoSeparate LowerOperation() into multiple functions, one per opcode.
Evan Cheng [Tue, 25 Apr 2006 20:13:52 +0000 (20:13 +0000)]
Separate LowerOperation() into multiple functions, one per opcode.

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

18 years agoslightly more useful error message
Andrew Lenharth [Tue, 25 Apr 2006 19:33:41 +0000 (19:33 +0000)]
slightly more useful error message

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

18 years agobetter c99 struct handling
Andrew Lenharth [Tue, 25 Apr 2006 19:33:23 +0000 (19:33 +0000)]
better c99 struct handling

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

18 years agoanother c99 style problem
Andrew Lenharth [Tue, 25 Apr 2006 19:27:56 +0000 (19:27 +0000)]
another c99 style problem

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

18 years agoFix a typo.
Evan Cheng [Tue, 25 Apr 2006 17:48:41 +0000 (17:48 +0000)]
Fix a typo.

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

18 years agoFix a warning
Nate Begeman [Tue, 25 Apr 2006 17:46:32 +0000 (17:46 +0000)]
Fix a warning

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

18 years agoNo functionality changes, but cleaner code with correct comments.
Nate Begeman [Tue, 25 Apr 2006 04:45:59 +0000 (04:45 +0000)]
No functionality changes, but cleaner code with correct comments.

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

18 years agoExplicitly specify result type for def : Pat<> patterns (if it produces a vector
Evan Cheng [Tue, 25 Apr 2006 00:50:01 +0000 (00:50 +0000)]
Explicitly specify result type for def : Pat<> patterns (if it produces a vector
result). Otherwise tblgen will pick the default (v16i8 for 128-bit vector).

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

18 years agoAdded X86 SSE2 intrinsics which can be represented as vector_shuffles. This is
Evan Cheng [Mon, 24 Apr 2006 23:34:56 +0000 (23:34 +0000)]
Added X86 SSE2 intrinsics which can be represented as vector_shuffles. This is
a temporary workaround for the 2-wide vector_shuffle problem (i.e. its mask
would have type v2i32 which is not legal).

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

18 years agoAdd a new entry.
Evan Cheng [Mon, 24 Apr 2006 23:30:10 +0000 (23:30 +0000)]
Add a new entry.

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