oota-llvm.git
18 years agoTest that crashes the ppc backend.
Chris Lattner [Wed, 30 Nov 2005 20:40:28 +0000 (20:40 +0000)]
Test that crashes the ppc backend.

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

18 years agoFix a bug where we didn't realize that vaarg reads memory. This fixes
Chris Lattner [Wed, 30 Nov 2005 19:38:22 +0000 (19:38 +0000)]
Fix a bug where we didn't realize that vaarg reads memory.  This fixes
Transforms/DeadStoreElimination/2005-11-30-vaarg.ll

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

18 years agonew testcase dse is miscompiling
Chris Lattner [Wed, 30 Nov 2005 19:37:08 +0000 (19:37 +0000)]
new testcase dse is miscompiling

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

18 years agoAdd a simple clear() method
Chris Lattner [Wed, 30 Nov 2005 19:31:23 +0000 (19:31 +0000)]
Add a simple clear() method

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

18 years agoFix a typo in my latest change
Nate Begeman [Wed, 30 Nov 2005 18:57:39 +0000 (18:57 +0000)]
Fix a typo in my latest change

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

18 years agoNo longer track value types for asm printer operands, and remove them as
Nate Begeman [Wed, 30 Nov 2005 18:54:35 +0000 (18:54 +0000)]
No longer track value types for asm printer operands, and remove them as
an argument to every operand printing function.  Requires some slight
tweaks to x86, the only user.

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

18 years agoFix some copy and paste typos.
Nate Begeman [Wed, 30 Nov 2005 18:37:14 +0000 (18:37 +0000)]
Fix some copy and paste typos.

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

18 years agoCALLSEQ_START/END nodes don't get memoized, do not add them in when
Chris Lattner [Wed, 30 Nov 2005 18:20:52 +0000 (18:20 +0000)]
CALLSEQ_START/END nodes don't get memoized, do not add them in when
replaceAllUses'ing.

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

18 years agoremove redundant code
Andrew Lenharth [Wed, 30 Nov 2005 17:14:11 +0000 (17:14 +0000)]
remove redundant code

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

18 years agoAt long last, you can say that f32 isn't supported for setcc
Andrew Lenharth [Wed, 30 Nov 2005 17:12:26 +0000 (17:12 +0000)]
At long last, you can say that f32 isn't supported for setcc

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

18 years agoMake typesafe that which isn't: FCMOVxx
Andrew Lenharth [Wed, 30 Nov 2005 17:11:20 +0000 (17:11 +0000)]
Make typesafe that which isn't: FCMOVxx

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

18 years agoFPSelect and more custom lowering
Andrew Lenharth [Wed, 30 Nov 2005 16:10:29 +0000 (16:10 +0000)]
FPSelect and more custom lowering

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

18 years agoFirst chunk of actually generating vector code for packed types. These
Nate Begeman [Wed, 30 Nov 2005 08:22:07 +0000 (08:22 +0000)]
First chunk of actually generating vector code for packed types.  These
changes allow us to generate the following code:

_foo:
        li r2, 0
        lvx v0, r2, r3
        vaddfp v0, v0, v0
        stvx v0, r2, r3
        blr

for this llvm:

void %foo(<4 x float>* %a) {
entry:
        %tmp1 = load <4 x float>* %a
        %tmp2 = add <4 x float> %tmp1, %tmp1
        store <4 x float> %tmp2, <4 x float>* %a
        ret void
}

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

18 years agoAll sorts of stuff.
Andrew Lenharth [Wed, 30 Nov 2005 07:19:56 +0000 (07:19 +0000)]
All sorts of stuff.

Getting in on the custom lowering thing, yay
evilness with fp setcc, yuck
trivial int select, hmmm
in memory args for functions, yay
DIV and REM, always handy.  They should be custom lowered though.

Lots more stuff compiles now (go go single source!).  Of course, none of it
probably works, but that is what the nightly tester can find out :)

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

18 years agoadd support for custom lowering SINT_TO_FP
Andrew Lenharth [Wed, 30 Nov 2005 06:43:03 +0000 (06:43 +0000)]
add support for custom lowering SINT_TO_FP

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

18 years agoAdd a link to the doxygen tarball
Chris Lattner [Wed, 30 Nov 2005 06:35:34 +0000 (06:35 +0000)]
Add a link to the doxygen tarball

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

18 years agocopy the doxygen tarball into the HTML directory after building it
Chris Lattner [Wed, 30 Nov 2005 06:31:28 +0000 (06:31 +0000)]
copy the doxygen tarball into the HTML directory after building it

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

18 years agominor cleanup
Chris Lattner [Wed, 30 Nov 2005 05:26:03 +0000 (05:26 +0000)]
minor cleanup

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

18 years agoFix a problem with llvm-ranlib that (on some platforms) caused the archive
Reid Spencer [Wed, 30 Nov 2005 05:21:10 +0000 (05:21 +0000)]
Fix a problem with llvm-ranlib that (on some platforms) caused the archive
file to become corrupted due to interactions between mmap'd memory segments
and file descriptors closing. The problem is completely avoiding by using
a third temporary file.

Patch provided by Evan Jones

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

18 years agoFix a bug in a recent patch that broke shifts
Chris Lattner [Wed, 30 Nov 2005 05:11:18 +0000 (05:11 +0000)]
Fix a bug in a recent patch that broke shifts

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

18 years agoAdded support to STORE and shifts to DAG to DAG isel.
Evan Cheng [Wed, 30 Nov 2005 02:51:20 +0000 (02:51 +0000)]
Added support to STORE and shifts to DAG to DAG isel.

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

18 years agoFixed a bug introduced by my last commit: TargetGlobalValues should key on
Evan Cheng [Wed, 30 Nov 2005 02:49:21 +0000 (02:49 +0000)]
Fixed a bug introduced by my last commit: TargetGlobalValues should key on
GlobalValue * and index pair. Update getGlobalAddress() for symmetry.

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

18 years agoAdded an index field to GlobalAddressSDNode so it can represent X+12, etc.
Evan Cheng [Wed, 30 Nov 2005 02:04:11 +0000 (02:04 +0000)]
Added an index field to GlobalAddressSDNode so it can represent X+12, etc.

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

18 years agoFixed a minor bug: - -offset != offset iff offset == MININT
Evan Cheng [Wed, 30 Nov 2005 01:59:00 +0000 (01:59 +0000)]
Fixed a minor bug: - -offset != offset iff offset == MININT

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

18 years agoRepresent the encoding of the SPR instructions as they actually are, so
Nate Begeman [Tue, 29 Nov 2005 22:42:50 +0000 (22:42 +0000)]
Represent the encoding of the SPR instructions as they actually are, so
that we can use the correct SPR numbers in the InstrInfo.td file.  This is
necessary to support VRsave.

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

18 years agoAdd more X86 ISel patterns.
Evan Cheng [Tue, 29 Nov 2005 19:38:52 +0000 (19:38 +0000)]
Add more X86 ISel patterns.

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

18 years agoBetter error message when unrecognized opcode is seen.
Evan Cheng [Tue, 29 Nov 2005 18:44:58 +0000 (18:44 +0000)]
Better error message when unrecognized opcode is seen.

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

18 years agoHook up one type, v4f32, to the VR RegisterClass for now.
Nate Begeman [Tue, 29 Nov 2005 08:17:20 +0000 (08:17 +0000)]
Hook up one type, v4f32, to the VR RegisterClass for now.

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

18 years agoAdd the remainder of the AltiVec 4 x float instructions. Further
Nate Begeman [Tue, 29 Nov 2005 08:04:45 +0000 (08:04 +0000)]
Add the remainder of the AltiVec 4 x float instructions.  Further
enhancements will be necessary to teach the code generator that since
there is no fmul, it will have to do vmaddfp, adding +0.0.

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

18 years agoAdd support for a new STRING and LOCATION node for line number support, patch
Chris Lattner [Tue, 29 Nov 2005 06:21:05 +0000 (06:21 +0000)]
Add support for a new STRING and LOCATION node for line number support, patch
contributed by Daniel Berlin, with a few cleanups here and there by me.

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

18 years agoAdd the new vector types to tablegen
Nate Begeman [Tue, 29 Nov 2005 06:19:38 +0000 (06:19 +0000)]
Add the new vector types to tablegen

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

18 years agoNo targets support line number info yet.
Chris Lattner [Tue, 29 Nov 2005 06:16:21 +0000 (06:16 +0000)]
No targets support line number info yet.

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

18 years agoAdd support for a new STRING and LOCATION node for line number support, patch
Chris Lattner [Tue, 29 Nov 2005 06:15:39 +0000 (06:15 +0000)]
Add support for a new STRING and LOCATION node for line number support, patch
contributed by Daniel Berlin, with a few cleanups here and there by me.

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

18 years agoAdd the majority of the vector machien value types we expect to support,
Nate Begeman [Tue, 29 Nov 2005 05:45:29 +0000 (05:45 +0000)]
Add the majority of the vector machien value types we expect to support,
and make a few changes to the legalization machinery to support more than
16 types.

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

18 years agoFixed a comment bug:
Evan Cheng [Tue, 29 Nov 2005 04:59:46 +0000 (04:59 +0000)]
Fixed a comment bug:
createPPCPatternInstructionSelector -> createPPCISelPattern

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

18 years agoAdd "SCC" to the lexicon. Patch provided by Marco Matthies, thanks!
Chris Lattner [Tue, 29 Nov 2005 01:34:50 +0000 (01:34 +0000)]
Add "SCC" to the lexicon.  Patch provided by Marco Matthies, thanks!

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

18 years agoFix PR670 and test/Regression/Transforms/Mem2Reg/2005-11-28-Crash.ll
Chris Lattner [Tue, 29 Nov 2005 01:07:12 +0000 (01:07 +0000)]
Fix PR670 and test/Regression/Transforms/Mem2Reg/2005-11-28-Crash.ll

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

18 years agonew testcase for pr670
Chris Lattner [Tue, 29 Nov 2005 01:06:51 +0000 (01:06 +0000)]
new testcase for pr670

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

18 years agoadd Evan and Jim. Please edit your entries as desired.
Chris Lattner [Tue, 29 Nov 2005 00:57:06 +0000 (00:57 +0000)]
add Evan and Jim. Please edit your entries as desired.

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

18 years agorefix typo
Chris Lattner [Tue, 29 Nov 2005 00:42:30 +0000 (00:42 +0000)]
refix typo

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

18 years agodon't say this is i128, because it isn't yet. Hopefully nate will change
Chris Lattner [Tue, 29 Nov 2005 00:41:40 +0000 (00:41 +0000)]
don't say this is i128, because it isn't yet.  Hopefully nate will change
this to be something sane, but in the mean time it is unused, so safe to
make something bogus.

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

18 years agorevert my change for the time being, which broke the build
Chris Lattner [Tue, 29 Nov 2005 00:24:08 +0000 (00:24 +0000)]
revert my change for the time being, which broke the build

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

18 years agoFixed a punctuation error.
John Criswell [Mon, 28 Nov 2005 23:25:41 +0000 (23:25 +0000)]
Fixed a punctuation error.

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

18 years agofix a typo :)
Chris Lattner [Mon, 28 Nov 2005 22:42:15 +0000 (22:42 +0000)]
fix a typo :)

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

18 years agoa few more comments on the interfaces and functions
Andrew Lenharth [Mon, 28 Nov 2005 18:10:59 +0000 (18:10 +0000)]
a few more comments on the interfaces and functions

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

18 years agoAdded documented rsprofiler interface. Also remove new profiler passes, the
Andrew Lenharth [Mon, 28 Nov 2005 18:00:38 +0000 (18:00 +0000)]
Added documented rsprofiler interface.  Also remove new profiler passes, the
old ones have been updated to implement the interface.

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

18 years agoAdd the remove() function from the C library.
John Criswell [Mon, 28 Nov 2005 15:49:15 +0000 (15:49 +0000)]
Add the remove() function from the C library.

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

18 years agoTeach Visual Studio about new files.
Jeff Cohen [Mon, 28 Nov 2005 06:46:36 +0000 (06:46 +0000)]
Teach Visual Studio about new files.

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

18 years agoFix VC++ warning.
Jeff Cohen [Mon, 28 Nov 2005 06:45:57 +0000 (06:45 +0000)]
Fix VC++ warning.

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

18 years agoAdd a missed optimization
Chris Lattner [Mon, 28 Nov 2005 04:52:39 +0000 (04:52 +0000)]
Add a missed optimization

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

18 years agoUse std:: where appropriate
Chris Lattner [Mon, 28 Nov 2005 02:30:22 +0000 (02:30 +0000)]
Use std:: where appropriate

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

18 years agoRandom sampling (aka Arnold and Ryder) profiling. This is still preliminary, but...
Andrew Lenharth [Mon, 28 Nov 2005 00:58:09 +0000 (00:58 +0000)]
Random sampling (aka Arnold and Ryder) profiling.  This is still preliminary, but it works on spec on x86 and alpha.  The idea is to allow profiling passes to remember what profiling they inserted, then a random sampling framework is inserted which consists of duplicated basic blocks (without profiling), such that at each backedge in the program and entry into every function, the framework chooses whether to use the instrumented code or the instrumentation free code.  The goal of such a framework is to make it reasonably cheap to do random sampling of very expensive profiling products (such as load-value profiling).

The code is organized into 3 parts (2 passes)
1) a linked set of profiling passes, which implement an analysis group (linked, like alias analysis are).  These insert profiling into the program, and remember what they inserted, so that at a later time they can be queried about any instruction.

2) a pass that handles inserting the random sampling framework.  This also has options to control how random samples are choosen.  Currently implemented are Global counters, register allocated global counters, and read cycle counter (see? there was a reason for it).

The profiling passes are almost identical to the existing ones (block, function, and null profiling is supported right now), and they are valid passes without the sampling framework (hence the existing passes can be unified with the new ones, not done yet).

Some things are a bit ugly still, but that should be fixed up soon enough.

Other todo? making the counter values not "magic 2^16 -1" values, but dynamically choosable.

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

18 years agoSmall tweaks noticed while on the plane.
Nate Begeman [Sat, 26 Nov 2005 22:39:34 +0000 (22:39 +0000)]
Small tweaks noticed while on the plane.

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

18 years agosince reg2mem requires it, might as well mention that it preserves it
Andrew Lenharth [Fri, 25 Nov 2005 16:04:54 +0000 (16:04 +0000)]
since reg2mem requires it, might as well mention that it preserves it

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

18 years agoadd support for dynamic_stackalloc to the dag isel (thanks andrew ;)
Duraid Madina [Fri, 25 Nov 2005 07:49:25 +0000 (07:49 +0000)]
add support for dynamic_stackalloc to the dag isel (thanks andrew ;)

next up: support argument passing in memory, not just registers

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

19 years agoSome first bits of AltiVec stuff: Instruction Formats, Encodings, and
Nate Begeman [Wed, 23 Nov 2005 05:29:52 +0000 (05:29 +0000)]
Some first bits of AltiVec stuff: Instruction Formats, Encodings, and
Registers.  Apologies to Jim if the scheduling info so far isn't accurate.

There's a few more things like VRsave support that need to be finished up
in my local tree before I can commit code that Does The Right Thing for
turning 4 x float into the various altivec packed float instructions.

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

19 years agoReg2Mem is something a pass may depend on, so allow that
Andrew Lenharth [Tue, 22 Nov 2005 22:14:23 +0000 (22:14 +0000)]
Reg2Mem is something a pass may depend on, so allow that

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

19 years agoturns out, demotion and invokes and critical edges don't mix
Andrew Lenharth [Tue, 22 Nov 2005 21:45:19 +0000 (21:45 +0000)]
turns out, demotion and invokes and critical edges don't mix

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

19 years agoFix warning, the better way. Really, this is what this instruction is for, so use it
Andrew Lenharth [Tue, 22 Nov 2005 20:59:00 +0000 (20:59 +0000)]
Fix warning, the better way.  Really, this is what this instruction is for, so use it

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

19 years agoFix warning
Andrew Lenharth [Tue, 22 Nov 2005 20:56:05 +0000 (20:56 +0000)]
Fix warning

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

19 years agoCheck in code to scalarize arbitrarily wide packed types for some simple
Nate Begeman [Tue, 22 Nov 2005 18:16:00 +0000 (18:16 +0000)]
Check in code to scalarize arbitrarily wide packed types for some simple
vector operations (load, add, sub, mul).

This allows us to codegen:
void %foo(<4 x float> * %a) {
entry:
  %tmp1 = load <4 x float> * %a;
  %tmp2 = add <4 x float> %tmp1, %tmp1
  store <4 x float> %tmp2, <4 x float> *%a
  ret void
}

on ppc as:
_foo:
        lfs f0, 12(r3)
        lfs f1, 8(r3)
        lfs f2, 4(r3)
        lfs f3, 0(r3)
        fadds f0, f0, f0
        fadds f1, f1, f1
        fadds f2, f2, f2
        fadds f3, f3, f3
        stfs f0, 12(r3)
        stfs f1, 8(r3)
        stfs f2, 4(r3)
        stfs f3, 0(r3)
        blr

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

19 years agomassive DAGISel patch. lots and lots more stuff compiles now
Andrew Lenharth [Tue, 22 Nov 2005 04:20:06 +0000 (04:20 +0000)]
massive DAGISel patch.  lots and lots more stuff compiles now

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

19 years agoRather than attempting to legalize 1 x float, make sure the SD ISel never
Nate Begeman [Tue, 22 Nov 2005 01:29:36 +0000 (01:29 +0000)]
Rather than attempting to legalize 1 x float, make sure the SD ISel never
generates it.  Make MVT::Vector expand-only, and remove the code in
Legalize that attempts to legalize it.

The plan for supporting N x Type is to continually epxand it in ExpandOp
until it gets down to 2 x Type, where it will be scalarized into a pair of
scalars.

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

19 years agoUse HasDotTypeDotSizeDirective instead of forELF
Chris Lattner [Mon, 21 Nov 2005 23:06:54 +0000 (23:06 +0000)]
Use HasDotTypeDotSizeDirective instead of forELF

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

19 years agoAdd a new flag
Chris Lattner [Mon, 21 Nov 2005 23:06:08 +0000 (23:06 +0000)]
Add a new flag

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

19 years agoRemove a level of indentation by using a continue.
Chris Lattner [Mon, 21 Nov 2005 22:48:18 +0000 (22:48 +0000)]
Remove a level of indentation by using a continue.

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

19 years agoSimplify the subtarget info, allow the asmwriter to do some target sensing
Chris Lattner [Mon, 21 Nov 2005 22:43:58 +0000 (22:43 +0000)]
Simplify the subtarget info, allow the asmwriter to do some target sensing
based on TargetType.

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

19 years agoUse subtarget information computed by X86Subtarget instead of rolling our own.
Chris Lattner [Mon, 21 Nov 2005 22:39:40 +0000 (22:39 +0000)]
Use subtarget information computed by X86Subtarget instead of rolling our own.

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

19 years agoMake the X86 subtarget compute the basic target type: ELF, Cygwin, Darwin,
Chris Lattner [Mon, 21 Nov 2005 22:31:58 +0000 (22:31 +0000)]
Make the X86 subtarget compute the basic target type: ELF, Cygwin, Darwin,
or native Win32

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

19 years agoAdd a forELF flag, allowing the removal of forCygwin and simplification of
Chris Lattner [Mon, 21 Nov 2005 22:19:48 +0000 (22:19 +0000)]
Add a forELF flag, allowing the removal of forCygwin and simplification of
conditionals.

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

19 years agoAdd some more directives
Chris Lattner [Mon, 21 Nov 2005 19:51:51 +0000 (19:51 +0000)]
Add some more directives

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

19 years agosimplify and genericize this code
Chris Lattner [Mon, 21 Nov 2005 19:50:31 +0000 (19:50 +0000)]
simplify and genericize this code

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

19 years agoadd support for div/rem to the dag->dag isel. yay.
Duraid Madina [Mon, 21 Nov 2005 14:14:54 +0000 (14:14 +0000)]
add support for div/rem to the dag->dag isel. yay.

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

19 years agoI think I know what you meant here, but just to be safe I'll let you
Duraid Madina [Mon, 21 Nov 2005 14:09:40 +0000 (14:09 +0000)]
I think I know what you meant here, but just to be safe I'll let you
do it. :)

    <_sabre_> excuses excuses

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

19 years agoEliminate unneeded intermediate class. Move doFinalizeMethod to bottom of
Chris Lattner [Mon, 21 Nov 2005 08:40:17 +0000 (08:40 +0000)]
Eliminate unneeded intermediate class.  Move doFinalizeMethod to bottom of
file.

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

19 years agoStart using shared asmprinter Constant Pool emitter, use shorter cpi names.
Chris Lattner [Mon, 21 Nov 2005 08:38:26 +0000 (08:38 +0000)]
Start using shared asmprinter Constant Pool emitter, use shorter cpi names.

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

19 years agoprune #include
Chris Lattner [Mon, 21 Nov 2005 08:33:17 +0000 (08:33 +0000)]
prune #include

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

19 years agoSwitch to using the shared constant pool printer, along with using shorter
Chris Lattner [Mon, 21 Nov 2005 08:32:23 +0000 (08:32 +0000)]
Switch to using the shared constant pool printer, along with using shorter
CPI ids

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

19 years agoSwitch to using the generic constant pool emitter impl, use shorter
Chris Lattner [Mon, 21 Nov 2005 08:29:17 +0000 (08:29 +0000)]
Switch to using the generic constant pool emitter impl, use shorter
CPI names

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

19 years agoUse generic constant pool emission code in the AsmPrinter class.
Chris Lattner [Mon, 21 Nov 2005 08:26:15 +0000 (08:26 +0000)]
Use generic constant pool emission code in the AsmPrinter class.

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

19 years agoAllow target to customize directive used to switch to arbitrary section in SwitchSection,
Chris Lattner [Mon, 21 Nov 2005 08:25:09 +0000 (08:25 +0000)]
Allow target to customize directive used to switch to arbitrary section in SwitchSection,
add generic constant pool emitter

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

19 years agoadd two more config directives, add method for printing constant pool
Chris Lattner [Mon, 21 Nov 2005 08:24:11 +0000 (08:24 +0000)]
add two more config directives, add method for printing constant pool

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

19 years agoUse the FunctionNumber provided by the AsmPrinter class
Chris Lattner [Mon, 21 Nov 2005 08:14:07 +0000 (08:14 +0000)]
Use the FunctionNumber provided by the AsmPrinter class

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

19 years agoincrement the function number in SetupMachineFunction
Chris Lattner [Mon, 21 Nov 2005 08:13:27 +0000 (08:13 +0000)]
increment the function number in SetupMachineFunction

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

19 years agoMake the AsmPrinter keep track of the notion of a function number.
Chris Lattner [Mon, 21 Nov 2005 08:12:47 +0000 (08:12 +0000)]
Make the AsmPrinter keep track of the notion of a function number.

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

19 years agoUse CommentString where possible, fix a bug where aix mode wouldn't assemble
Chris Lattner [Mon, 21 Nov 2005 08:02:41 +0000 (08:02 +0000)]
Use CommentString where possible, fix a bug where aix mode wouldn't assemble
due to basic blocks being misnamed.

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

19 years agounify the darwin and aix constant pool printers
Chris Lattner [Mon, 21 Nov 2005 07:57:37 +0000 (07:57 +0000)]
unify the darwin and aix constant pool printers

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

19 years agoAdjust to capitalized asmprinter method names
Chris Lattner [Mon, 21 Nov 2005 07:51:36 +0000 (07:51 +0000)]
Adjust to capitalized asmprinter method names

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

19 years agoAdjust to capitalized AsmPrinter method names
Chris Lattner [Mon, 21 Nov 2005 07:51:23 +0000 (07:51 +0000)]
Adjust to capitalized AsmPrinter method names

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

19 years agoCapitalize methods for better consistency
Chris Lattner [Mon, 21 Nov 2005 07:51:06 +0000 (07:51 +0000)]
Capitalize methods for better consistency

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

19 years agoUse PrivateGlobalPrefix for basic block labels. This allows the x86 darwin
Chris Lattner [Mon, 21 Nov 2005 07:43:59 +0000 (07:43 +0000)]
Use PrivateGlobalPrefix for basic block labels.  This allows the x86 darwin
port to properly use L for the bb prefix instead of .

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

19 years agouse PrivateGlobalPrefix for basic blocks
Chris Lattner [Mon, 21 Nov 2005 07:41:05 +0000 (07:41 +0000)]
use PrivateGlobalPrefix for basic blocks

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

19 years agoUse PrivateGlobalPrefix for basic block labels
Chris Lattner [Mon, 21 Nov 2005 07:39:22 +0000 (07:39 +0000)]
Use PrivateGlobalPrefix for basic block labels

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

19 years agoUse PrivateGlobalPrefix for basic blocks
Chris Lattner [Mon, 21 Nov 2005 07:38:08 +0000 (07:38 +0000)]
Use PrivateGlobalPrefix for basic blocks

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

19 years agoSwitch to the new shared SwitchSection
Chris Lattner [Mon, 21 Nov 2005 07:30:28 +0000 (07:30 +0000)]
Switch to the new shared SwitchSection

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

19 years agoStart using SwitchSection, allowing globals and functions to be emitted
Chris Lattner [Mon, 21 Nov 2005 07:26:04 +0000 (07:26 +0000)]
Start using SwitchSection, allowing globals and functions to be emitted
to specific sections.  Delete some dead functions copied from the X86 backend.

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

19 years agoconvert the rest of this over to use SwitchSection
Chris Lattner [Mon, 21 Nov 2005 07:16:34 +0000 (07:16 +0000)]
convert the rest of this over to use SwitchSection

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

19 years agoStart using the AsmPrinter shared SwitchSection code. This allows the X86
Chris Lattner [Mon, 21 Nov 2005 07:11:11 +0000 (07:11 +0000)]
Start using the AsmPrinter shared SwitchSection code.  This allows the X86
backend to implement global variables in sections.

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

19 years agoThis is now implemented in common codegen code
Chris Lattner [Mon, 21 Nov 2005 07:06:58 +0000 (07:06 +0000)]
This is now implemented in common codegen code

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

19 years agoAdd section switching to common code generator code. Add a couple of
Chris Lattner [Mon, 21 Nov 2005 07:06:27 +0000 (07:06 +0000)]
Add section switching to common code generator code.  Add a couple of
asserts.

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