oota-llvm.git
16 years agoFix a nasty bug in LegalizeTypes (spotted in
Duncan Sands [Tue, 26 Feb 2008 11:21:42 +0000 (11:21 +0000)]
Fix a nasty bug in LegalizeTypes (spotted in
CodeGen/PowerPC/illegal-element-type.ll): suppose
a node X is processed, and processing maps it to
a node Y.  Then X continues to exist in the DAG,
but with no users.  While processing some other
node, a new node may be created that happens to
be equal to X, and thus X will be reused rather
than a truly new node.  This can cause X to
"magically reappear", and since it is in the
Processed state in will not be reprocessed, so
at the end of type legalization the illegal node
X can still be present.  The solution is to replace
X with Y whenever X gets resurrected like this.

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

16 years agoDe-tabify
Bill Wendling [Tue, 26 Feb 2008 10:57:23 +0000 (10:57 +0000)]
De-tabify

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

16 years agoDe-tabify.
Bill Wendling [Tue, 26 Feb 2008 10:53:30 +0000 (10:53 +0000)]
De-tabify.

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

16 years agoDe-tabify.
Bill Wendling [Tue, 26 Feb 2008 10:51:52 +0000 (10:51 +0000)]
De-tabify.

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

16 years agoDetabify
Bill Wendling [Tue, 26 Feb 2008 10:49:39 +0000 (10:49 +0000)]
Detabify

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

16 years agoDetabify.
Bill Wendling [Tue, 26 Feb 2008 10:46:10 +0000 (10:46 +0000)]
Detabify.

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

16 years agoDe-tabify.
Bill Wendling [Tue, 26 Feb 2008 10:45:29 +0000 (10:45 +0000)]
De-tabify.

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

16 years agoAdd support for intermodule tail calls on x86/32bit with
Arnold Schwaighofer [Tue, 26 Feb 2008 10:21:54 +0000 (10:21 +0000)]
Add support for intermodule tail calls on x86/32bit with
GOT-style position independent code. Before only tail calls to
protected/hidden functions within the same module were optimized.
Now all function calls are tail call optimized.

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

16 years agoChange the lowering of arguments for tail call optimized
Arnold Schwaighofer [Tue, 26 Feb 2008 09:19:59 +0000 (09:19 +0000)]
Change the lowering of arguments for tail call optimized
calls. Before arguments that could overwrite each other were
explicitly lowered to a stack slot, not giving the register allocator
a chance to optimize. Now a sequence of copyto/copyfrom virtual
registers ensures that arguments are loaded in (virtual) registers
before they are lowered to the stack slot (and might overwrite each
other). Also parameter stack slots are marked mutable for
(potentially) tail calling functions.

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

16 years agoThis is possible:
Evan Cheng [Tue, 26 Feb 2008 08:03:41 +0000 (08:03 +0000)]
This is possible:
vr1 = extract_subreg vr2, 3
...
vr3 = extract_subreg vr1, 2
The end result is vr3 is equal to vr2 with subidx 2.

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

16 years agoFix isNegatibleForFree to not return true for ConstantFP nodes
Chris Lattner [Tue, 26 Feb 2008 07:04:54 +0000 (07:04 +0000)]
Fix isNegatibleForFree to not return true for ConstantFP nodes
after legalize.  Just because a constant is legal (e.g. 0.0 in SSE)
doesn't mean that its negated value is legal (-0.0).  We could make
this stronger by checking to see if the negated constant is actually
legal post negation, but it doesn't seem like a big deal.

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

16 years agoFix PR2076. CodeGenPrepare now sinks address computation for inline asm memory
Evan Cheng [Tue, 26 Feb 2008 02:42:37 +0000 (02:42 +0000)]
Fix PR2076. CodeGenPrepare now sinks address computation for inline asm memory
operands into inline asm block.

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

16 years agoRefactor inline asm constraint matching code out of SDIsel into TargetLowering.
Evan Cheng [Tue, 26 Feb 2008 02:33:44 +0000 (02:33 +0000)]
Refactor inline asm constraint matching code out of SDIsel into TargetLowering.

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

16 years agoRemove debugging help.
Devang Patel [Tue, 26 Feb 2008 01:42:38 +0000 (01:42 +0000)]
Remove debugging help.

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

16 years agotest svn commit capability
Nick Kledzik [Tue, 26 Feb 2008 01:36:52 +0000 (01:36 +0000)]
test svn commit capability

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

16 years agoUpdate bitcode reader and writer to handle multiple return values.
Devang Patel [Tue, 26 Feb 2008 01:29:32 +0000 (01:29 +0000)]
Update bitcode reader and writer to handle multiple return values.
Take 2.

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

16 years agoPass const vectors by reference.
Devang Patel [Tue, 26 Feb 2008 00:12:13 +0000 (00:12 +0000)]
Pass const vectors by reference.

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

16 years agoAdd missing include (for ptrdiff_t).
Eli Friedman [Mon, 25 Feb 2008 23:35:32 +0000 (23:35 +0000)]
Add missing include (for ptrdiff_t).

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

16 years agoRevert the assert for MUL_LOHI with an unused high result; Chris
Dan Gohman [Mon, 25 Feb 2008 22:43:48 +0000 (22:43 +0000)]
Revert the assert for MUL_LOHI with an unused high result; Chris
pointed out that this isn't correct at -O0.

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

16 years agowhen making bytecode modules, link as library
Andrew Lenharth [Mon, 25 Feb 2008 22:41:55 +0000 (22:41 +0000)]
when making bytecode modules, link as library

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

16 years agoRevise previous patch per review.
Dale Johannesen [Mon, 25 Feb 2008 22:29:22 +0000 (22:29 +0000)]
Revise previous patch per review.

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

16 years agoFactor the assert for indexed loads/stores out of LoadSDNode
Dan Gohman [Mon, 25 Feb 2008 22:16:29 +0000 (22:16 +0000)]
Factor the assert for indexed loads/stores out of LoadSDNode
and StoreSDNode into LSBaseSDNode.

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

16 years agoAdd an assert to verify that we don't see an
Dan Gohman [Mon, 25 Feb 2008 22:15:55 +0000 (22:15 +0000)]
Add an assert to verify that we don't see an
{S,U}MUL_LOHI with an unused high value.

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

16 years agoRemove the hack that turned an {S,U}MUL_LOHI with an unused high
Dan Gohman [Mon, 25 Feb 2008 21:57:04 +0000 (21:57 +0000)]
Remove the hack that turned an {S,U}MUL_LOHI with an unused high
result into a MUL late in the X86 codegen process. ISD::MUL is
once again Legal on X86, so this is no longer needed. And, the
hack was suboptimal; see PR1874 for details.

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

16 years agoMake some static variables const.
Dan Gohman [Mon, 25 Feb 2008 21:39:34 +0000 (21:39 +0000)]
Make some static variables const.

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

16 years agoadd an assertion to catch a null PATypeHolder, patch by Erick Tryzelaar
Chris Lattner [Mon, 25 Feb 2008 21:28:46 +0000 (21:28 +0000)]
add an assertion to catch a null PATypeHolder, patch by Erick Tryzelaar

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

16 years agoConvert MaskedValueIsZero and all its users to use APInt. Also add
Dan Gohman [Mon, 25 Feb 2008 21:11:39 +0000 (21:11 +0000)]
Convert MaskedValueIsZero and all its users to use APInt. Also add
a SignBitIsZero function to simplify a common use case.

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

16 years agoadd LSBaseSDNode::getOffset at Dan's request.
Chris Lattner [Mon, 25 Feb 2008 19:31:21 +0000 (19:31 +0000)]
add LSBaseSDNode::getOffset at Dan's request.

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

16 years agoAll remat'ed loads cannot be folded into two-address code. Not just argument loads...
Evan Cheng [Mon, 25 Feb 2008 19:24:01 +0000 (19:24 +0000)]
All remat'ed loads cannot be folded into two-address code. Not just argument loads. This change doesn't really have any impact on codegen.

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

16 years agoprune #includes, fit in 80 cols.
Chris Lattner [Mon, 25 Feb 2008 19:21:38 +0000 (19:21 +0000)]
prune #includes, fit in 80 cols.

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

16 years agomake this self contained.
Chris Lattner [Mon, 25 Feb 2008 19:20:57 +0000 (19:20 +0000)]
make this self contained.

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

16 years agoExpand removal of MMX memory copies to allow 1 level
Dale Johannesen [Mon, 25 Feb 2008 19:20:14 +0000 (19:20 +0000)]
Expand removal of MMX memory copies to allow 1 level
of TokenFactor underneath chain (seems to be enough)

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

16 years agoAdd a new method to SDNode/SDOperand named getValueSizeInBits
Dan Gohman [Mon, 25 Feb 2008 19:08:02 +0000 (19:08 +0000)]
Add a new method to SDNode/SDOperand named getValueSizeInBits
that combines getValueType and MVT::getSizeInBits, since this
occurrs frequently.

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

16 years agoIn debug builds check that the key property holds: all
Duncan Sands [Mon, 25 Feb 2008 16:21:21 +0000 (16:21 +0000)]
In debug builds check that the key property holds: all
result and operand types are legal.

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

16 years agoCorrectly determine whether a argument load can be folded into its uses.
Evan Cheng [Mon, 25 Feb 2008 08:50:41 +0000 (08:50 +0000)]
Correctly determine whether a argument load can be folded into its uses.

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

16 years agoFix an issue where GVN was performing the return slot optimization when it was
Owen Anderson [Mon, 25 Feb 2008 04:08:09 +0000 (04:08 +0000)]
Fix an issue where GVN was performing the return slot optimization when it was
not safe.  This is fixed by more aggressively checking that the return slot is
not used elsewhere in the function.

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

16 years agoTemporarily reverting 46959.
Evan Cheng [Mon, 25 Feb 2008 03:57:32 +0000 (03:57 +0000)]
Temporarily reverting 46959.

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

16 years agoFix an issue where GVN would try to use an instruction before its definition when...
Owen Anderson [Mon, 25 Feb 2008 00:40:41 +0000 (00:40 +0000)]
Fix an issue where GVN would try to use an instruction before its definition when performing return slot optimization.

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

16 years agoAdd support to LegalizeTypes for building legal vectors
Duncan Sands [Sun, 24 Feb 2008 07:36:03 +0000 (07:36 +0000)]
Add support to LegalizeTypes for building legal vectors
out of illegal elements (BUILD_VECTOR).  Uses and beefs
up BUILD_PAIR, though it didn't really have to.  Like
most of LegalizeTypes, does not support soft-float.
This cures all "make check" vector building failures.

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

16 years agoSome platforms use the same name for 32-bit and 64-bit registers (like
Bill Wendling [Sun, 24 Feb 2008 00:56:13 +0000 (00:56 +0000)]
Some platforms use the same name for 32-bit and 64-bit registers (like
%r3 on PPC) in their ASM files. However, it's hard for humans to read
during debugging. Adding a new field to the register data that lets you
specify a different name to be printed than the one that goes into the
ASM file -- %x3 instead of %r3, for instance.

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

16 years agoBacking out r47521 for now. This has broken a number of tests.
Evan Cheng [Sat, 23 Feb 2008 19:32:32 +0000 (19:32 +0000)]
Backing out r47521 for now. This has broken a number of tests.

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

16 years agoMerge current work back to tree to minimize diffs and drift. Major highlights
Scott Michel [Sat, 23 Feb 2008 18:41:37 +0000 (18:41 +0000)]
Merge current work back to tree to minimize diffs and drift. Major highlights
for CellSPU modifications:

- SPUInstrInfo.td refactoring: "multiclass" really is _your_ friend.
- Other improvements based on refactoring effort in SPUISelLowering.cpp,
  esp. in SPUISelLowering::PerformDAGCombine(), where zero amount shifts and
  rotates are now eliminiated, other scalar-to-vector-to-scalar silliness
  is also eliminated.
- 64-bit operations are being implemented, _muldi3.c gcc runtime now
  compiles and generates the right code. More work still needs to be done.

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

16 years agoTestcase for Revision 47478.
Zhou Sheng [Sat, 23 Feb 2008 10:59:51 +0000 (10:59 +0000)]
Testcase for Revision 47478.

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

16 years agoRematerialization logic was overly conservative when it comes to loads from fixed...
Evan Cheng [Sat, 23 Feb 2008 03:38:34 +0000 (03:38 +0000)]
Rematerialization logic was overly conservative when it comes to loads from fixed stack slots.

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

16 years agoUpdate test.
Evan Cheng [Sat, 23 Feb 2008 02:57:25 +0000 (02:57 +0000)]
Update test.

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

16 years agoIf remating a machine instr with virtual register operand, make sure the vr is avalia...
Evan Cheng [Sat, 23 Feb 2008 02:14:42 +0000 (02:14 +0000)]
If remating a machine instr with virtual register operand, make sure the vr is avaliable at all uses regardless of whether it would be folded.

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

16 years agoRemat of pic loads are now on by default.
Evan Cheng [Sat, 23 Feb 2008 02:08:30 +0000 (02:08 +0000)]
Remat of pic loads are now on by default.

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

16 years agoTurning on remat of pic loads.
Evan Cheng [Sat, 23 Feb 2008 02:07:42 +0000 (02:07 +0000)]
Turning on remat of pic loads.

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

16 years agoFix a bug that caused opt and other tools to silently ignore
Dan Gohman [Sat, 23 Feb 2008 01:55:25 +0000 (01:55 +0000)]
Fix a bug that caused opt and other tools to silently ignore
invalid command-line options.

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

16 years agoNo need recognize load from a fixed argument slot as re-materializable. LiveIntervalA...
Evan Cheng [Sat, 23 Feb 2008 01:47:44 +0000 (01:47 +0000)]
No need recognize load from a fixed argument slot as re-materializable. LiveIntervalAnalysis already handles it as a special case.

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

16 years agoProperly read and write bitcodes for multiple return values.
Devang Patel [Sat, 23 Feb 2008 01:44:55 +0000 (01:44 +0000)]
Properly read and write bitcodes for multiple return values.

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

16 years agoRecognize loads of arguments as re-materializable first. Therefore if isReallyTrivial...
Evan Cheng [Sat, 23 Feb 2008 01:44:27 +0000 (01:44 +0000)]
Recognize loads of arguments as re-materializable first. Therefore if isReallyTriviallyReMaterializable() returns true it doesn't confuse it as a "normal" re-materializable instruction.

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

16 years agoRegenerate.
Devang Patel [Sat, 23 Feb 2008 01:17:37 +0000 (01:17 +0000)]
Regenerate.

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

16 years agoUse isa check instead of getTypeID() check.
Devang Patel [Sat, 23 Feb 2008 01:17:17 +0000 (01:17 +0000)]
Use isa check instead of getTypeID() check.

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

16 years agoFixed buffer overflow reported by Argiris Kirtzidis.
Ted Kremenek [Sat, 23 Feb 2008 01:11:40 +0000 (01:11 +0000)]
Fixed buffer overflow reported by Argiris Kirtzidis.

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

16 years agoRemove unnecessary "inline" keywords.
Devang Patel [Sat, 23 Feb 2008 01:11:02 +0000 (01:11 +0000)]
Remove unnecessary "inline" keywords.

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

16 years agoprint getresult operand and its type directly.
Devang Patel [Sat, 23 Feb 2008 01:04:26 +0000 (01:04 +0000)]
print getresult operand and its type directly.

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

16 years agoReally. Why doesn't every arch support MMX?
Evan Cheng [Sat, 23 Feb 2008 00:56:14 +0000 (00:56 +0000)]
Really. Why doesn't every arch support MMX?

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

16 years agoUse dyn_cast instead of isa + cast.
Devang Patel [Sat, 23 Feb 2008 00:47:00 +0000 (00:47 +0000)]
Use dyn_cast instead of isa + cast.

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

16 years agoForgot this.
Evan Cheng [Sat, 23 Feb 2008 00:46:11 +0000 (00:46 +0000)]
Forgot this.

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

16 years agoRegenerate
Devang Patel [Sat, 23 Feb 2008 00:38:56 +0000 (00:38 +0000)]
Regenerate

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

16 years agoTo support multiple return values, now ret instruction supports multiple operands...
Devang Patel [Sat, 23 Feb 2008 00:35:18 +0000 (00:35 +0000)]
To support multiple return values, now ret instruction supports multiple operands instead of one aggregate operand.

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

16 years agoFix spill weight updating bug.
Evan Cheng [Sat, 23 Feb 2008 00:33:04 +0000 (00:33 +0000)]
Fix spill weight updating bug.

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

16 years agoSplit ParameterAttributes.h, putting the complicated
Dale Johannesen [Fri, 22 Feb 2008 22:17:59 +0000 (22:17 +0000)]
Split ParameterAttributes.h, putting the complicated
stuff into ParamAttrsList.h.  Per feedback from
ParamAttrs changes.

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

16 years agoImproving wording.
Gordon Henriksen [Fri, 22 Feb 2008 21:55:51 +0000 (21:55 +0000)]
Improving wording.

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

16 years agoAdding a note about IR generation to the LLVM FAQ.
Gordon Henriksen [Fri, 22 Feb 2008 20:58:29 +0000 (20:58 +0000)]
Adding a note about IR generation to the LLVM FAQ.

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

16 years agoTest case for PR2082.
Evan Cheng [Fri, 22 Feb 2008 20:38:49 +0000 (20:38 +0000)]
Test case for PR2082.

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

16 years agoSame isPhysRegAvailable bug as local register allocator.
Evan Cheng [Fri, 22 Feb 2008 20:31:32 +0000 (20:31 +0000)]
Same isPhysRegAvailable bug as local register allocator.

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

16 years agoReally really bad local register allocator bug. On X86, it was never using ESI, EDI...
Evan Cheng [Fri, 22 Feb 2008 20:30:53 +0000 (20:30 +0000)]
Really really bad local register allocator bug. On X86, it was never using ESI, EDI, and EBP because of a bug in RALocal::isPhysRegAvailable(). For example, when
it checks if ESI is available, it then looks at registers aliases to ESI. SIL is marked -2 (not allocatable) but isPhysRegAvailable() incorrectly assumes it is in use and returns false for ESI.

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

16 years agoAdd debugging printfs.
Evan Cheng [Fri, 22 Feb 2008 19:57:06 +0000 (19:57 +0000)]
Add debugging printfs.

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

16 years agoRegenerate
Devang Patel [Fri, 22 Feb 2008 19:31:30 +0000 (19:31 +0000)]
Regenerate

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

16 years agoUse SymbolicValueRef to parse getresult operand
Devang Patel [Fri, 22 Feb 2008 19:31:15 +0000 (19:31 +0000)]
Use SymbolicValueRef to parse getresult operand

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

16 years agoRemove an invalid assertion now that there are implicit virtual register operands.
Evan Cheng [Fri, 22 Feb 2008 19:25:04 +0000 (19:25 +0000)]
Remove an invalid assertion now that there are implicit virtual register operands.

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

16 years agoMake sure reload of implicit uses are issued before remat's.
Evan Cheng [Fri, 22 Feb 2008 19:22:06 +0000 (19:22 +0000)]
Make sure reload of implicit uses are issued before remat's.

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

16 years agoAdd StripDeadPrototypes pass.
Devang Patel [Fri, 22 Feb 2008 18:39:29 +0000 (18:39 +0000)]
Add StripDeadPrototypes pass.

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

16 years agoGenerated files for 47484.
Dale Johannesen [Fri, 22 Feb 2008 17:50:51 +0000 (17:50 +0000)]
Generated files for 47484.

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

16 years agoPass alignment on ByVal parameters, from FE, all
Dale Johannesen [Fri, 22 Feb 2008 17:49:45 +0000 (17:49 +0000)]
Pass alignment on ByVal parameters, from FE, all
the way through.  It is now used for codegen.

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

16 years agoMMX vectors are passed 4-byte aligned.
Dale Johannesen [Fri, 22 Feb 2008 17:47:28 +0000 (17:47 +0000)]
MMX vectors are passed 4-byte aligned.

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

16 years agoAdd smart refcounting pointer class to ADT back (known before as IntrusiveSPtr.h).
Anton Korobeynikov [Fri, 22 Feb 2008 17:26:05 +0000 (17:26 +0000)]
Add smart refcounting pointer class to ADT back (known before as IntrusiveSPtr.h).

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

16 years agofix some bugs in tutorial, patch by Erick Tryzelaar
Chris Lattner [Fri, 22 Feb 2008 17:09:39 +0000 (17:09 +0000)]
fix some bugs in tutorial, patch by Erick Tryzelaar

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

16 years agoUnbreak build for VC2008. Patch by Argiris Kirtzidis!
Anton Korobeynikov [Fri, 22 Feb 2008 10:11:21 +0000 (10:11 +0000)]
Unbreak build for VC2008. Patch by Argiris Kirtzidis!

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

16 years agoProvide __main hooks for cygwin & mingw32
Anton Korobeynikov [Fri, 22 Feb 2008 10:08:31 +0000 (10:08 +0000)]
Provide __main hooks for cygwin & mingw32

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

16 years agoFixed a typo.
Zhou Sheng [Fri, 22 Feb 2008 10:00:35 +0000 (10:00 +0000)]
Fixed a typo.

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

16 years agoAllow re-materialization of pic load (controlled by -remat-pic-load for now).
Evan Cheng [Fri, 22 Feb 2008 09:25:47 +0000 (09:25 +0000)]
Allow re-materialization of pic load (controlled by -remat-pic-load for now).

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

16 years agoEnable re-materialization of instructions which have virtual register operands if
Evan Cheng [Fri, 22 Feb 2008 09:24:50 +0000 (09:24 +0000)]
Enable re-materialization of instructions which have virtual register operands if
the definition of the operand also reaches its uses.

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

16 years agocopy mmx values from/to memory with GPRs on x86-32
Chris Lattner [Fri, 22 Feb 2008 05:18:04 +0000 (05:18 +0000)]
copy mmx values from/to memory with GPRs on x86-32
instead of with mmx registers.  This horribleness is apparently
done by gcc to avoid having to insert emms in places that really
should have it.  This is the second half of rdar://5741668.

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

16 years agoPrint getresult instruction properly.
Devang Patel [Fri, 22 Feb 2008 03:10:23 +0000 (03:10 +0000)]
Print getresult instruction properly.

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

16 years agoPrint ret instruction that returns aggregates.
Devang Patel [Fri, 22 Feb 2008 02:50:49 +0000 (02:50 +0000)]
Print ret instruction that returns aggregates.

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

16 years agoRead and write getresult.
Devang Patel [Fri, 22 Feb 2008 02:49:49 +0000 (02:49 +0000)]
Read and write getresult.

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

16 years agoStart using GPR's to copy around mmx value instead of mmx regs.
Chris Lattner [Fri, 22 Feb 2008 02:09:43 +0000 (02:09 +0000)]
Start using GPR's to copy around mmx value instead of mmx regs.
GCC apparently does this, and code depends on not having to do
emms when this happens.  This is x86-64 only so far, second half
should handle x86-32.

rdar://5741668

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

16 years agominor cleanups to LSBaseSDNode.
Chris Lattner [Fri, 22 Feb 2008 01:54:35 +0000 (01:54 +0000)]
minor cleanups to LSBaseSDNode.

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

16 years agoFix compiler warning.
Evan Cheng [Fri, 22 Feb 2008 01:48:00 +0000 (01:48 +0000)]
Fix compiler warning.

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

16 years agoFix a regression in 403.gcc and 186.crafty introduced in 47383. To test
Dan Gohman [Fri, 22 Feb 2008 01:12:31 +0000 (01:12 +0000)]
Fix a regression in 403.gcc and 186.crafty introduced in 47383. To test
that a value is >= 32, check that all of the high bits are zero, not
just one or more.

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

16 years agoprint getresult instruction.
Devang Patel [Thu, 21 Feb 2008 23:02:20 +0000 (23:02 +0000)]
print getresult instruction.

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

16 years agoUse isa<> instead of getTypeID() to check StructType.
Devang Patel [Thu, 21 Feb 2008 22:24:17 +0000 (22:24 +0000)]
Use isa<> instead of getTypeID() to check StructType.

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

16 years agoA few minor updates, removing implemented stuff and adding a couple of
Eli Friedman [Thu, 21 Feb 2008 21:16:49 +0000 (21:16 +0000)]
A few minor updates, removing implemented stuff and adding a couple of
new things.

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

16 years agoMake the clobber analysis a bit more smart: we only are careful about
Chris Lattner [Thu, 21 Feb 2008 20:54:31 +0000 (20:54 +0000)]
Make the clobber analysis a bit more smart: we only are careful about
early clobbers if the clobber list contains a *register* not some thing
like {memory}, {dirflag} etc.

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

16 years agoTreat clobber operands like early clobbers: if we have
Chris Lattner [Thu, 21 Feb 2008 19:43:13 +0000 (19:43 +0000)]
Treat clobber operands like early clobbers: if we have
any, we force sdisel to do all regalloc for an asm.  This
leads to gross but correct codegen.

This fixes the rest of PR2078.

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

16 years agoClear PhysRegPartUse for the sub register as well.
Bill Wendling [Thu, 21 Feb 2008 19:35:27 +0000 (19:35 +0000)]
Clear PhysRegPartUse for the sub register as well.

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

16 years agoAdjust the MaxAlignment for the special register scavenging spill slot.
Bill Wendling [Thu, 21 Feb 2008 19:33:53 +0000 (19:33 +0000)]
Adjust the MaxAlignment for the special register scavenging spill slot.

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