oota-llvm.git
18 years agoDefine BR in the .td file now that Evan made tblgen smarter.
Chris Lattner [Sun, 4 Dec 2005 18:42:54 +0000 (18:42 +0000)]
Define BR in the .td file now that Evan made tblgen smarter.

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

18 years agoAdded isel patterns for RET, JMP, and WRITEPORT.
Evan Cheng [Sun, 4 Dec 2005 08:19:43 +0000 (08:19 +0000)]
Added isel patterns for RET, JMP, and WRITEPORT.

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

18 years ago* Commit the fix (by Chris) for a tblgen type inferencing bug.
Evan Cheng [Sun, 4 Dec 2005 08:18:16 +0000 (08:18 +0000)]
* Commit the fix (by Chris) for a tblgen type inferencing bug.
* Enhanced tblgen to handle instructions which have chain operand and writes a
chain result.
* Enhanced tblgen to handle instructions which produces no results. Part of
the change is a temporary hack which relies on instruction property (e.g.
isReturn, isBranch). The proper fix would be to change the .td syntax to
separate results dag from ops dag.

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

18 years ago* Added instruction property hasCtrlDep for those which r/w control-flow
Evan Cheng [Sun, 4 Dec 2005 08:13:17 +0000 (08:13 +0000)]
* Added instruction property hasCtrlDep for those which r/w control-flow
  chains.
* Added DAG node property SDNPHasChain for nodes which r/w control-flow
  chains.
* Renamed SDTVT to SDTOther.
* Added several new SDTypeProfiles for BR, BRCOND, RET, and WRITEPORT.
* Added SDNode definitions for BR, BRCOND, RET, and WRITEPORT.

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

18 years agoFix PR672 another way which should be more robust
Chris Lattner [Sun, 4 Dec 2005 06:03:50 +0000 (06:03 +0000)]
Fix PR672 another way which should be more robust

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

18 years agonew testcase, for PR672
Chris Lattner [Sun, 4 Dec 2005 06:03:25 +0000 (06:03 +0000)]
new testcase, for PR672

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

18 years agodbg.stoppoint returns a value, don't forget to init it
Chris Lattner [Sat, 3 Dec 2005 18:50:48 +0000 (18:50 +0000)]
dbg.stoppoint returns a value, don't forget to init it

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

18 years agoexpand testcase, which has been in my tree for a while now
Chris Lattner [Sat, 3 Dec 2005 18:26:41 +0000 (18:26 +0000)]
expand testcase, which has been in my tree for a while now

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

18 years agoFix SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
Chris Lattner [Sat, 3 Dec 2005 18:25:58 +0000 (18:25 +0000)]
Fix SimplifyCFG/2005-12-03-IncorrectPHIFold.ll

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

18 years agonew testcase, miscompiled by simplifycfg. This has been distilled from Ptrdist/bc
Chris Lattner [Sat, 3 Dec 2005 18:25:32 +0000 (18:25 +0000)]
new testcase, miscompiled by simplifycfg.  This has been distilled from Ptrdist/bc

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

18 years agoFix a bug in the testcase
Chris Lattner [Sat, 3 Dec 2005 17:20:57 +0000 (17:20 +0000)]
Fix a bug in the testcase

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

18 years agoFix test/Regression/ExecutionEngine/2005-12-02-TailCallBug.ll and PR672.
Chris Lattner [Sat, 3 Dec 2005 07:15:55 +0000 (07:15 +0000)]
Fix test/Regression/ExecutionEngine/2005-12-02-TailCallBug.ll and PR672.

This also fixes 177.mesa, the only program that fails with --enable-x86-fastcc
turned on.  Given a clean nightly tester run, we should be able to turn it
on by default!

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

18 years agonew testcase for PR672
Chris Lattner [Sat, 3 Dec 2005 07:14:47 +0000 (07:14 +0000)]
new testcase for PR672

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

18 years agoRevert my previous patch which broke due to lazy streaming of functions
Chris Lattner [Fri, 2 Dec 2005 19:00:22 +0000 (19:00 +0000)]
Revert my previous patch which broke due to lazy streaming of functions
from .bc files.

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

18 years agobah, must generate all results
Andrew Lenharth [Fri, 2 Dec 2005 06:08:08 +0000 (06:08 +0000)]
bah, must generate all results

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

18 years agocycle counter fix
Andrew Lenharth [Fri, 2 Dec 2005 04:56:24 +0000 (04:56 +0000)]
cycle counter fix

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

18 years agoadd a note
Chris Lattner [Fri, 2 Dec 2005 00:11:20 +0000 (00:11 +0000)]
add a note

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

18 years agoDon't remove two operand, two result nodes from the binary ops map. These
Chris Lattner [Thu, 1 Dec 2005 23:14:50 +0000 (23:14 +0000)]
Don't remove two operand, two result nodes from the binary ops map.  These
should come from the arbitrary ops map.

This fixes Regression/CodeGen/PowerPC/2005-12-01-Crash.ll

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

18 years agoNew testcase that crashes llc
Chris Lattner [Thu, 1 Dec 2005 23:14:09 +0000 (23:14 +0000)]
New testcase that crashes llc

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

18 years agoIf a module has a main, but it is defined externally, refuse to run it.
Chris Lattner [Thu, 1 Dec 2005 22:48:23 +0000 (22:48 +0000)]
If a module has a main, but it is defined externally, refuse to run it.

Attempting to run it will find lli's main, which isn't the desired effect.

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

18 years agoPromote line and column number information for our friendly 64-bit targets.
Chris Lattner [Thu, 1 Dec 2005 18:21:35 +0000 (18:21 +0000)]
Promote line and column number information for our friendly 64-bit targets.

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

18 years agoIA64 doesn't support the LOCATION node, and for some reason the ISelPattern
Chris Lattner [Thu, 1 Dec 2005 18:19:53 +0000 (18:19 +0000)]
IA64 doesn't support the LOCATION node, and for some reason the ISelPattern
stuff isn't using ISelLowering.cpp

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

18 years agoMake sure these get added into the codegenmap when appropriate
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

18 years agoThis is a bugfix for SelectNodeTo. In certain situations, we could be
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

18 years agomajor think-o
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

18 years agoSupport multiple ValueTypes per RegisterClass, needed for upcoming vector
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

18 years agoCosmetic change, better reflects actual values
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

18 years agoFix a regression caused by a patch earlier today
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

18 years agoFlags where I think I need them, quick, before the nightly tester starts
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

18 years agoProper support for shifts with register shift value.
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

18 years agoUse a getCopyToReg() variant to generate a flaggy CopyToReg node.
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

18 years agoTeach tblgen to accept register source operands in patterns, e.g.
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

18 years agoNuke CodeGenInstruction's ValueType member, it is no longer used.
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

18 years agoStop checking the ValueType of the CodeGenInstruction. Instead, use the
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

18 years agofit into 80 columns
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

18 years agoMake the code generated by tblgen return the result of SelectNodeTo, to
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

18 years agoSelectNodeTo now returns its result, we must pay attention to it.
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

18 years agoPay attn to the node returned by SelectNodeTo
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

18 years agoSelectNodeTo now returns its result, we must pay attention to it.
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

18 years agoSelectNodeTo now returns N. Use it instead of return N directly.
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

18 years agoMake SelectNodeTo return N
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

18 years agoFix Regression/CodeGen/PowerPC/2005-11-30-vastart-crash.ll
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

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

18 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

18 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

18 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