oota-llvm.git
17 years agoFix a typo in memdep, which was causing PR1648.
Owen Anderson [Tue, 11 Sep 2007 04:31:00 +0000 (04:31 +0000)]
Fix a typo in memdep, which was causing PR1648.

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

17 years agoFix bugs with &=, intersect with complement. Add three argument version of intersect...
Daniel Berlin [Tue, 11 Sep 2007 04:11:28 +0000 (04:11 +0000)]
Fix bugs with &=, intersect with complement. Add three argument version of intersect with complement.

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

17 years agoFix non-deterministic behavior in the DenseMap copy constructor.
Owen Anderson [Tue, 11 Sep 2007 03:48:08 +0000 (03:48 +0000)]
Fix non-deterministic behavior in the DenseMap copy constructor.

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

17 years agoAdd remaining functions necessary for andersen's
Daniel Berlin [Tue, 11 Sep 2007 01:38:07 +0000 (01:38 +0000)]
Add remaining functions necessary for andersen's

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

17 years agoAvoid negative logic.
Devang Patel [Tue, 11 Sep 2007 01:10:45 +0000 (01:10 +0000)]
Avoid negative logic.

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

17 years agoRefactor code into a separate method.
Devang Patel [Tue, 11 Sep 2007 00:42:56 +0000 (00:42 +0000)]
Refactor code into a separate method.

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

17 years agoTestcase for PR1634
Chris Lattner [Tue, 11 Sep 2007 00:39:43 +0000 (00:39 +0000)]
Testcase for PR1634

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

17 years agoClear split info object.
Devang Patel [Tue, 11 Sep 2007 00:23:56 +0000 (00:23 +0000)]
Clear split info object.

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

17 years agoSplit condition does not have to be ICmpInst in all cases.
Devang Patel [Tue, 11 Sep 2007 00:12:56 +0000 (00:12 +0000)]
Split condition does not have to be ICmpInst in all cases.

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

17 years agoCheck all terminators inside loop.
Devang Patel [Mon, 10 Sep 2007 23:57:58 +0000 (23:57 +0000)]
Check all terminators inside loop.

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

17 years agoremove obsolete testcase
Chris Lattner [Mon, 10 Sep 2007 23:51:41 +0000 (23:51 +0000)]
remove obsolete testcase

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

17 years agoremove some dead code, this is handled by constant folding.
Chris Lattner [Mon, 10 Sep 2007 23:46:29 +0000 (23:46 +0000)]
remove some dead code, this is handled by constant folding.

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

17 years agoFix a buggy constant folding transformation when handling aliases.
Chris Lattner [Mon, 10 Sep 2007 23:42:42 +0000 (23:42 +0000)]
Fix a buggy constant folding transformation when handling aliases.

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

17 years agoSwap exit condition operands if it works.
Devang Patel [Mon, 10 Sep 2007 23:34:06 +0000 (23:34 +0000)]
Swap exit condition operands if it works.

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

17 years agoregenerate
Chris Lattner [Mon, 10 Sep 2007 23:24:14 +0000 (23:24 +0000)]
regenerate

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

17 years agoFix PR1645 by resolving forward alias references.
Chris Lattner [Mon, 10 Sep 2007 23:23:53 +0000 (23:23 +0000)]
Fix PR1645 by resolving forward alias references.

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

17 years agoAdd missing llvm-dis.
Dale Johannesen [Mon, 10 Sep 2007 22:47:59 +0000 (22:47 +0000)]
Add missing llvm-dis.

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

17 years ago80 col.
Evan Cheng [Mon, 10 Sep 2007 22:22:23 +0000 (22:22 +0000)]
80 col.

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

17 years agoNew entry.
Evan Cheng [Mon, 10 Sep 2007 22:16:37 +0000 (22:16 +0000)]
New entry.

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

17 years agoObservation of rematerialization.
Evan Cheng [Mon, 10 Sep 2007 22:11:18 +0000 (22:11 +0000)]
Observation of rematerialization.

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

17 years agoAdd some notes about better flag handling.
Chris Lattner [Mon, 10 Sep 2007 21:43:18 +0000 (21:43 +0000)]
Add some notes about better flag handling.

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

17 years agoEmit:
Chris Lattner [Mon, 10 Sep 2007 21:39:07 +0000 (21:39 +0000)]
Emit:

        cmpl    %eax, %ecx
        setae   %al
        movzbl  %al, %eax

instead of:

        cmpl    %eax, %ecx
        setb    %al
        xorb    $1, %al
        movzbl  %al, %eax

when using logical not of a C comparison.

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

17 years agothis is not infinite recursion.
Chris Lattner [Mon, 10 Sep 2007 21:16:23 +0000 (21:16 +0000)]
this is not infinite recursion.

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

17 years ago1. Don't call Value::getName(), which is slow.
Chris Lattner [Mon, 10 Sep 2007 21:15:22 +0000 (21:15 +0000)]
1. Don't call Value::getName(), which is slow.
2. Lower calls to fabs and friends to FABS nodes etc unless the function has
   internal linkage.  Before we wouldn't lower if it had a definition, which
   is incorrect.  This allows us to compile:

define double @fabs(double %f) {
        %tmp2 = tail call double @fabs( double %f )
        ret double %tmp2
}

into:

_fabs:
        fabs f1, f1
        blr

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

17 years agoPrevent tailcallelim from breaking "recursive" calls to builtins.
Chris Lattner [Mon, 10 Sep 2007 20:58:55 +0000 (20:58 +0000)]
Prevent tailcallelim from breaking "recursive" calls to builtins.

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

17 years agoIt's not safe to rematerialize MOV32r0 etc. by simply cloning the original
Evan Cheng [Mon, 10 Sep 2007 20:48:53 +0000 (20:48 +0000)]
It's not safe to rematerialize MOV32r0 etc. by simply cloning the original
instruction. These are implemented with xor which will modify the conditional
code. They should be rematerialized as move instructions.

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

17 years agoFilter exit conditions which are not yet handled.
Devang Patel [Mon, 10 Sep 2007 18:33:42 +0000 (18:33 +0000)]
Filter exit conditions which are not yet handled.

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

17 years agoNew test.
Devang Patel [Mon, 10 Sep 2007 18:12:52 +0000 (18:12 +0000)]
New test.

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

17 years agoRequire SCEV before LCSSA.
Devang Patel [Mon, 10 Sep 2007 18:08:23 +0000 (18:08 +0000)]
Require SCEV before LCSSA.

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

17 years agoRemove an un-needed dependence query. This improves compile time marginally on 401...
Owen Anderson [Sun, 9 Sep 2007 21:43:49 +0000 (21:43 +0000)]
Remove an un-needed dependence query.  This improves compile time marginally on 401.bzip2.

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

17 years agoAdd SparseBitVector implementation
Daniel Berlin [Sun, 9 Sep 2007 01:10:40 +0000 (01:10 +0000)]
Add SparseBitVector implementation

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

17 years agoTurn GVN on by default.
Owen Anderson [Sat, 8 Sep 2007 22:23:52 +0000 (22:23 +0000)]
Turn GVN on by default.

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

17 years agoImplement misaligned FP loads and stores.
Dale Johannesen [Sat, 8 Sep 2007 19:29:23 +0000 (19:29 +0000)]
Implement misaligned FP loads and stores.

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

17 years agoFix description of the call instruction. There are two types, with one being
Nick Lewycky [Sat, 8 Sep 2007 13:57:50 +0000 (13:57 +0000)]
Fix description of the call instruction. There are two types, with one being
optional.

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

17 years agoFix for VisualStudio. It is treating a 2 bit enum as a signed int for comparison...
Chuck Rose III [Sat, 8 Sep 2007 04:17:08 +0000 (04:17 +0000)]
Fix for VisualStudio.  It is treating a 2 bit enum as a signed int for comparison purposes, causing failures.  Using an extra bit fixes it.

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

17 years agoSmarter Reset(). Instead of deallocating all memory regions and reallocate the
Evan Cheng [Sat, 8 Sep 2007 00:02:17 +0000 (00:02 +0000)]
Smarter Reset(). Instead of deallocating all memory regions and reallocate the
first region, just deallocate all but the last region in the list.

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

17 years agoTableGen no longer emit CopyFromReg nodes for implicit results in physical
Evan Cheng [Fri, 7 Sep 2007 23:59:02 +0000 (23:59 +0000)]
TableGen no longer emit CopyFromReg nodes for implicit results in physical
registers. The scheduler is now responsible for emitting them.

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

17 years agoAdd missing index versions of instructions to the map.
Bill Wendling [Fri, 7 Sep 2007 22:01:02 +0000 (22:01 +0000)]
Add missing index versions of instructions to the map.

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

17 years agoAvoid storing and reloading zeros and other constants from stack slots
Dan Gohman [Fri, 7 Sep 2007 21:32:51 +0000 (21:32 +0000)]
Avoid storing and reloading zeros and other constants from stack slots
by flagging the associated instructions as being trivially rematerializable.

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

17 years agoApply feedback from previous patch.
Dale Johannesen [Fri, 7 Sep 2007 21:07:57 +0000 (21:07 +0000)]
Apply feedback from previous patch.

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

17 years agoRevert previous change to IR.
Dale Johannesen [Fri, 7 Sep 2007 18:31:50 +0000 (18:31 +0000)]
Revert previous change to IR.

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

17 years agoAdd support for having different alignment for objects on call frames.
Rafael Espindola [Fri, 7 Sep 2007 14:52:14 +0000 (14:52 +0000)]
Add support for having different alignment for objects on call frames.
The x86-64 ABI states that objects passed on the stack have
8 byte alignment. Implement that.

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

17 years agoSplit eh.select / eh.typeid.for intrinsics into i32/i64 versions. This is needed...
Anton Korobeynikov [Fri, 7 Sep 2007 11:39:35 +0000 (11:39 +0000)]
Split eh.select / eh.typeid.for intrinsics into i32/i64 versions. This is needed, because they just "mark" register
liveins and we let frontend solve type issue, not lowering code :)

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

17 years agoTest for PR1641.
Bill Wendling [Fri, 7 Sep 2007 08:30:09 +0000 (08:30 +0000)]
Test for PR1641.

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

17 years agoDon't zap back to back volatile load/stores
Chris Lattner [Fri, 7 Sep 2007 05:33:03 +0000 (05:33 +0000)]
Don't zap back to back volatile load/stores

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

17 years agoAdd lengthof and endof templates that hide a lot of sizeof computations.
Owen Anderson [Fri, 7 Sep 2007 04:06:50 +0000 (04:06 +0000)]
Add lengthof and endof templates that hide a lot of sizeof computations.
Patch by Sterling Stein!

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

17 years agoConstify to catch bugs.
David Greene [Thu, 6 Sep 2007 19:46:46 +0000 (19:46 +0000)]
Constify to catch bugs.

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

17 years agoNext round of APFloat changes.
Dale Johannesen [Thu, 6 Sep 2007 18:13:44 +0000 (18:13 +0000)]
Next round of APFloat changes.
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double.  Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)

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

17 years agoProper handle case, when aliasee is external weak symbol referenced only by alias...
Anton Korobeynikov [Thu, 6 Sep 2007 17:21:48 +0000 (17:21 +0000)]
Proper handle case, when aliasee is external weak symbol referenced only by alias itself.
Also, fix a case, when target doesn't have weak symbols supported.

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

17 years agoAdd instruction dump output. This helps find bugs.
David Greene [Thu, 6 Sep 2007 16:36:39 +0000 (16:36 +0000)]
Add instruction dump output.  This helps find bugs.

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

17 years agoPluggable coalescers inplementation.
David Greene [Thu, 6 Sep 2007 16:18:45 +0000 (16:18 +0000)]
Pluggable coalescers inplementation.

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

17 years agoUse isTrueWhenEqual. Thanks Chris!
Nick Lewycky [Thu, 6 Sep 2007 02:40:25 +0000 (02:40 +0000)]
Use isTrueWhenEqual. Thanks Chris!

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

17 years agoWhen the two operands of an icmp are equal, there are five possible predicates
Nick Lewycky [Thu, 6 Sep 2007 01:10:22 +0000 (01:10 +0000)]
When the two operands of an icmp are equal, there are five possible predicates
that would make the icmp true. Fixes PR1637.

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

17 years agoFix a memory leak.
Evan Cheng [Thu, 6 Sep 2007 01:07:24 +0000 (01:07 +0000)]
Fix a memory leak.

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

17 years agoFix a bug in X86InstrInfo::convertToThreeAddress that caused it to codegen:
Evan Cheng [Thu, 6 Sep 2007 00:14:41 +0000 (00:14 +0000)]
Fix a bug in X86InstrInfo::convertToThreeAddress that caused it to codegen:
leal    (,%rcx,8), %rcx
It should be
leal    (,%rcx,8), %ecx

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

17 years agoLVXL and STVXL are also a load and store resp.
Bill Wendling [Wed, 5 Sep 2007 23:47:12 +0000 (23:47 +0000)]
LVXL and STVXL are also a load and store resp.

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

17 years agoAccidentially left this out.
Evan Cheng [Wed, 5 Sep 2007 21:58:18 +0000 (21:58 +0000)]
Accidentially left this out.

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

17 years agoUse pool allocator for all the VNInfo's to improve memory access locality. This reduc...
Evan Cheng [Wed, 5 Sep 2007 21:46:51 +0000 (21:46 +0000)]
Use pool allocator for all the VNInfo's to improve memory access locality. This reduces coalescing time on siod Mac OS X PPC by 35%. Also remove the back ptr from VNInfo to LiveInterval and other tweaks.

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

17 years agoAdded Reset() to free all allocated memory regions and reset state to be the same...
Evan Cheng [Wed, 5 Sep 2007 21:41:34 +0000 (21:41 +0000)]
Added Reset() to free all allocated memory regions and reset state to be the same as right after ctor.

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

17 years agoMissing break. Patch by Wojciech Matyjewicz.
Evan Cheng [Wed, 5 Sep 2007 21:36:14 +0000 (21:36 +0000)]
Missing break. Patch by Wojciech Matyjewicz.

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

17 years agoFix mod so it actually works. Fix conversions to
Dale Johannesen [Wed, 5 Sep 2007 20:39:49 +0000 (20:39 +0000)]
Fix mod so it actually works.  Fix conversions to
native types to handle denormals correctly.

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

17 years agoForgot to obey 80 column rule. Fixing that.
Chuck Rose III [Wed, 5 Sep 2007 20:36:41 +0000 (20:36 +0000)]
Forgot to obey 80 column rule.  Fixing that.

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

17 years agoChange all floating constants that are not exactly
Dale Johannesen [Wed, 5 Sep 2007 17:50:36 +0000 (17:50 +0000)]
Change all floating constants that are not exactly
representable to use hex format.

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

17 years agoAdded default parameters to GetElementPtrInstr constructor call. Visual Studio 2k5...
Chuck Rose III [Wed, 5 Sep 2007 16:54:38 +0000 (16:54 +0000)]
Added default parameters to GetElementPtrInstr constructor call.  Visual Studio 2k5 was getting confused and was unable to compile it.  Suspected compiler error.

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

17 years agoDue to label merging, the last label for an invoke
Duncan Sands [Wed, 5 Sep 2007 14:12:46 +0000 (14:12 +0000)]
Due to label merging, the last label for an invoke
may be the same as the first label for the following
invoke.  Remove a micro-optimization which was wrong
in this case.

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

17 years agoTestcases for PR1628.
Duncan Sands [Wed, 5 Sep 2007 11:53:04 +0000 (11:53 +0000)]
Testcases for PR1628.

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

17 years agoFix PR1628. When exception handling is turned on,
Duncan Sands [Wed, 5 Sep 2007 11:27:52 +0000 (11:27 +0000)]
Fix PR1628.  When exception handling is turned on,
labels are generated bracketing each call (not just
invokes).  This is used to generate entries in
the exception table required by the C++ personality.
However it gets in the way of tail-merging.  This
patch solves the problem by no longer placing labels
around ordinary calls.  Instead we generate entries
in the exception table that cover every instruction
in the function that wasn't covered by an invoke
range (the range given by the labels around the invoke).
As an optimization, such entries are only generated for
parts of the function that contain a call, since for
the moment those are the only instructions that can
throw an exception [1].  As a happy consequence, we
now get a smaller exception table, since the same
region can cover many calls.  While there, I also
implemented folding of invoke ranges - successive
ranges are merged when safe to do so.  Finally, if
a selector contains only a cleanup, there's a special
shorthand for it - place a 0 in the call-site entry.
I implemented this while there.  As a result, the
exception table output (excluding filters) is now
optimal - it cannot be made smaller [2].  The
problem with throw filters is that folding them
optimally is hard, and the benefit of folding them is
minimal.

[1] I tested that having trapping instructions (eg
divide by zero) in such a region doesn't cause trouble.
[2] It could be made smaller with the help of higher
layers, eg by having branch folding reorder basic blocks
ending in invokes with the same landing pad so they
follow each other.  I don't know if this is worth doing.

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

17 years agoAdd the 64-bit versions of the DS* Altivec instructions.
Bill Wendling [Wed, 5 Sep 2007 04:05:20 +0000 (04:05 +0000)]
Add the 64-bit versions of the DS* Altivec instructions.

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

17 years agoEnable loop index split pass.
Devang Patel [Tue, 4 Sep 2007 20:46:58 +0000 (20:46 +0000)]
Enable loop index split pass.

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

17 years agoInsert cloned loop basic blocks before original loop header.
Devang Patel [Tue, 4 Sep 2007 20:46:35 +0000 (20:46 +0000)]
Insert cloned loop basic blocks before original loop header.

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

17 years agoFix for PR1632. EHSELECTION always produces a i32 value.
Evan Cheng [Tue, 4 Sep 2007 20:39:26 +0000 (20:39 +0000)]
Fix for PR1632. EHSELECTION always produces a i32 value.

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

17 years agoFix for PR1613: added 64-bit rotate left PPC instructions and patterns.
Evan Cheng [Tue, 4 Sep 2007 20:20:29 +0000 (20:20 +0000)]
Fix for PR1613: added 64-bit rotate left PPC instructions and patterns.

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

17 years agoAlways check the type of node. This prevents situations such as selecting 32-bit...
Evan Cheng [Tue, 4 Sep 2007 20:18:28 +0000 (20:18 +0000)]
Always check the type of node. This prevents situations such as selecting 32-bit rotate target instruction for a 64-bit node when 64-bit pattern is missing.

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

17 years agoUpdate generated files.
David Greene [Tue, 4 Sep 2007 18:46:50 +0000 (18:46 +0000)]
Update generated files.

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

17 years agofix reversal bug in preceding checkin
Dale Johannesen [Tue, 4 Sep 2007 17:32:27 +0000 (17:32 +0000)]
fix reversal bug in preceding checkin

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

17 years agoRevert this because the interface hasn't been updated yet.
David Greene [Tue, 4 Sep 2007 17:15:07 +0000 (17:15 +0000)]
Revert this because the interface hasn't been updated yet.

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

17 years agoFix typo.
David Greene [Tue, 4 Sep 2007 17:00:44 +0000 (17:00 +0000)]
Fix typo.

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

17 years agoMac OS X X86-64 ABI is same as the standard.
Evan Cheng [Tue, 4 Sep 2007 16:44:41 +0000 (16:44 +0000)]
Mac OS X X86-64 ABI is same as the standard.

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

17 years agoUpdate GEP constructors to use an iterator interface to fix
David Greene [Tue, 4 Sep 2007 15:46:09 +0000 (15:46 +0000)]
Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.

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

17 years agoReapply r41578 with proper fix
Anton Korobeynikov [Mon, 3 Sep 2007 00:36:06 +0000 (00:36 +0000)]
Reapply r41578 with proper fix

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

17 years agoSilence warning while compiling with gcc 4.2
Anton Korobeynikov [Sun, 2 Sep 2007 22:11:14 +0000 (22:11 +0000)]
Silence warning while compiling with gcc 4.2

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

17 years agoEmit proper "secrel" directive, where possible. This fixes invalid asm syntax of...
Anton Korobeynikov [Sun, 2 Sep 2007 22:07:21 +0000 (22:07 +0000)]
Emit proper "secrel" directive, where possible. This fixes invalid asm syntax of debug info on mingw32. Also, cleanup
some stuff.

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

17 years agoMore tweaks to improve compile time.
Evan Cheng [Sat, 1 Sep 2007 02:03:17 +0000 (02:03 +0000)]
More tweaks to improve compile time.

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

17 years agoFix a gcroot lowering bug.
Evan Cheng [Sat, 1 Sep 2007 02:00:51 +0000 (02:00 +0000)]
Fix a gcroot lowering bug.

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

17 years agoOops, should be part of 41664; won't work very well without this piece.
Dale Johannesen [Fri, 31 Aug 2007 23:35:31 +0000 (23:35 +0000)]
Oops, should be part of 41664; won't work very well without this piece.

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

17 years agoAdd mod, copysign, abs operations to APFloat.
Dale Johannesen [Fri, 31 Aug 2007 23:34:27 +0000 (23:34 +0000)]
Add mod, copysign, abs operations to APFloat.
Implement some constant folding in SelectionDAG and
DAGCombiner using APFloat.  Remove double versions
of constructor and getValue from ConstantFPSDNode.

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

17 years agostd::map -> DenseMap for slight compile time benefit.
Evan Cheng [Fri, 31 Aug 2007 21:23:06 +0000 (21:23 +0000)]
std::map -> DenseMap for slight compile time benefit.

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

17 years agoAllow the configure options to be set according to the llvm-top options.
Reid Spencer [Fri, 31 Aug 2007 19:53:42 +0000 (19:53 +0000)]
Allow the configure options to be set according to the llvm-top options.
Patch improved from one by Holger Schurig.

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

17 years agoRevise per review of previous patch.
Dale Johannesen [Fri, 31 Aug 2007 17:03:33 +0000 (17:03 +0000)]
Revise per review of previous patch.

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

17 years agoInitial support for calling functions with byval arguments on x86-64
Rafael Espindola [Fri, 31 Aug 2007 15:06:30 +0000 (15:06 +0000)]
Initial support for calling functions with byval arguments on x86-64

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

17 years agoAlign i64 and f64 at 8 byte on x86-64.
Rafael Espindola [Fri, 31 Aug 2007 12:23:58 +0000 (12:23 +0000)]
Align i64 and f64 at 8 byte on x86-64.
This is mandated table 3.1 at
http://www.x86-64.org/documentation/abi.pdf

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

17 years agoRemove an unnecessary element, saving 4 bytes per LiveInterval.
Evan Cheng [Fri, 31 Aug 2007 08:26:44 +0000 (08:26 +0000)]
Remove an unnecessary element, saving 4 bytes per LiveInterval.

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

17 years agoUse std::map instead of a (potentially very sparse) array to track val# defined by...
Evan Cheng [Fri, 31 Aug 2007 08:04:17 +0000 (08:04 +0000)]
Use std::map instead of a (potentially very sparse) array to track val# defined by copy from the other live range. Minor compile time win when number of val# is large.

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

17 years agoUpdate test case to reflect Dale's change.
Evan Cheng [Fri, 31 Aug 2007 06:29:32 +0000 (06:29 +0000)]
Update test case to reflect Dale's change.

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

17 years agoEnhance APFloat to retain bits of NaNs (fixes oggenc).
Dale Johannesen [Fri, 31 Aug 2007 04:03:46 +0000 (04:03 +0000)]
Enhance APFloat to retain bits of NaNs (fixes oggenc).
Use APFloat interfaces for more references, mostly
of ConstantFPSDNode.

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

17 years agoInstruction formats added used to generate multiply instructions of V5TE.
Raul Herbster [Thu, 30 Aug 2007 23:34:14 +0000 (23:34 +0000)]
Instruction formats added used to generate multiply instructions of V5TE.

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

17 years agoUnused relocation type reloc_arm_absolute removed.
Raul Herbster [Thu, 30 Aug 2007 23:31:35 +0000 (23:31 +0000)]
Unused relocation type reloc_arm_absolute removed.

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

17 years agoComments added. It now generates V5TE multiply instructions. However, it is still...
Raul Herbster [Thu, 30 Aug 2007 23:29:26 +0000 (23:29 +0000)]
Comments added. It now generates V5TE multiply instructions. However, it is still necessary to model PUWLSH bits more clearly.

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

17 years agoARM instruction table was modified by adding information to generate multiply instruc...
Raul Herbster [Thu, 30 Aug 2007 23:25:47 +0000 (23:25 +0000)]
ARM instruction table was modified by adding information to generate multiply instruction of V5TE.

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

17 years agoJITInfo now resolves function addrs and also relocations. It always emits a stub.
Raul Herbster [Thu, 30 Aug 2007 23:21:27 +0000 (23:21 +0000)]
JITInfo now resolves function addrs and also relocations. It always emits a stub.

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