oota-llvm.git
18 years agoOops. PSHUFD is only available with SSE2.
Evan Cheng [Tue, 30 May 2006 21:30:59 +0000 (21:30 +0000)]
Oops. PSHUFD is only available with SSE2.

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

18 years agoAdd a note
Chris Lattner [Tue, 30 May 2006 21:29:15 +0000 (21:29 +0000)]
Add a note

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

18 years agoAlways reserve space for 8 spilled GPRs. GCC apparently assumes that this
Chris Lattner [Tue, 30 May 2006 21:21:04 +0000 (21:21 +0000)]
Always reserve space for 8 spilled GPRs.  GCC apparently assumes that this
space will be available, even if the callee isn't varargs.

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

18 years agollvm2cpp is ready to be compiled so add it to the makefile, but make it
Reid Spencer [Tue, 30 May 2006 21:20:55 +0000 (21:20 +0000)]
llvm2cpp is ready to be compiled so add it to the makefile, but make it
optional.

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

18 years agoAdd the new command line arguments.
Reid Spencer [Tue, 30 May 2006 21:19:29 +0000 (21:19 +0000)]
Add the new command line arguments.

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

18 years agoFix more bugs. This version now passes all of the Feature test except for
Reid Spencer [Tue, 30 May 2006 21:18:23 +0000 (21:18 +0000)]
Fix more bugs. This version now passes all of the Feature test except for
a floating point conversion problem with NAN in intrinsics.ll. llvm2cpp
makes an attempt to provide the correct conversion, based on the
implementation in the CBackend writer, but it doesn't get NAN correct.

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

18 years agoAdded a test case for parameter passing of vector values.
Evan Cheng [Tue, 30 May 2006 20:37:00 +0000 (20:37 +0000)]
Added a test case for parameter passing of vector values.

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

18 years agoFix the test failure on non-Darwin targets.
Evan Cheng [Tue, 30 May 2006 20:35:46 +0000 (20:35 +0000)]
Fix the test failure on non-Darwin targets.

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

18 years agoAllow shufps x, x, mask to be converted to pshufd x, mask to save a move.
Evan Cheng [Tue, 30 May 2006 20:26:50 +0000 (20:26 +0000)]
Allow shufps x, x, mask to be converted to pshufd x, mask to save a move.

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

18 years agoRemove bogus comment.
Evan Cheng [Tue, 30 May 2006 20:24:48 +0000 (20:24 +0000)]
Remove bogus comment.

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

18 years agoAdd llvm2cpp program.
Reid Spencer [Tue, 30 May 2006 19:56:31 +0000 (19:56 +0000)]
Add llvm2cpp program.

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

18 years agoProvide a simpler interface for getting a ConstantArray from a character
Reid Spencer [Tue, 30 May 2006 18:15:07 +0000 (18:15 +0000)]
Provide a simpler interface for getting a ConstantArray from a character
string. Instead of specifying the length, just specify whether the user
wants a terminating null or not. The default is "true" to retain the same
behavior as previously provided by this function.

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

18 years agoMake sure the register pressure reduction schedulers work for non-uniform
Evan Cheng [Tue, 30 May 2006 18:05:39 +0000 (18:05 +0000)]
Make sure the register pressure reduction schedulers work for non-uniform
latency targets, e.g. PPC32.

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

18 years agoWhen a priority_queue is empty, the behavior of top() operator is
Evan Cheng [Tue, 30 May 2006 18:04:34 +0000 (18:04 +0000)]
When a priority_queue is empty, the behavior of top() operator is
non-deterministic. Returns NULL when it's empty!

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

18 years agoExpand ret into "CopyToReg;BRIND"
Rafael Espindola [Tue, 30 May 2006 17:33:19 +0000 (17:33 +0000)]
Expand ret into "CopyToReg;BRIND"

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

18 years agoEnable -fno-use-cxa-atexit on darwin/ppc also.
Chris Lattner [Tue, 30 May 2006 16:38:06 +0000 (16:38 +0000)]
Enable -fno-use-cxa-atexit on darwin/ppc also.

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

18 years agoUndo a patch that breaks llvm-as because the warning message is written to
Reid Spencer [Tue, 30 May 2006 16:34:59 +0000 (16:34 +0000)]
Undo a patch that breaks llvm-as because the warning message is written to
stdout when the output of llvm-as is also written to stdout. We'll have to
fix tcl some other way.

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

18 years agoWrite the WARNING message to cout instead of cerr. Writing to cerr causes
Reid Spencer [Tue, 30 May 2006 16:05:59 +0000 (16:05 +0000)]
Write the WARNING message to cout instead of cerr. Writing to cerr causes
Tcl to claim that the program had an error and thus produces errors in
the dejagnu testing when its really just a warning.

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

18 years agoMake doc comment visible in doxygen output. Clarify Type construction.
Vladimir Prus [Tue, 30 May 2006 15:49:30 +0000 (15:49 +0000)]
Make doc comment visible in doxygen output. Clarify Type construction.

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

18 years agoFix many small bugs in llvm2cpp. This patch gets llvm2cpp working with
Reid Spencer [Tue, 30 May 2006 10:21:41 +0000 (10:21 +0000)]
Fix many small bugs in llvm2cpp. This patch gets llvm2cpp working with
everything except PHI nodes and one odd recurse/opaque type situation.
PHI nodes forward reference INSTRUCTIONS (aaaaaaaahhhhhhh!) :)

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

18 years agoProperly document the second form of ConstArray::get()
Reid Spencer [Tue, 30 May 2006 08:26:13 +0000 (08:26 +0000)]
Properly document the second form of ConstArray::get()

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

18 years agoAdjust the interface to ConstantArray::get. The previous
Reid Spencer [Tue, 30 May 2006 08:23:18 +0000 (08:23 +0000)]
Adjust the interface to ConstantArray::get. The previous
implementation always added a null byte to the end of the string. It turns
out that this is not always wanted. By adding a length parameter we preserve
this behavior when length==0 (default value) but also allow other lengths
(not null terminated) to be created.

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

18 years agoAdd a note about integer multiplication by constants.
Evan Cheng [Tue, 30 May 2006 07:37:37 +0000 (07:37 +0000)]
Add a note about integer multiplication by constants.

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

18 years agoA addressing mode folding enhancement:
Evan Cheng [Tue, 30 May 2006 06:59:36 +0000 (06:59 +0000)]
A addressing mode folding enhancement:
Fold c2 in (x << c1) | c2 where (c2 < c1)
e.g.
int test(int x) {
  return (x << 3) + 7;
}

This can be codegen'd as:
leal 7(,%eax,8), %eax

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

18 years agoAdd a lea instruction selection test case.
Evan Cheng [Tue, 30 May 2006 06:53:55 +0000 (06:53 +0000)]
Add a lea instruction selection test case.

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

18 years agoSome new entries about truncate / anyext
Evan Cheng [Tue, 30 May 2006 06:23:50 +0000 (06:23 +0000)]
Some new entries about truncate / anyext

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

18 years agoFirst complete version of llvm2cpp that doesn't crash on any of the Feature
Reid Spencer [Tue, 30 May 2006 03:43:49 +0000 (03:43 +0000)]
First complete version of llvm2cpp that doesn't crash on any of the Feature
tests. The output in a few cases still doesn't compile, however.

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

18 years agomove calltarget to dsa
Andrew Lenharth [Mon, 29 May 2006 23:39:48 +0000 (23:39 +0000)]
move calltarget to dsa

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

18 years agoSince there was interest on the mailing list, this is a utility pass that
Andrew Lenharth [Mon, 29 May 2006 22:58:38 +0000 (22:58 +0000)]
Since there was interest on the mailing list, this is a utility pass that
uses DSA to make find targets of calls.  It provides a very convinient
interface to DSA results to do things with indirect calls, such as
write a devirtualizer (which I have and may commit one of these days).

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

18 years agoSilly cleanup
Chris Lattner [Mon, 29 May 2006 18:52:52 +0000 (18:52 +0000)]
Silly cleanup

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

18 years agosilly cleanup
Chris Lattner [Mon, 29 May 2006 18:52:05 +0000 (18:52 +0000)]
silly cleanup

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

18 years agoFix a bug with diffing the wrong files. Make output more readable.
Reid Spencer [Mon, 29 May 2006 18:09:38 +0000 (18:09 +0000)]
Fix a bug with diffing the wrong files. Make output more readable.

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

18 years agoNext batch of implementation:
Reid Spencer [Mon, 29 May 2006 18:08:06 +0000 (18:08 +0000)]
Next batch of implementation:
1. Get rid of old AsmWriter cruft that's not needed.
2. Implement several instructions. Enough to get by globalvars.ll and
   alignment.ll in the Feature test suite.
3. Handle constants properly (don't repeat definitions).
4. Make the output compatible with llvm-dis for diff purposes.

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

18 years agoFix file header comment.
Reid Spencer [Mon, 29 May 2006 18:06:28 +0000 (18:06 +0000)]
Fix file header comment.

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

18 years agoRemove temporary testing rules.
Reid Spencer [Mon, 29 May 2006 18:05:59 +0000 (18:05 +0000)]
Remove temporary testing rules.

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

18 years agoReset DEBUG_SYMBOL_TABLE back to 0.
Vladimir Prus [Mon, 29 May 2006 12:54:52 +0000 (12:54 +0000)]
Reset DEBUG_SYMBOL_TABLE back to 0.

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

18 years agoFix compile error when DEBUG_SYMBOL_TABLE is defined.
Vladimir Prus [Mon, 29 May 2006 12:45:15 +0000 (12:45 +0000)]
Fix compile error when DEBUG_SYMBOL_TABLE is defined.

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

18 years agoFix two bugs in the CppWriter.cpp:
Reid Spencer [Mon, 29 May 2006 02:58:15 +0000 (02:58 +0000)]
Fix two bugs in the CppWriter.cpp:
1. Return the module from the MakeModule function so it can be verified.
2. Make sure types get generated with their names

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

18 years agoFix the file's comment block.
Reid Spencer [Mon, 29 May 2006 02:35:29 +0000 (02:35 +0000)]
Fix the file's comment block.

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

18 years agoFix grammar in a comment.
Reid Spencer [Mon, 29 May 2006 02:34:34 +0000 (02:34 +0000)]
Fix grammar in a comment.

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

18 years agoReplace an old C-style cast with a C++ cast (squelch warning)
Reid Spencer [Mon, 29 May 2006 02:32:43 +0000 (02:32 +0000)]
Replace an old C-style cast with a C++ cast (squelch warning)

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

18 years agoCorrect some grammar and describe current reality.
Reid Spencer [Mon, 29 May 2006 02:31:47 +0000 (02:31 +0000)]
Correct some grammar and describe current reality.

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

18 years agoRequire both tests to pass.
Owen Anderson [Mon, 29 May 2006 01:28:16 +0000 (01:28 +0000)]
Require both tests to pass.

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

18 years agoUpdate the testcase to check the full extent of LCSSA.
Owen Anderson [Mon, 29 May 2006 01:07:04 +0000 (01:07 +0000)]
Update the testcase to check the full extent of LCSSA.

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

18 years agoAdd Use replacement. Assuming there is nothing horribly wrong with this, LCSSA
Owen Anderson [Mon, 29 May 2006 01:00:00 +0000 (01:00 +0000)]
Add Use replacement.  Assuming there is nothing horribly wrong with this, LCSSA
is now theoretically feature-complete.  It has not, however, been thoroughly
test, and is still considered experimental.

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

18 years agoInitial Commit of llvm2cpp
Reid Spencer [Mon, 29 May 2006 00:57:22 +0000 (00:57 +0000)]
Initial Commit of llvm2cpp
This is a safekeeping commit. The program is not finished. It currently
handles modules, types, global variables and function declarations. Blocks
and instructions remain to be done.

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

18 years agoMajor think-o. Iterate over all live out-of-loop values, and perform the
Owen Anderson [Sun, 28 May 2006 19:33:28 +0000 (19:33 +0000)]
Major think-o.  Iterate over all live out-of-loop values, and perform the
other calculations on each individually, rather than trying to delay it and do
them all at the end.

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

18 years agoFix a problem where dejagnu won't accept the value of global tcl variable
Reid Spencer [Sun, 28 May 2006 07:22:42 +0000 (07:22 +0000)]
Fix a problem where dejagnu won't accept the value of global tcl variable
"libdir" for some reason. Changing to llvmlibsdir instead fixes it.

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

18 years agoProvide an infrastructure for testing the llvm2cpp program (yet to be
Reid Spencer [Sun, 28 May 2006 04:21:40 +0000 (04:21 +0000)]
Provide an infrastructure for testing the llvm2cpp program (yet to be
committed). This infrastructure is only activated when RUNLLVM2CPP=1 is
specified on the make command line. Currently it is only supported in the
Feature test suite.

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

18 years agoMake LCSSA insert proper Phi nodes throughout the rest of the CFG by computing
Owen Anderson [Sat, 27 May 2006 18:47:11 +0000 (18:47 +0000)]
Make LCSSA insert proper Phi nodes throughout the rest of the CFG by computing
the iterated Dominance Frontier of the loop-closure Phi's.  This is the
second phase of the LCSSA pass.  The third phase (coming soon) will be to
update all uses of loop variables to use the loop-closure Phi's instead.

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

18 years agoFix some regression from the inliner patch I committed last night. This fixes
Chris Lattner [Sat, 27 May 2006 17:28:13 +0000 (17:28 +0000)]
Fix some regression from the inliner patch I committed last night.  This fixes
ldecod, lencod, and SPASS.

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

18 years agoFix pastos in comments
Chris Lattner [Sat, 27 May 2006 06:57:55 +0000 (06:57 +0000)]
Fix pastos in comments

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

18 years agoSwitch the inliner over to using CloneAndPruneFunctionInto. This effectively
Chris Lattner [Sat, 27 May 2006 01:28:04 +0000 (01:28 +0000)]
Switch the inliner over to using CloneAndPruneFunctionInto.  This effectively
makes it so that it constant folds instructions on the fly.  This is good
for several reasons:

0. Many instructions are constant foldable after inlining, particularly if
   inlining a call with constant arguments.
1. Without this, the inliner has to allocate memory for all of the instructions
   that can be constant folded, then a subsequent pass has to delete them.  This
   gets the job done without this extra work.
2. This makes the inliner *pass* a bit more aggressive: in particular, it
   partially solves a phase order issue where the inliner would inline lots
   of code that folds away to nothing, but think that the resultant function
   is big because of this code that will be gone.  Now the code never exists.

This is the first part of a 2-step process.  The second part will be smart
enough to see when this implicit constant folding propagates a constant into
a branch or switch instruction, making CFG edges dead.

This implements Transforms/Inline/inline_constprop.ll

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

18 years agoIgnore generated files
Chris Lattner [Sat, 27 May 2006 01:23:30 +0000 (01:23 +0000)]
Ignore generated files

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

18 years agoImplement a new method, CloneAndPruneFunctionInto, as documented.
Chris Lattner [Sat, 27 May 2006 01:22:24 +0000 (01:22 +0000)]
Implement a new method, CloneAndPruneFunctionInto, as documented.

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

18 years agoImplement a new method: CloneAndPruneFunctionInto, as documented.
Chris Lattner [Sat, 27 May 2006 01:21:50 +0000 (01:21 +0000)]
Implement a new method: CloneAndPruneFunctionInto, as documented.

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

18 years agoRefactor some code to expose an interface to constant fold and instruction given...
Chris Lattner [Sat, 27 May 2006 01:18:04 +0000 (01:18 +0000)]
Refactor some code to expose an interface to constant fold and instruction given it's opcode, typeand operands.

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

18 years agoAdd an interface to constant fold and instruction given it's opcode, type
Chris Lattner [Sat, 27 May 2006 01:17:40 +0000 (01:17 +0000)]
Add an interface to constant fold and instruction given it's opcode, type
and operands.

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

18 years agoNew testcase: check that the inliner constant folds instructions on the
Chris Lattner [Sat, 27 May 2006 01:16:22 +0000 (01:16 +0000)]
New testcase: check that the inliner constant folds instructions on the
fly if it can.

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

18 years agoFix a nasty dag combiner bug that caused nondeterminstic crashes (MY FAVORITE!):
Chris Lattner [Sat, 27 May 2006 00:43:02 +0000 (00:43 +0000)]
Fix a nasty dag combiner bug that caused nondeterminstic crashes (MY FAVORITE!):
SimplifySelectOps would eliminate a Select, delete it, then return true.

The clients would see that it did something and return null.

The top level would see a null return, and decide that nothing happened,
proceeding to process the node in other ways: boom.

The fix is simple: clients of SimplifySelectOps should return the select
node itself.

In order to catch really obnoxious boogs like this in the future, add an
assert that nodes are not deleted.  We do this by checking for a sentry node
type that the SDNode dtor sets when a node is destroyed.

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

18 years agoAdd a new sentry node type, allowing assertions to catch trivial
Chris Lattner [Sat, 27 May 2006 00:40:15 +0000 (00:40 +0000)]
Add a new sentry node type, allowing assertions to catch trivial
use-after-deleted errors.

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

18 years agoA few small clean-ups, and the addition of an LCSSA statistic.
Owen Anderson [Sat, 27 May 2006 00:31:37 +0000 (00:31 +0000)]
A few small clean-ups, and the addition of an LCSSA statistic.

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

18 years agoMake CALL node consistent with RET node. Signness of value has type MVT::i32
Evan Cheng [Fri, 26 May 2006 23:13:20 +0000 (23:13 +0000)]
Make CALL node consistent with RET node. Signness of value has type MVT::i32
instead of MVT::i1. Either is fine except MVT::i32 is probably a legal type
for most (if not all) platforms while MVT::i1 is not.

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

18 years agoChange RET node to include signness information of the return values. i.e.
Evan Cheng [Fri, 26 May 2006 23:10:12 +0000 (23:10 +0000)]
Change RET node to include signness information of the return values. i.e.
RET chain, value1, sign1, value2, sign2, ...

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

18 years agoChange RET node to include signness information of the return values. e.g.
Evan Cheng [Fri, 26 May 2006 23:09:09 +0000 (23:09 +0000)]
Change RET node to include signness information of the return values. e.g.
RET chain, value1, sign1, value2, sign2

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

18 years agoTrivial testcase that LCSSA can already handle.
Owen Anderson [Fri, 26 May 2006 21:59:20 +0000 (21:59 +0000)]
Trivial testcase that LCSSA can already handle.

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

18 years agoFix a copy-and-paste-o that would break some compilers.
Owen Anderson [Fri, 26 May 2006 21:19:17 +0000 (21:19 +0000)]
Fix a copy-and-paste-o that would break some compilers.

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

18 years agoClean up and refactor LCSSA a bunch. It should also run faster now, though
Owen Anderson [Fri, 26 May 2006 21:11:53 +0000 (21:11 +0000)]
Clean up and refactor LCSSA a bunch.  It should also run faster now, though
there's still a lot of work to be done on it.

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

18 years agoVector argument must be passed in memory location aligned on 16-byte boundary.
Evan Cheng [Fri, 26 May 2006 20:37:47 +0000 (20:37 +0000)]
Vector argument must be passed in memory location aligned on 16-byte boundary.

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

18 years agoMac OS X ABI document lied. The first four XMM registers are used to pass
Evan Cheng [Fri, 26 May 2006 19:22:06 +0000 (19:22 +0000)]
Mac OS X ABI document lied. The first four XMM registers are used to pass
vector arguments, not three.

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

18 years agoImplement Transforms/InstCombine/store.ll:test2.
Chris Lattner [Fri, 26 May 2006 19:19:20 +0000 (19:19 +0000)]
Implement Transforms/InstCombine/store.ll:test2.

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

18 years agoNew testcase for trivial DSE
Chris Lattner [Fri, 26 May 2006 19:18:40 +0000 (19:18 +0000)]
New testcase for trivial DSE

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

18 years agoFix a bug in the bc reader/writer: we were not correctly encoding varargs
Chris Lattner [Fri, 26 May 2006 18:42:34 +0000 (18:42 +0000)]
Fix a bug in the bc reader/writer: we were not correctly encoding varargs
nonccc calls (we were dropping the CC and tail flag).  This broke several
FORTRAN programs.

Testcase here: Regression/Assembler/2006-05-26-VarargsCallEncode.ll

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

18 years agoNew testcase, check that the bc file correctly encodes varargs nonccc calls.
Chris Lattner [Fri, 26 May 2006 18:41:26 +0000 (18:41 +0000)]
New testcase, check that the bc file correctly encodes varargs nonccc calls.

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

18 years agoMinor update to make the code more clear
Evan Cheng [Fri, 26 May 2006 18:39:59 +0000 (18:39 +0000)]
Minor update to make the code more clear

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

18 years agoUpdate more comments.
Evan Cheng [Fri, 26 May 2006 18:37:16 +0000 (18:37 +0000)]
Update more comments.

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

18 years agoFix some comments.
Evan Cheng [Fri, 26 May 2006 18:25:43 +0000 (18:25 +0000)]
Fix some comments.

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

18 years agoNo need to handle illegal types.
Evan Cheng [Fri, 26 May 2006 18:22:49 +0000 (18:22 +0000)]
No need to handle illegal types.

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

18 years agoSkeletal LCSSA pass. This is currently non-functional. Expect functionality
Owen Anderson [Fri, 26 May 2006 13:58:26 +0000 (13:58 +0000)]
Skeletal LCSSA pass.  This is currently non-functional.  Expect functionality
and documentation updates soo.

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

18 years agoOn ARM, alignment is in bits
Rafael Espindola [Fri, 26 May 2006 10:56:17 +0000 (10:56 +0000)]
On ARM, alignment is in bits
Add lr as a hard coded operand of bx

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

18 years agoRemove a couple of bogus casts.
Evan Cheng [Fri, 26 May 2006 08:04:31 +0000 (08:04 +0000)]
Remove a couple of bogus casts.

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

18 years agoRemove a bogus cast.
Evan Cheng [Fri, 26 May 2006 08:00:14 +0000 (08:00 +0000)]
Remove a bogus cast.

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

18 years agoMinor bug caught by Ashwin Chandra
Evan Cheng [Fri, 26 May 2006 06:22:34 +0000 (06:22 +0000)]
Minor bug caught by Ashwin Chandra

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

18 years agoTransform things like (splat(splat)) -> splat
Chris Lattner [Fri, 26 May 2006 00:29:06 +0000 (00:29 +0000)]
Transform things like (splat(splat)) -> splat

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

18 years agoIntroduce a helper function that simplifies interpretation of shuffle masks.
Chris Lattner [Thu, 25 May 2006 23:48:38 +0000 (23:48 +0000)]
Introduce a helper function that simplifies interpretation of shuffle masks.
No functionality change.

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

18 years agoConsistency
Evan Cheng [Thu, 25 May 2006 23:31:23 +0000 (23:31 +0000)]
Consistency

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

18 years agoTurn (cast (shuffle (cast)) -> shuffle (cast) if it reduces the # casts in
Chris Lattner [Thu, 25 May 2006 23:24:33 +0000 (23:24 +0000)]
Turn (cast (shuffle (cast)) -> shuffle (cast) if it reduces the # casts in
the program.  This exposes more opportunities for the instcombiner, and implements
vec_shuffle.ll:test6

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

18 years agonew testcase
Chris Lattner [Thu, 25 May 2006 23:23:22 +0000 (23:23 +0000)]
new testcase

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

18 years agoextract element from a shuffle vector can be trivially turned into an
Chris Lattner [Thu, 25 May 2006 22:53:38 +0000 (22:53 +0000)]
extract element from a shuffle vector can be trivially turned into an
extractelement from the SV's source.  This implement vec_shuffle.ll:test[45]

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

18 years agonew testcases
Chris Lattner [Thu, 25 May 2006 22:52:49 +0000 (22:52 +0000)]
new testcases

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

18 years agoSome clean up.
Evan Cheng [Thu, 25 May 2006 22:38:31 +0000 (22:38 +0000)]
Some clean up.

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

18 years agoAdd support for the missing FP condition codes
Chris Lattner [Thu, 25 May 2006 22:26:02 +0000 (22:26 +0000)]
Add support for the missing FP condition codes

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

18 years agoRemove some dead code.
Evan Cheng [Thu, 25 May 2006 22:25:52 +0000 (22:25 +0000)]
Remove some dead code.

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

18 years agoX86 / Cygwin asm / alignment fixes.
Evan Cheng [Thu, 25 May 2006 21:59:08 +0000 (21:59 +0000)]
X86 / Cygwin asm / alignment fixes.
Patch contributed by Anton Korobeynikov!

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

18 years agoThe patch corresponding to this test had to be reverted as unsafe.
Chris Lattner [Thu, 25 May 2006 21:25:54 +0000 (21:25 +0000)]
The patch corresponding to this test had to be reverted as unsafe.

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

18 years agoRevert a patch that is unsafe, due to out of range array accesses in inner
Chris Lattner [Thu, 25 May 2006 21:25:12 +0000 (21:25 +0000)]
Revert a patch that is unsafe, due to out of range array accesses in inner
array scopes possibly accessing valid memory in outer subscripts.

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

18 years agoNew test case. x86 isel was creating a cycle in the DAG.
Evan Cheng [Thu, 25 May 2006 20:21:19 +0000 (20:21 +0000)]
New test case. x86 isel was creating a cycle in the DAG.

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

18 years agoCan't trust NodeDepth when checking for possibility of load folding creating
Evan Cheng [Thu, 25 May 2006 20:16:55 +0000 (20:16 +0000)]
Can't trust NodeDepth when checking for possibility of load folding creating
a cycle. This increase the search space and will increase compile time (in
practice it appears to be small, e.g. 176.gcc goes from 62 sec to 65 sec)
that will be addressed later.

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

18 years agoBuild breakage.
Evan Cheng [Thu, 25 May 2006 18:56:34 +0000 (18:56 +0000)]
Build breakage.

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

18 years agoFix build failure of povray
Chris Lattner [Thu, 25 May 2006 18:06:16 +0000 (18:06 +0000)]
Fix build failure of povray

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