oota-llvm.git
15 years agoModify getRegisterValueType() to allow for a register being in mutliple
Jim Grosbach [Wed, 25 Mar 2009 23:28:33 +0000 (23:28 +0000)]
Modify getRegisterValueType() to allow for a register being in mutliple
register classes. Before, MVT::Other would be returned anytime a reg was
in multiple register classes. Now, MVT::Other is only returned if the types
for those register classes differ.

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

15 years agoAdd a test case for PR3779: when to promote the function return value.
Evan Cheng [Wed, 25 Mar 2009 20:30:19 +0000 (20:30 +0000)]
Add a test case for PR3779: when to promote the function return value.

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

15 years agoRevert 67132. This is breaking some objective-c apps.
Evan Cheng [Wed, 25 Mar 2009 20:20:11 +0000 (20:20 +0000)]
Revert 67132. This is breaking some objective-c apps.
Also fixes SDISel so it *does not* force promote return value if the function is not marked signext / zeroext.

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

15 years agoOne more test.
Evan Cheng [Wed, 25 Mar 2009 17:45:18 +0000 (17:45 +0000)]
One more test.

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

15 years agoWhen optimizing with debug info, don't keep the
Dale Johannesen [Wed, 25 Mar 2009 17:36:08 +0000 (17:36 +0000)]
When optimizing with debug info, don't keep the
stoppoint nodes around until Legalize; doing this
imposed an ordering on a sequence of loads that
came from different lines, interfering with scheduling.

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

15 years agoAdd __builtin___memcpy_chk tests.
Evan Cheng [Wed, 25 Mar 2009 16:49:31 +0000 (16:49 +0000)]
Add __builtin___memcpy_chk tests.

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

15 years agoThese tests pass on linux.
Duncan Sands [Wed, 25 Mar 2009 16:43:59 +0000 (16:43 +0000)]
These tests pass on linux.

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

15 years agoAdd a __builtin_object_size test.
Evan Cheng [Wed, 25 Mar 2009 16:29:33 +0000 (16:29 +0000)]
Add a __builtin_object_size test.

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

15 years agoFix a bug in our autoupgrade support: in an argument list to a function
Chris Lattner [Wed, 25 Mar 2009 06:36:36 +0000 (06:36 +0000)]
Fix a bug in our autoupgrade support: in an argument list to a function
call, we should treat "i64 zext" as the start of a constant expr, but
"i64 0 zext" as an argument with an obsolete attribute on it (this form
is already tested by test/Assembler/2007-07-30-AutoUpgradeZextSext.ll).

Make the autoupgrade logic more discerning to avoid treating "i64 zext"
as an old-style attribute, causing us to reject a valid constant expr.
This fixes PR3876.

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

15 years agodo not rely on callee being operand 0
Gabor Greif [Wed, 25 Mar 2009 06:32:59 +0000 (06:32 +0000)]
do not rely on callee being operand 0

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

15 years agoDo not ignore DW_TAG_class_type!
Devang Patel [Wed, 25 Mar 2009 03:52:06 +0000 (03:52 +0000)]
Do not ignore DW_TAG_class_type!

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

15 years agoCodeGen still defaults to non-verbose asm, but llc now overrides it and default to...
Evan Cheng [Wed, 25 Mar 2009 01:48:21 +0000 (01:48 +0000)]
CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.

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

15 years agoCodeGen still defaults to non-verbose asm, but llc now overrides it and default to...
Evan Cheng [Wed, 25 Mar 2009 01:47:28 +0000 (01:47 +0000)]
CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.

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

15 years agoDon't print global names twice with -asm-verbose.
Evan Cheng [Wed, 25 Mar 2009 01:08:42 +0000 (01:08 +0000)]
Don't print global names twice with -asm-verbose.

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

15 years agoRevert r67655 and r67656, as they are breaking the build. I'm
Dan Gohman [Wed, 25 Mar 2009 00:52:11 +0000 (00:52 +0000)]
Revert r67655 and r67656, as they are breaking the build. I'm
not going to persue this further at this time.

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

15 years agoFix PR3874 by restoring a condition I removed, but making it more
Chris Lattner [Wed, 25 Mar 2009 00:28:58 +0000 (00:28 +0000)]
Fix PR3874 by restoring a condition I removed, but making it more
precise than it used to be.

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

15 years agoDo not ignore DW_TAG_class_type!
Devang Patel [Wed, 25 Mar 2009 00:28:40 +0000 (00:28 +0000)]
Do not ignore DW_TAG_class_type!

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

15 years agoLLVM's master Makefile.common is in LLVM_SRC_ROOT, not LLVM_OBJ_ROOT.
Dan Gohman [Wed, 25 Mar 2009 00:09:05 +0000 (00:09 +0000)]
LLVM's master Makefile.common is in LLVM_SRC_ROOT, not LLVM_OBJ_ROOT.

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

15 years agooops, I intended to remove this, not comment it out. Thanks Duncan!
Chris Lattner [Tue, 24 Mar 2009 23:48:25 +0000 (23:48 +0000)]
oops, I intended to remove this, not comment it out.  Thanks Duncan!

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

15 years agoRegenerate configure.
Dan Gohman [Tue, 24 Mar 2009 23:47:11 +0000 (23:47 +0000)]
Regenerate configure.

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

15 years agoFix paths; AutoRegen.sh changes its current working directory to be the
Dan Gohman [Tue, 24 Mar 2009 23:46:25 +0000 (23:46 +0000)]
Fix paths; AutoRegen.sh changes its current working directory to be the
autoconf directory, but these paths need to be relative to the main
source directory.

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

15 years agoUpdate for autoconf 2.6x;
Dan Gohman [Tue, 24 Mar 2009 23:45:13 +0000 (23:45 +0000)]
Update for autoconf 2.6x;

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

15 years agoConverted a1.ll to unittests.
Misha Brukman [Tue, 24 Mar 2009 21:36:09 +0000 (21:36 +0000)]
Converted a1.ll to unittests.

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

15 years agoMention explicitly that the Ada front-end will not bootstrap.
Duncan Sands [Tue, 24 Mar 2009 21:16:39 +0000 (21:16 +0000)]
Mention explicitly that the Ada front-end will not bootstrap.
The configure line had --disable-bootstrap, but it was not
clear that this is essential.

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

15 years agoFix PR3845: Avoid stale MachineInstruction pointer reference.
Evan Cheng [Tue, 24 Mar 2009 20:33:17 +0000 (20:33 +0000)]
Fix PR3845: Avoid stale MachineInstruction pointer reference.

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

15 years agoFix bash-isms.
Dan Gohman [Tue, 24 Mar 2009 20:21:37 +0000 (20:21 +0000)]
Fix bash-isms.

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

15 years agoSet the svn:mime-type to text/x-sh, so that diffs work.
Dan Gohman [Tue, 24 Mar 2009 20:20:28 +0000 (20:20 +0000)]
Set the svn:mime-type to text/x-sh, so that diffs work.

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

15 years agosimplify logic and get rid of the assumption that operand 0 is the callee
Gabor Greif [Tue, 24 Mar 2009 19:28:39 +0000 (19:28 +0000)]
simplify logic and get rid of the assumption that operand 0 is the callee

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

15 years agocanonicalize inttoptr and ptrtoint instructions which cast pointers
Chris Lattner [Tue, 24 Mar 2009 18:35:40 +0000 (18:35 +0000)]
canonicalize inttoptr and ptrtoint instructions which cast pointers
to/from integer types that are not intptr_t to convert to intptr_t
then do an integer conversion to the dest type.  This exposes the
cast to the optimizer.

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

15 years agofix one more fp80 case (used only by Interpreter)
Dale Johannesen [Tue, 24 Mar 2009 18:16:17 +0000 (18:16 +0000)]
fix one more fp80 case (used only by Interpreter)
and streamline code here a bit.

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

15 years agotwo changes:
Chris Lattner [Tue, 24 Mar 2009 18:15:30 +0000 (18:15 +0000)]
two changes:
1. Make instcombine always canonicalize trunc x to i1 into an icmp(x&1).  This
   exposes the AND to other instcombine xforms and is more of what the code
   generator expects.
2. Rewrite the remaining trunc pattern match to use 'match', which
   simplifies it a lot.

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

15 years agoChange JIT for different layout of fp80.
Dale Johannesen [Tue, 24 Mar 2009 17:35:45 +0000 (17:35 +0000)]
Change JIT for different layout of fp80.

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

15 years agoAdd a testcase for the scheduling heuristic introduced in r67586.
Dan Gohman [Tue, 24 Mar 2009 16:38:27 +0000 (16:38 +0000)]
Add a testcase for the scheduling heuristic introduced in r67586.

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

15 years agomore tidying: name the components of PhysReg in the case when
Chris Lattner [Tue, 24 Mar 2009 15:27:37 +0000 (15:27 +0000)]
more tidying: name the components of PhysReg in the case when
the target constraint specifies a specific physreg.

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

15 years agoTidy a bit more.
Chris Lattner [Tue, 24 Mar 2009 15:25:07 +0000 (15:25 +0000)]
Tidy a bit more.

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

15 years agosimplify this code a bit now that "allocation to a vreg class" can never
Chris Lattner [Tue, 24 Mar 2009 15:22:11 +0000 (15:22 +0000)]
simplify this code a bit now that "allocation to a vreg class" can never
fail.

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

15 years agoI was convinced that it's ok to allow a second i8 return value
Dan Gohman [Tue, 24 Mar 2009 01:04:34 +0000 (01:04 +0000)]
I was convinced that it's ok to allow a second i8 return value
to be returned in DL. LLVM's multiple-return-value support is
not ABI-conforming; front-ends that wish to have code emitted
that conforms to an ABI are currently expected to make
arrangements for this on their own rather than assuming that
multiple-return-values will automatically do the right thing.
This commit doesn't fundamentally change this situation.

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

15 years agoMinor compile-time optimization; don't bother checking
Dan Gohman [Tue, 24 Mar 2009 00:50:07 +0000 (00:50 +0000)]
Minor compile-time optimization; don't bother checking
canClobberPhysRegDefs if the successor node doesn't
clobber any physical registers.

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

15 years agoAdd a pre-pass to the burr-list scheduler which makes adjustments to
Dan Gohman [Tue, 24 Mar 2009 00:49:12 +0000 (00:49 +0000)]
Add a pre-pass to the burr-list scheduler which makes adjustments to
help out the register pressure reduction heuristics in the case of
nodes with multiple uses. Currently this uses very conservative
heuristics, so it doesn't have a broad impact, but in cases where it
does help it can make a big difference.

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

15 years agoDo not emit comments unless -asm-verbose.
Evan Cheng [Tue, 24 Mar 2009 00:17:40 +0000 (00:17 +0000)]
Do not emit comments unless -asm-verbose.

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

15 years agoUse a SmallPtrSet instead of std::set.
Dale Johannesen [Mon, 23 Mar 2009 23:39:20 +0000 (23:39 +0000)]
Use a SmallPtrSet instead of std::set.

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

15 years agoFix a bug in spill weight computation. If the alias is a super-register, and the...
Evan Cheng [Mon, 23 Mar 2009 22:57:19 +0000 (22:57 +0000)]
Fix a bug in spill weight computation. If the alias is a super-register, and the super-register is in the register class we are trying to allocate. Then add the weight to all sub-registers of the super-register even if they are not aliases.
e.g. allocating for GR32, bh is not used, updating bl spill weight.
     bl should get the same spill weight otherwise it will be choosen
     as a spill candidate since spilling bh doesn't make ebx available.
This fix PR2866.

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

15 years agoAdd sanity check in Clang TableGen backend to check if 'Component' is a string.
Ted Kremenek [Mon, 23 Mar 2009 21:54:33 +0000 (21:54 +0000)]
Add sanity check in Clang TableGen backend to check if 'Component' is a string.

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

15 years agoFix internal representation of fp80 to be the
Dale Johannesen [Mon, 23 Mar 2009 21:16:53 +0000 (21:16 +0000)]
Fix internal representation of fp80 to be the
same as a normal i80 {low64, high16} rather
than its own {high64, low16}.  A depressing number
of places know about this; I think I got them all.
Bitcode readers and writers convert back to the old
form to avoid breaking compatibility.

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

15 years agoREADME.txt: test commit w/blank line appended
John Mosby [Mon, 23 Mar 2009 21:00:45 +0000 (21:00 +0000)]
README.txt: test commit w/blank line appended

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

15 years agoWhen unfolding a load during scheduling, the new operator node has
Dan Gohman [Mon, 23 Mar 2009 20:20:43 +0000 (20:20 +0000)]
When unfolding a load during scheduling, the new operator node has
a data dependency on the load node, so it really needs a
data-dependence edge to the load node, even if the load previously
existed.

And add a few comments.

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

15 years agoUpdate test for pr3864.
Evan Cheng [Mon, 23 Mar 2009 18:27:36 +0000 (18:27 +0000)]
Update test for pr3864.

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

15 years agoFix PR3391 and PR3864. Reg allocator infinite looping.
Evan Cheng [Mon, 23 Mar 2009 18:24:37 +0000 (18:24 +0000)]
Fix PR3391 and PR3864. Reg allocator infinite looping.

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

15 years agoDon't set SUnit::hasPhysRegDefs to true unless the defs are
Dan Gohman [Mon, 23 Mar 2009 17:39:36 +0000 (17:39 +0000)]
Don't set SUnit::hasPhysRegDefs to true unless the defs are
actually have uses, which reflects the way it's used.

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

15 years agoFix canClobberPhysRegDefs to check all SDNodes grouped together
Dan Gohman [Mon, 23 Mar 2009 16:23:01 +0000 (16:23 +0000)]
Fix canClobberPhysRegDefs to check all SDNodes grouped together
in an SUnit, instead of just the first one. This fix is needed
by some upcoming scheduler changes.

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

15 years agoAdd a new bit to SUnit to record whether a node has implicit physreg
Dan Gohman [Mon, 23 Mar 2009 16:10:52 +0000 (16:10 +0000)]
Add a new bit to SUnit to record whether a node has implicit physreg
defs, regardless of whether they are actually used.

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

15 years agoNow that errs() is properly non-buffered, there's no need to
Dan Gohman [Mon, 23 Mar 2009 15:57:19 +0000 (15:57 +0000)]
Now that errs() is properly non-buffered, there's no need to
explicitly flush it.

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

15 years agoClarify a comment.
Dan Gohman [Mon, 23 Mar 2009 15:54:02 +0000 (15:54 +0000)]
Clarify a comment.

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

15 years agoLoopVR is not CFGOnly.
Dan Gohman [Mon, 23 Mar 2009 15:50:52 +0000 (15:50 +0000)]
LoopVR is not CFGOnly.

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

15 years agoEnhance LiveValues to work on PHI operands.
Dan Gohman [Mon, 23 Mar 2009 15:49:37 +0000 (15:49 +0000)]
Enhance LiveValues to work on PHI operands.

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

15 years agoMake getOperandNumForIncomingValue and getOperandNumForIncomingBlock
Dan Gohman [Mon, 23 Mar 2009 15:48:29 +0000 (15:48 +0000)]
Make getOperandNumForIncomingValue and getOperandNumForIncomingBlock
static member functions, and add getIncomingValueNumForOperand
and getIncomingBlockNumForOperand, which are the respective
inverses.

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

15 years agoCorrect some comments. Operand numbers start at 0.
Dan Gohman [Mon, 23 Mar 2009 15:40:10 +0000 (15:40 +0000)]
Correct some comments. Operand numbers start at 0.

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

15 years agoModel inline asm constraint which ties an input to an output register as machine...
Evan Cheng [Mon, 23 Mar 2009 08:01:15 +0000 (08:01 +0000)]
Model inline asm constraint which ties an input to an output register as machine operand TIED_TO constraint. This eliminated the need to pre-allocate registers for these. This also allows register allocator can eliminate the unneeded copies.

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

15 years agoDo not fold away subreg_to_reg if the source register has a sub-register index. That...
Evan Cheng [Mon, 23 Mar 2009 07:19:58 +0000 (07:19 +0000)]
Do not fold away subreg_to_reg if the source register has a sub-register index. That means the source register is taking a sub-register of a larger register. e.g. On x86
%RAX<def> = ...
%RAX<def> = SUBREG_TO_REG 0, %EAX:3<kill>, 3
The first def is defining RAX, not EAX so the top bits were not zero-extended.

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

15 years agofix a bug Alexei Svitkine pointed out.
Chris Lattner [Mon, 23 Mar 2009 06:46:20 +0000 (06:46 +0000)]
fix a bug Alexei Svitkine pointed out.

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

15 years agoWhen we restore signal handlers, restore them back to what they
Chris Lattner [Mon, 23 Mar 2009 05:55:36 +0000 (05:55 +0000)]
When we restore signal handlers, restore them back to what they
were when we came around, not to their default handler.  This
should fix PR3848

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

15 years agofactorize signal registration, part of PR3848.
Chris Lattner [Mon, 23 Mar 2009 05:42:29 +0000 (05:42 +0000)]
factorize signal registration, part of PR3848.

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

15 years agoFix a grammaro in a comment that Bill noticed.
Dan Gohman [Mon, 23 Mar 2009 05:02:44 +0000 (05:02 +0000)]
Fix a grammaro in a comment that Bill noticed.

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

15 years agott'ify.
Chris Lattner [Mon, 23 Mar 2009 04:53:34 +0000 (04:53 +0000)]
tt'ify.

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

15 years agoVC++ 6.0 is not future work :)
Chris Lattner [Mon, 23 Mar 2009 04:52:53 +0000 (04:52 +0000)]
VC++ 6.0 is not future work :)

Do not recommend llvm::OStream anymore.  Use raw_ostream or MemoryBuffer.

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

15 years agoAdd comments explaining why there's only one register for
Dan Gohman [Mon, 23 Mar 2009 04:28:24 +0000 (04:28 +0000)]
Add comments explaining why there's only one register for
i8 return values.

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

15 years agoMissed this as part of r67451.
Evan Cheng [Mon, 23 Mar 2009 03:45:56 +0000 (03:45 +0000)]
Missed this as part of r67451.

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

15 years agoFix PR3860 by correcting a predicate.
Chris Lattner [Sun, 22 Mar 2009 19:22:53 +0000 (19:22 +0000)]
Fix PR3860 by correcting a predicate.

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

15 years agoAdd some explanations of how apint loads and stores
Duncan Sands [Sun, 22 Mar 2009 11:33:16 +0000 (11:33 +0000)]
Add some explanations of how apint loads and stores
work.

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

15 years agoReally should pass -dylib to the linker...
Bill Wendling [Sun, 22 Mar 2009 08:56:15 +0000 (08:56 +0000)]
Really should pass -dylib to the linker...

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

15 years agoA dylib should be built as a dylib and not a bundle.
Bill Wendling [Sun, 22 Mar 2009 08:28:45 +0000 (08:28 +0000)]
A dylib should be built as a dylib and not a bundle.

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

15 years agoadd method to access a template argument.
Chris Lattner [Sun, 22 Mar 2009 00:18:18 +0000 (00:18 +0000)]
add method to access a template argument.

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

15 years agoFactorize out a concept - no functionality change.
Duncan Sands [Sat, 21 Mar 2009 21:27:31 +0000 (21:27 +0000)]
Factorize out a concept - no functionality change.

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

15 years agoRe-commit r67334 and r67349 with fix.
Evan Cheng [Sat, 21 Mar 2009 18:12:24 +0000 (18:12 +0000)]
Re-commit r67334 and r67349 with fix.

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

15 years agoadd a fastpath to ConstantExpr::getBitCast to handle the case when an obviously
Chris Lattner [Sat, 21 Mar 2009 06:55:54 +0000 (06:55 +0000)]
add a fastpath to ConstantExpr::getBitCast to handle the case when an obviously
unneeded bitcast is requested.  This is common for frontends who just unconditionally
cast even if the target is often the right type already.  THis prevents going into
getFoldedCast which switches on the opcode and does a bunch of other stuff before
doing the same opzn.

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

15 years agoadd some inline methods for infix operators on sparse vectors,
Chris Lattner [Sat, 21 Mar 2009 05:40:09 +0000 (05:40 +0000)]
add some inline methods for infix operators on sparse vectors,
tidy some df iteration stuff, patch by John Mosby!

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

15 years agoRemoved AFGR32 register class
Bruno Cardoso Lopes [Sat, 21 Mar 2009 00:05:07 +0000 (00:05 +0000)]
Removed AFGR32 register class
Handle odd registers allocation in FGR32.

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

15 years agoFix a few more indentation problems and an 80-column violation.
Bob Wilson [Fri, 20 Mar 2009 23:16:43 +0000 (23:16 +0000)]
Fix a few more indentation problems and an 80-column violation.

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

15 years agoNo functional changes. Fix indentation and whitespace only.
Bob Wilson [Fri, 20 Mar 2009 22:42:55 +0000 (22:42 +0000)]
No functional changes.  Fix indentation and whitespace only.

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

15 years agoFix instcombine to not introduce undefined shifts when merging two
Chris Lattner [Fri, 20 Mar 2009 22:41:15 +0000 (22:41 +0000)]
Fix instcombine to not introduce undefined shifts when merging two
shifts together.  This fixes PR3851.

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

15 years agoDon't load values out of global constants with weak
Duncan Sands [Fri, 20 Mar 2009 21:53:29 +0000 (21:53 +0000)]
Don't load values out of global constants with weak
linkage: the value may be replaced with something
different at link time.  (Frontends that want to
allow values to be loaded out of weak constants can
give their constants weak_odr linkage).

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

15 years agoSimplify this code; use a while instead of an if and a do-while.
Dan Gohman [Fri, 20 Mar 2009 20:42:23 +0000 (20:42 +0000)]
Simplify this code; use a while instead of an if and a do-while.

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

15 years agoFor inline asm output operand that matches an input. Encode the input operand index...
Evan Cheng [Fri, 20 Mar 2009 18:03:34 +0000 (18:03 +0000)]
For inline asm output operand that matches an input. Encode the input operand index in the high bits.

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

15 years agoFixed comment for libcalls.
Sanjiv Gupta [Fri, 20 Mar 2009 14:10:20 +0000 (14:10 +0000)]
Fixed comment for libcalls.

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

15 years agoFixed build warnings for unused variables.
Sanjiv Gupta [Fri, 20 Mar 2009 13:49:20 +0000 (13:49 +0000)]
Fixed build warnings for unused variables.

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

15 years agoReformatting. Inserted code comments. Cleaned interfaces.
Sanjiv Gupta [Fri, 20 Mar 2009 13:42:20 +0000 (13:42 +0000)]
Reformatting. Inserted code comments. Cleaned interfaces.
Removed unncessary code. No functionality change.

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

15 years agoFixed the comment. No functionality change.
Sanjiv Gupta [Fri, 20 Mar 2009 09:38:50 +0000 (09:38 +0000)]
Fixed the comment. No functionality change.

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

15 years agoRevert r67334 and r37349 which break "make check" on Linux.
Nick Lewycky [Fri, 20 Mar 2009 07:56:31 +0000 (07:56 +0000)]
Revert r67334 and r37349 which break "make check" on Linux.

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

15 years agoApply the patch requested in PR3846.
Chris Lattner [Fri, 20 Mar 2009 05:08:24 +0000 (05:08 +0000)]
Apply the patch requested in PR3846.

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

15 years agoAdded option to enable generating less precise mad (multiply addition)
Mon P Wang [Fri, 20 Mar 2009 05:06:58 +0000 (05:06 +0000)]
Added option to enable generating less precise mad (multiply addition)
for those architectures that support the instruction.

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

15 years agoThe last use in a block that doesn't have successors
Dan Gohman [Fri, 20 Mar 2009 01:28:21 +0000 (01:28 +0000)]
The last use in a block that doesn't have successors
(return or unreachable) is a kill.

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

15 years agoFix typo's.
Evan Cheng [Fri, 20 Mar 2009 00:14:09 +0000 (00:14 +0000)]
Fix typo's.

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

15 years agoFix the Win32 VS2008 build:
Sebastian Redl [Thu, 19 Mar 2009 23:26:52 +0000 (23:26 +0000)]
Fix the Win32 VS2008 build:
 - Make type declarations match the struct/class keyword of the definition.
 - Move AddSignalHandler into the namespace where it belongs.
 - Correctly call functions from template base.
 - Some other small changes.
With this patch, LLVM and Clang should build properly and with far less noise under VS2008.

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

15 years agoAdded MachineInstr::isRegTiedToDefOperand to check for two-addressness.
Evan Cheng [Thu, 19 Mar 2009 20:30:06 +0000 (20:30 +0000)]
Added MachineInstr::isRegTiedToDefOperand to check for two-addressness.

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

15 years agoMore makefile changes to allow dejagnu tests to pass when system tools default to...
Evan Cheng [Thu, 19 Mar 2009 20:27:23 +0000 (20:27 +0000)]
More makefile changes to allow dejagnu tests to pass when system tools default to a different target from the llvm configuration (e.g. 64-bit gcc and 32-bit llvm).

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

15 years agoRenamed unittest files to have a consistent {Tt}est suffix.
Misha Brukman [Thu, 19 Mar 2009 19:09:48 +0000 (19:09 +0000)]
Renamed unittest files to have a consistent {Tt}est suffix.

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

15 years agoSADDO and UADDO are commutative.
Dan Gohman [Thu, 19 Mar 2009 18:53:45 +0000 (18:53 +0000)]
SADDO and UADDO are commutative.

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

15 years agoClear the cached cost when removing a function in
Dale Johannesen [Thu, 19 Mar 2009 18:03:56 +0000 (18:03 +0000)]
Clear the cached cost when removing a function in
the inliner; prevents nondeterministic behavior
when the same address is reallocated.
Don't build call graph nodes for debug intrinsic calls;
they're useless, and there were typically a lot of them.

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

15 years agoAdd a liveness analysis pass for LLVM IR values. This computes
Dan Gohman [Thu, 19 Mar 2009 17:29:04 +0000 (17:29 +0000)]
Add a liveness analysis pass for LLVM IR values. This computes
the set of blocks in which values are used, the set in which
values are live-through, and the set in which values are
killed. For the live-through and killed sets, conservative
approximations are used.

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

15 years agoFix comment typo.
Dale Johannesen [Thu, 19 Mar 2009 17:23:29 +0000 (17:23 +0000)]
Fix comment typo.

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