Chris Lattner [Thu, 1 Dec 2005 18:09:22 +0000 (18:09 +0000)]
Make sure these get added into the codegenmap when appropriate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24566
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Dec 2005 18:00:57 +0000 (18:00 +0000)]
This is a bugfix for SelectNodeTo. In certain situations, we could be
selecting a node and use a mix of getTargetNode() and SelectNodeTo. Because
SelectNodeTo didn't check the CSE maps for a preexisting node and didn't insert
its result into the CSE maps, we would sometimes miss a CSE opportunity.
This is extremely rare, but worth fixing for completeness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24565
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 1 Dec 2005 17:48:51 +0000 (17:48 +0000)]
major think-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24564
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 1 Dec 2005 04:51:06 +0000 (04:51 +0000)]
Support multiple ValueTypes per RegisterClass, needed for upcoming vector
work. This change has no effect on generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24563
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 1 Dec 2005 04:48:26 +0000 (04:48 +0000)]
Cosmetic change, better reflects actual values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24562
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Dec 2005 03:50:19 +0000 (03:50 +0000)]
Fix a regression caused by a patch earlier today
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24561
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 1 Dec 2005 01:53:10 +0000 (01:53 +0000)]
Flags where I think I need them, quick, before the nightly tester starts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24560
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 1 Dec 2005 00:43:55 +0000 (00:43 +0000)]
Proper support for shifts with register shift value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24559
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 1 Dec 2005 00:41:50 +0000 (00:41 +0000)]
Use a getCopyToReg() variant to generate a flaggy CopyToReg node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24558
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 1 Dec 2005 00:18:45 +0000 (00:18 +0000)]
Teach tblgen to accept register source operands in patterns, e.g.
def SHL8rCL : I<0xD2, MRM4r, (ops R8 :$dst, R8 :$src),
"shl{b} {%cl, $dst|$dst, %CL}",
[(set R8:$dst, (shl R8:$src, CL))]>, Imp<[CL],[]>;
This generates a CopyToReg operand and added its 2nd result to the shl as
a flag operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24557
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 1 Dec 2005 00:12:04 +0000 (00:12 +0000)]
Nuke CodeGenInstruction's ValueType member, it is no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24556
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 1 Dec 2005 00:06:14 +0000 (00:06 +0000)]
Stop checking the ValueType of the CodeGenInstruction. Instead, use the
ValueType from the RegisterClass or Operands. This step is necessary to
allow RegisterClasses to have multiple ValueTypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24555
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 30 Nov 2005 23:58:18 +0000 (23:58 +0000)]
fit into 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24554
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 23:08:45 +0000 (23:08 +0000)]
Make the code generated by tblgen return the result of SelectNodeTo, to
permit future changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24553
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 23:04:38 +0000 (23:04 +0000)]
SelectNodeTo now returns its result, we must pay attention to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24552
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 23:02:08 +0000 (23:02 +0000)]
Pay attn to the node returned by SelectNodeTo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24551
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 22:59:19 +0000 (22:59 +0000)]
SelectNodeTo now returns its result, we must pay attention to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24550
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 22:53:06 +0000 (22:53 +0000)]
SelectNodeTo now returns N. Use it instead of return N directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24549
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 22:45:14 +0000 (22:45 +0000)]
Make SelectNodeTo return N
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24548
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 20:40:54 +0000 (20:40 +0000)]
Fix Regression/CodeGen/PowerPC/2005-11-30-vastart-crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24547
91177308-0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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