oota-llvm.git
14 years agoRemove a bunch of duplicated code, where there was one version taking a std::ostream
Duncan Sands [Sun, 21 Feb 2010 19:15:19 +0000 (19:15 +0000)]
Remove a bunch of duplicated code, where there was one version taking a std::ostream
and another taking a raw_ostream, but otherwise identical.  Use raw_ostream everywhere.

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

14 years agofilecheckize and add nouwinds.
Chris Lattner [Sun, 21 Feb 2010 18:53:28 +0000 (18:53 +0000)]
filecheckize and add nouwinds.

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

14 years agoEnable assertion to detect cyclic valno references.
Jakob Stoklund Olesen [Sun, 21 Feb 2010 18:51:48 +0000 (18:51 +0000)]
Enable assertion to detect cyclic valno references.

This changes the stack overflow in PR6363 to an assertion failure.

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

14 years agoIT turns out that during jumpless setcc lowering eq and ne were swapped.
Anton Korobeynikov [Sun, 21 Feb 2010 12:28:58 +0000 (12:28 +0000)]
IT turns out that during jumpless setcc lowering eq and ne were swapped.
This fixes PR6348

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

14 years agowhen a match fails and we have to rollback, make sure to keep 'N' in
Chris Lattner [Sun, 21 Feb 2010 07:55:48 +0000 (07:55 +0000)]
when a match fails and we have to rollback, make sure to keep 'N' in
sync with the top of stack.  This fixes a bunch of failures on larger
testcases.

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

14 years agohandle optional in flags that aren't present.
Chris Lattner [Sun, 21 Feb 2010 07:19:06 +0000 (07:19 +0000)]
handle optional in flags that aren't present.

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

14 years agoemit table indexes before each row so that it is debuggable.
Chris Lattner [Sun, 21 Feb 2010 07:16:41 +0000 (07:16 +0000)]
emit table indexes before each row so that it is debuggable.

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

14 years agofix two bugs in OPC_EmitRegister, which makes ppc happier.
Chris Lattner [Sun, 21 Feb 2010 06:58:27 +0000 (06:58 +0000)]
fix two bugs in OPC_EmitRegister, which makes ppc happier.

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

14 years agofix a table size miscomputation, target opcodes are 2 bytes.
Chris Lattner [Sun, 21 Feb 2010 06:44:29 +0000 (06:44 +0000)]
fix a table size miscomputation, target opcodes are 2 bytes.
With this, the matcher actually works reasonably well, but
crashes on larger examples in the scheduler.

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

14 years agoemit to the right streams, to avoid emitting the push
Chris Lattner [Sun, 21 Feb 2010 06:30:04 +0000 (06:30 +0000)]
emit to the right streams, to avoid emitting the push
body before the push.

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

14 years agooops don't turn this on for everyone yet.
Chris Lattner [Sun, 21 Feb 2010 06:03:56 +0000 (06:03 +0000)]
oops don't turn this on for everyone yet.

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

14 years agoimplement the last known missing feature: updating uses of results
Chris Lattner [Sun, 21 Feb 2010 06:03:07 +0000 (06:03 +0000)]
implement the last known missing feature: updating uses of results
of the matched pattern to use the newly created node results.  Onto
the "making it actually work" phase!

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

14 years agofix and un-xfail X86/vec_ss_load_fold.ll
Chris Lattner [Sun, 21 Feb 2010 04:53:34 +0000 (04:53 +0000)]
fix and un-xfail X86/vec_ss_load_fold.ll

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

14 years agoUndo r96654. The printing of ARM shift instructions in canonical forms can be
Johnny Chen [Sun, 21 Feb 2010 04:42:01 +0000 (04:42 +0000)]
Undo r96654.  The printing of ARM shift instructions in canonical forms can be
handled in ARMInstPrinter.cpp.

And added PLD/PLDW/PLI (Preload Data/Instruction) for disassembly only.

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

14 years agoReduce size of 'StackAlignment' field from 5 to 3 bits. Seriously, who needs a
Charles Davis [Sun, 21 Feb 2010 04:26:06 +0000 (04:26 +0000)]
Reduce size of 'StackAlignment' field from 5 to 3 bits. Seriously, who needs a
2GB-aligned stack anyway? 256 bytes is plenty. Requested by Chris.

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

14 years agotemporarily disable this.
Chris Lattner [Sun, 21 Feb 2010 03:24:41 +0000 (03:24 +0000)]
temporarily disable this.

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

14 years agoLots of improvements to the new dagisel emitter. This gets it to
Chris Lattner [Sun, 21 Feb 2010 03:22:59 +0000 (03:22 +0000)]
Lots of improvements to the new dagisel emitter.  This gets it to
the point where it is to the 95% feature complete mark, it just
needs result updating to be done (then testing, optimization
etc).

More specificallly, this adds support for chain and flag handling
on the result nodes, support for sdnodexforms, support for variadic
nodes, memrefs, pinned physreg inputs, and probably lots of other
stuff.

In the old DAGISelEmitter, this deletes the dead code related to
OperatorMap, cleans up a variety of dead stuff handling "implicit
remapping" from things like globaladdr -> targetglobaladdr (which
is no longer used because globaladdr always needs to be legalized),
and some minor formatting fixes.

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

14 years agorename SelectScalarSSELoad -> SelectScalarSSELoadXXX and rewrite
Chris Lattner [Sun, 21 Feb 2010 03:17:59 +0000 (03:17 +0000)]
rename SelectScalarSSELoad -> SelectScalarSSELoadXXX and rewrite
it to follow the mode needed by the new isel.  Instead of returning
the input and output chains, it just returns the (currently only one,
which is a silly limitation) node that has input and output chains.

Since we want the old thing to still work, add a new
SelectScalarSSELoad to emulate the old interface.  The XXX suffix
and the wrapper will eventually go away.

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

14 years agoadd a hook so that the new isel can run SDNodeXForms.
Chris Lattner [Sun, 21 Feb 2010 03:15:11 +0000 (03:15 +0000)]
add a hook so that the new isel can run SDNodeXForms.

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

14 years agoEliminate some uses of immAllOnes, just use -1, it does
Chris Lattner [Sun, 21 Feb 2010 03:13:10 +0000 (03:13 +0000)]
Eliminate some uses of immAllOnes, just use -1, it does
the same thing and is more efficient for the matcher.

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

14 years agoEliminate some uses of immAllOnes, just use -1, it does
Chris Lattner [Sun, 21 Feb 2010 03:12:16 +0000 (03:12 +0000)]
Eliminate some uses of immAllOnes, just use -1, it does
the same thing and is more efficient for the matcher.

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

14 years agoTest commit.
Tanya Lattner [Sun, 21 Feb 2010 03:01:05 +0000 (03:01 +0000)]
Test commit.

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

14 years agoTest commit
Tanya Lattner [Sun, 21 Feb 2010 02:59:05 +0000 (02:59 +0000)]
Test commit

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

14 years agoRename getSDiv to getExactSDiv to reflect its behavior in cases where
Dan Gohman [Fri, 19 Feb 2010 19:35:48 +0000 (19:35 +0000)]
Rename getSDiv to getExactSDiv to reflect its behavior in cases where
the division would have a remainder.

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

14 years agoCheck for overflow when scaling up an add or an addrec for
Dan Gohman [Fri, 19 Feb 2010 19:32:49 +0000 (19:32 +0000)]
Check for overflow when scaling up an add or an addrec for
scaled reuse.

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

14 years agoRevert 96634. It causes assertion failures for 126.gcc and 176.gcc in
Bob Wilson [Fri, 19 Feb 2010 18:59:53 +0000 (18:59 +0000)]
Revert 96634.  It causes assertion failures for 126.gcc and 176.gcc in
the armv6 nightly tests.

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

14 years agoAdd a comment.
Dan Gohman [Fri, 19 Feb 2010 18:49:22 +0000 (18:49 +0000)]
Add a comment.

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

14 years agoAdd support for the 'alignstack' attribute to the x86 backend. Fixes PR5254.
Charles Davis [Fri, 19 Feb 2010 18:17:13 +0000 (18:17 +0000)]
Add support for the 'alignstack' attribute to the x86 backend. Fixes PR5254.

Also, FileCheck'ize a test.

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

14 years agoTeach ScalarEvolution how to compute a tripcount for a loop with
Dan Gohman [Fri, 19 Feb 2010 18:12:07 +0000 (18:12 +0000)]
Teach ScalarEvolution how to compute a tripcount for a loop with
true or false as its exit condition. These are usually eliminated by
SimplifyCFG, but the may be left around during a pass which wishes
to preserve the CFG.

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

14 years agoRevert Anton's most recent EH patch (r96637), since it breaks a lot of
Bob Wilson [Fri, 19 Feb 2010 17:10:59 +0000 (17:10 +0000)]
Revert Anton's most recent EH patch (r96637), since it breaks a lot of
ARM and Thumb tests.

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

14 years agoRevert commits 96556 and 96640, because commit 96556 breaks the
Duncan Sands [Fri, 19 Feb 2010 11:30:41 +0000 (11:30 +0000)]
Revert commits 96556 and 96640, because commit 96556 breaks the
dragonegg self-host build.  I reverted 96640 in order to revert
96556 (96640 goes on top of 96556), but it also looks like with
both of them applied the breakage happens even earlier.  The
symptom of the 96556 miscompile is the following crash:

  llvm[3]: Compiling AlphaISelLowering.cpp for Release build
  cc1plus: /home/duncan/tmp/tmp/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4982: void llvm::SelectionDAG::ReplaceAllUsesWith(llvm::SDNode*, llvm::SDNode*, llvm::SelectionDAG::DAGUpdateListener*): Assertion `(!From->hasAnyUseOfValue(i) || From->getValueType(i) == To->getValueType(i)) && "Cannot use this version of ReplaceAllUsesWith!"' failed.
  Stack dump:
  0. Running pass 'X86 DAG->DAG Instruction Selection' on function '@_ZN4llvm19AlphaTargetLowering14LowerOperationENS_7SDValueERNS_12SelectionDAGE'
  g++: Internal error: Aborted (program cc1plus)

This occurs when building LLVM using LLVM built by LLVM (via
dragonegg).  Probably LLVM has miscompiled itself, though it
may have miscompiled GCC and/or dragonegg itself: at this point
of the self-host build, all of GCC, LLVM and dragonegg were built
using LLVM.  Unfortunately this kind of thing is extremely hard
to debug, and while I did rummage around a bit I didn't find any
smoking guns, aka obviously miscompiled code.

Found by bisection.

r96556 | evancheng | 2010-02-18 03:13:50 +0100 (Thu, 18 Feb 2010) | 5 lines

Some dag combiner goodness:
Transform br (xor (x, y)) -> br (x != y)
Transform br (xor (xor (x,y), 1)) -> br (x == y)
Also normalize (and (X, 1) == / != 1 -> (and (X, 1)) != / == 0 to match to "test on x86" and "tst on arm"

r96640 | evancheng | 2010-02-19 01:34:39 +0100 (Fri, 19 Feb 2010) | 16 lines

Transform (xor (setcc), (setcc)) == / != 1 to
(xor (setcc), (setcc)) != / == 1.

e.g. On x86_64
  %0 = icmp eq i32 %x, 0
  %1 = icmp eq i32 %y, 0
  %2 = xor i1 %1, %0
  br i1 %2, label %bb, label %return
=>
testl   %edi, %edi
sete    %al
testl   %esi, %esi
sete    %cl
cmpb    %al, %cl
je      LBB1_2

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

14 years agoCorrect LastPrimitiveTyID: MetadataType is a primitive type.
Duncan Sands [Fri, 19 Feb 2010 09:18:53 +0000 (09:18 +0000)]
Correct LastPrimitiveTyID: MetadataType is a primitive type.
This change probably has no functional effect.

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

14 years agoadd emitter support for integer constants and simple physreg references.
Chris Lattner [Fri, 19 Feb 2010 07:49:56 +0000 (07:49 +0000)]
add emitter support for integer constants and simple physreg references.

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

14 years agorecommit 96626, evidence that it broke things appears
Dale Johannesen [Fri, 19 Feb 2010 07:14:22 +0000 (07:14 +0000)]
recommit 96626, evidence that it broke things appears
to be spurious

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

14 years agofix this to work more determinstically, patch by Thomas Veith!
Chris Lattner [Fri, 19 Feb 2010 07:02:20 +0000 (07:02 +0000)]
fix this to work more determinstically, patch by Thomas Veith!

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

14 years agoTest case for r96656.
Devang Patel [Fri, 19 Feb 2010 02:58:33 +0000 (02:58 +0000)]
Test case for r96656.

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

14 years agoAdded entries for ASR, LSL, LSR, ROR, and RRX so that the disassembler prints
Johnny Chen [Fri, 19 Feb 2010 02:12:06 +0000 (02:12 +0000)]
Added entries for ASR, LSL, LSR, ROR, and RRX so that the disassembler prints
out the canonical form (A8.6.98) instead of the pseudo-instruction as provided
via MOVs.

DBG_ARM_DISASM=YES llvm-mc -triple=arm-unknown-unknown --disassemble
0xc0 0x00 0xa0 0xe1
Opcode=29 Name=ASR Format=ARM_FORMAT_LDMISCFRM
 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
-------------------------------------------------------------------------------------------------
| 1: 1: 1: 0| 0: 0: 0: 1| 1: 0: 1: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 1: 1: 0: 0| 0: 0: 0: 0|
-------------------------------------------------------------------------------------------------

asr r0, r0, #1

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

14 years agoRevert 96626, which causes build failure on ppc Darwin.
Dale Johannesen [Fri, 19 Feb 2010 01:54:37 +0000 (01:54 +0000)]
Revert 96626, which causes build failure on ppc Darwin.

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

14 years agoTransform (xor (setcc), (setcc)) == / != 1 to
Evan Cheng [Fri, 19 Feb 2010 00:34:39 +0000 (00:34 +0000)]
Transform (xor (setcc), (setcc)) == / != 1 to
(xor (setcc), (setcc)) != / == 1.

e.g. On x86_64
  %0 = icmp eq i32 %x, 0
  %1 = icmp eq i32 %y, 0
  %2 = xor i1 %1, %0
  br i1 %2, label %bb, label %return
=>
testl   %edi, %edi
sete    %al
testl   %esi, %esi
sete    %cl
cmpb    %al, %cl
je      LBB1_2

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

14 years agoI confused myself, temporaries will be recorded right along with other inputs.
Chris Lattner [Fri, 19 Feb 2010 00:33:13 +0000 (00:33 +0000)]
I confused myself, temporaries will be recorded right along with other inputs.

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

14 years agoUse the same encoding for EH stuff uniformly on all MachO targets.
Anton Korobeynikov [Fri, 19 Feb 2010 00:29:36 +0000 (00:29 +0000)]
Use the same encoding for EH stuff uniformly on all MachO targets.
This hopefulyl should unbreak EH on PPC/Darwin.

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

14 years agointroduce a new ResultVal and start keeping track of temporary values.
Chris Lattner [Fri, 19 Feb 2010 00:27:40 +0000 (00:27 +0000)]
introduce a new ResultVal and start keeping track of temporary values.

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

14 years agoRadar 7636153. In the presence of large call frames, it's not sufficient
Jim Grosbach [Fri, 19 Feb 2010 00:16:24 +0000 (00:16 +0000)]
Radar 7636153. In the presence of large call frames, it's not sufficient
for ARM to just check if a function has a FP to determine if it's safe
to simplify the stack adjustment pseudo ops prior to eliminating frame
indices. Allow targets to override the default behavior and does so for ARM
and Thumb2.

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

14 years agoWhen determining the set of interesting reuse factors, consider
Dan Gohman [Fri, 19 Feb 2010 00:05:23 +0000 (00:05 +0000)]
When determining the set of interesting reuse factors, consider
strides in foreign loops. This helps locate reuse opportunities
with existing induction variables in foreign loops and reduces
the need for inserting new ones. This fixes rdar://7657764.

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

14 years agoIndvars needs to explicitly notify ScalarEvolution when it is replacing
Dan Gohman [Thu, 18 Feb 2010 23:26:33 +0000 (23:26 +0000)]
Indvars needs to explicitly notify ScalarEvolution when it is replacing
a loop exit value, so that if a loop gets deleted, ScalarEvolution
isn't stick holding on to dangling SCEVAddRecExprs for that loop. This
fixes PR6339.

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

14 years agogetSplatIndex assumes that the first element of the mask contains the splat index
Mon P Wang [Thu, 18 Feb 2010 22:33:18 +0000 (22:33 +0000)]
getSplatIndex assumes that the first element of the mask contains the splat index
which is not always true if the mask contains undefs. Modified it to return
the first non undef value.

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

14 years agoAdded LDRD_PRE/POST & STRD_PRE/POST for disassembly only.
Johnny Chen [Thu, 18 Feb 2010 22:31:18 +0000 (22:31 +0000)]
Added LDRD_PRE/POST & STRD_PRE/POST for disassembly only.

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

14 years agoadd support for referencing registers and immediates,
Chris Lattner [Thu, 18 Feb 2010 22:03:03 +0000 (22:03 +0000)]
add support for referencing registers and immediates,
building the tree to represent them but not emitting
table entries for them yet.

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

14 years agoreplaceUsesOfWithOnConstant implementation for unions.
Talin [Thu, 18 Feb 2010 21:43:45 +0000 (21:43 +0000)]
replaceUsesOfWithOnConstant implementation for unions.

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

14 years agoHoist this loop-invariant logic out of the loop.
Dan Gohman [Thu, 18 Feb 2010 21:34:02 +0000 (21:34 +0000)]
Hoist this loop-invariant logic out of the loop.

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

14 years agoAlways normalize spill weights, also for intervals created by spilling.
Jakob Stoklund Olesen [Thu, 18 Feb 2010 21:33:05 +0000 (21:33 +0000)]
Always normalize spill weights, also for intervals created by spilling.

Moderate the weight given to very small intervals.

The spill weight given to new intervals created when spilling was not
normalized in the same way as the original spill weights calculated by
CalcSpillWeights. That meant that restored registers would tend to hang around
because they had a much higher spill weight that unspilled registers.

This improves the runtime of a few tests by up to 10%, and there are no
significant regressions.

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

14 years agoMake CodePlacementOpt detect special EH control flow by
Dan Gohman [Thu, 18 Feb 2010 21:25:53 +0000 (21:25 +0000)]
Make CodePlacementOpt detect special EH control flow by
checking whether AnalyzeBranch disagrees with the CFG
directly, rather than looking for EH_LABEL instructions.
EH_LABEL instructions aren't always at the end of the
block, due to FP_REG_KILL and other things. This fixes
an infinite loop compiling MultiSource/Benchmarks/Bullet.

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

14 years agoFix comments.
Devang Patel [Thu, 18 Feb 2010 21:03:36 +0000 (21:03 +0000)]
Fix comments.

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

14 years agoDestroy MDNodes gracefully while deleting llvm context.
Devang Patel [Thu, 18 Feb 2010 20:53:16 +0000 (20:53 +0000)]
Destroy MDNodes gracefully while deleting llvm context.

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

14 years agoIgnore target dependent value in grep search.
Devang Patel [Thu, 18 Feb 2010 19:52:12 +0000 (19:52 +0000)]
Ignore target dependent value in grep search.

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

14 years agoGenerate DBG_VALUE from dbg.value intrinsics. These currently
Dale Johannesen [Thu, 18 Feb 2010 18:51:15 +0000 (18:51 +0000)]
Generate DBG_VALUE from dbg.value intrinsics.  These currently
comes out as comments but will eventually generate DWARF.

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

14 years agoClarify that ptrtoint+inttoptr are an alternative to GEP which are
Dan Gohman [Thu, 18 Feb 2010 18:40:29 +0000 (18:40 +0000)]
Clarify that ptrtoint+inttoptr are an alternative to GEP which are
not restricted by the GEP rules.

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

14 years agoFix a typo.
Dan Gohman [Thu, 18 Feb 2010 18:22:41 +0000 (18:22 +0000)]
Fix a typo.

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

14 years agoClarify that the rules about object hopping kick in when a pointer is
Dan Gohman [Thu, 18 Feb 2010 18:22:18 +0000 (18:22 +0000)]
Clarify that the rules about object hopping kick in when a pointer is
deferenced, rather than when the pointer value is computed.

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

14 years agoFix typos Duncan noticed.
Dan Gohman [Thu, 18 Feb 2010 18:19:17 +0000 (18:19 +0000)]
Fix typos Duncan noticed.

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

14 years agoRemap the call sites of a shared function in interrupt line functions.
Sanjiv Gupta [Thu, 18 Feb 2010 18:00:35 +0000 (18:00 +0000)]
Remap the call sites of a shared function  in interrupt line functions.

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

14 years agoRe-factoring.
Sanjiv Gupta [Thu, 18 Feb 2010 17:32:25 +0000 (17:32 +0000)]
Re-factoring.

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

14 years agoUniformize the way these options are printed. Requested by
Duncan Sands [Thu, 18 Feb 2010 14:37:52 +0000 (14:37 +0000)]
Uniformize the way these options are printed.  Requested by
Russell Wallace.

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

14 years agoRemove terminating dot in description. Inconsistency pointed
Duncan Sands [Thu, 18 Feb 2010 14:10:41 +0000 (14:10 +0000)]
Remove terminating dot in description.  Inconsistency pointed
out by Russell Wallace.

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

14 years agoRefer to -help instead of --help since this is what tools themselves say.
Duncan Sands [Thu, 18 Feb 2010 14:08:13 +0000 (14:08 +0000)]
Refer to -help instead of --help since this is what tools themselves say.
Also, have tools output -help-hidden rather than refer to --help-hidden,
for consistency, and likewise adjust documentation.  This doesn't change
every mention of --help, only those which seemed clearly safe.

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

14 years agoAvoid a dangling pointer dereference, PassManager::add can delete the Pass.
Benjamin Kramer [Thu, 18 Feb 2010 12:57:05 +0000 (12:57 +0000)]
Avoid a dangling pointer dereference, PassManager::add can delete the Pass.

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

14 years agostart sketching out the structure of code for result emission generation.
Chris Lattner [Thu, 18 Feb 2010 06:47:49 +0000 (06:47 +0000)]
start sketching out the structure of code for result emission generation.
Nothing real here yet.

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

14 years agoadd a missing type cast.
Chris Lattner [Thu, 18 Feb 2010 06:33:42 +0000 (06:33 +0000)]
add a missing type cast.

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

14 years agoremove empty file
Chris Lattner [Thu, 18 Feb 2010 06:29:06 +0000 (06:29 +0000)]
remove empty file

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

14 years agoUse NEON vmin/vmax instructions for floating-point selects.
Bob Wilson [Thu, 18 Feb 2010 06:05:53 +0000 (06:05 +0000)]
Use NEON vmin/vmax instructions for floating-point selects.
Radar 7461718.

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

14 years agoRoll back the shared library, r96559. It broke two darwins and arm, mysteriously.
Jeffrey Yasskin [Thu, 18 Feb 2010 04:43:02 +0000 (04:43 +0000)]
Roll back the shared library, r96559.  It broke two darwins and arm, mysteriously.

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

14 years agoAdded LDRSBT, LDRHT, LDRSHT for disassembly only. And fixed encoding errors
Johnny Chen [Thu, 18 Feb 2010 03:27:42 +0000 (03:27 +0000)]
Added LDRSBT, LDRHT, LDRSHT for disassembly only.  And fixed encoding errors
of AI3ldsbpo, AI3ldhpo, and AI3ldshpo in ARMInstrFormats.td in the process.

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

14 years agorename the child field to 'next'. This is not a parent/child
Chris Lattner [Thu, 18 Feb 2010 02:53:41 +0000 (02:53 +0000)]
rename the child field to 'next'.  This is not a parent/child
relationship, this is a linear list relationship.

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

14 years agoeliminate the MatcherNodeWithChild class, give the 'child'
Chris Lattner [Thu, 18 Feb 2010 02:49:24 +0000 (02:49 +0000)]
eliminate the MatcherNodeWithChild class, give the 'child'
field to MatcherNode.

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

14 years agoAdd a shared library for LLVM, named libLLVM2.7svn.(so|dylib), and add an
Jeffrey Yasskin [Thu, 18 Feb 2010 02:36:02 +0000 (02:36 +0000)]
Add a shared library for LLVM, named libLLVM2.7svn.(so|dylib), and add an
--enable-shared configure flag to have the tools linked shared. (2.7svn is just
$(LLVMVersion) so it'll change to "2.7" in the release.)  Always link the
example programs shared to test that the shared library keeps working.

On my mac laptop, Debug libLLVM2.7svn.dylib is 39MB, and opt (for example) is
16M static vs 440K shared.

Two things are less than ideal here:
1) The library doesn't include any version information. Since we expect to break
the ABI with every release, this shouldn't be much of a problem. If we do
release a compatible 2.7.1, we may be able to hack its library to work with
binaries compiled against 2.7.0, or we can just ask them to recompile. I'm
hoping to get a real packaging expert to look at this for the 2.8 release.
2) llvm-config doesn't yet have an option to print link options for the shared
library. I'll add this as a subsequent patch.

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

14 years agoSome dag combiner goodness:
Evan Cheng [Thu, 18 Feb 2010 02:13:50 +0000 (02:13 +0000)]
Some dag combiner goodness:
Transform br (xor (x, y)) -> br (x != y)
Transform br (xor (xor (x,y), 1)) -> br (x == y)
Also normalize (and (X, 1) == / != 1 -> (and (X, 1)) != / == 0 to match to "test on x86" and "tst on arm"

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

14 years agoNew test case for r96543.
Devang Patel [Thu, 18 Feb 2010 00:53:49 +0000 (00:53 +0000)]
New test case for r96543.

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

14 years agofit in 80 cols
Chris Lattner [Thu, 18 Feb 2010 00:23:27 +0000 (00:23 +0000)]
fit in 80 cols

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

14 years agoAdded for disassembly only the variants of DMB, DSB, and ISB.
Johnny Chen [Thu, 18 Feb 2010 00:19:08 +0000 (00:19 +0000)]
Added for disassembly only the variants of DMB, DSB, and ISB.

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

14 years agoFix a few unused parameter warnings.
Eric Christopher [Wed, 17 Feb 2010 23:55:26 +0000 (23:55 +0000)]
Fix a few unused parameter warnings.

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

14 years agoMC/Mach-O: Update fixup values for change to X86 offsets.
Daniel Dunbar [Wed, 17 Feb 2010 23:45:16 +0000 (23:45 +0000)]
MC/Mach-O: Update fixup values for change to X86 offsets.

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

14 years agoMake this an unnumbered list.
Dan Gohman [Wed, 17 Feb 2010 22:54:10 +0000 (22:54 +0000)]
Make this an unnumbered list.

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

14 years agoHTML validation fixes.
Dan Gohman [Wed, 17 Feb 2010 22:50:12 +0000 (22:50 +0000)]
HTML validation fixes.

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

14 years agoAdd an "advanced" GetElementPtr FAQ document, with answers to
Dan Gohman [Wed, 17 Feb 2010 22:47:06 +0000 (22:47 +0000)]
Add an "advanced" GetElementPtr FAQ document, with answers to
questions left unanswered by the first GetElementPtr FAQ.

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

14 years agoRemove the NEON N2VSInt instruction class: it's only used in one place and
Bob Wilson [Wed, 17 Feb 2010 22:42:54 +0000 (22:42 +0000)]
Remove the NEON N2VSInt instruction class: it's only used in one place and
since it has no pattern, there's not much point in distinguishing an "N2VS"
class for intrinsics anyway.

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

14 years agoAdded CLREX (Clear-Exclusive) for disassembly only.
Johnny Chen [Wed, 17 Feb 2010 22:37:58 +0000 (22:37 +0000)]
Added CLREX (Clear-Exclusive) for disassembly only.

A8.6.30

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

14 years agoMore cleanup for NEON:
Bob Wilson [Wed, 17 Feb 2010 22:23:11 +0000 (22:23 +0000)]
More cleanup for NEON:
* Use "S" abbreviation for scalar single FP registers in class and pattern
names, instead of keeping the "D" (for "double") abbreviation and tacking on
an "s" elsewhere in the name.
* Move the scalar single FP register classes and patterns to be more
consistent with other definitions in the file.
* Rename "VNEGf32d" definition to "VNEGfd" for consistency.
* Deleted the N2VDIntsPat pattern; N2VSPat is good enough.

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

14 years agoAdded RFE for disassembly only.
Johnny Chen [Wed, 17 Feb 2010 21:39:10 +0000 (21:39 +0000)]
Added RFE for disassembly only.

B6.1.8 RFE Return From Exception loads the PC and the CPSR from the word at the
specified address and the following word respectively.

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

14 years agoMake the non-temporal bit "significant" in MemSDNodes so they aren't
David Greene [Wed, 17 Feb 2010 20:21:42 +0000 (20:21 +0000)]
Make the non-temporal bit "significant" in MemSDNodes so they aren't
CSE'd or otherwise combined with temporal MemSDNodes.

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

14 years agoRemember to define super registers in mips calls.
Jakob Stoklund Olesen [Wed, 17 Feb 2010 20:18:50 +0000 (20:18 +0000)]
Remember to define super registers in mips calls.

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

14 years agoAdd Regex::sub, for doing regular expression substitution with backreferences.
Daniel Dunbar [Wed, 17 Feb 2010 20:08:42 +0000 (20:08 +0000)]
Add Regex::sub, for doing regular expression substitution with backreferences.

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

14 years agoirbuilder is doing constant folding now by default, PR6092
Chris Lattner [Wed, 17 Feb 2010 19:54:34 +0000 (19:54 +0000)]
irbuilder is doing constant folding now by default, PR6092

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

14 years agofix some out of date prose dating from the LLVMContext changes.
Chris Lattner [Wed, 17 Feb 2010 19:51:31 +0000 (19:51 +0000)]
fix some out of date prose dating from the LLVMContext changes.

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

14 years agoFix comment.
Daniel Dunbar [Wed, 17 Feb 2010 19:26:45 +0000 (19:26 +0000)]
Fix comment.

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

14 years agoredisable this to save people a small amount of build time.
Chris Lattner [Wed, 17 Feb 2010 19:19:50 +0000 (19:19 +0000)]
redisable this to save people a small amount of build time.

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

14 years agoDead code elimination.
Jakob Stoklund Olesen [Wed, 17 Feb 2010 19:13:56 +0000 (19:13 +0000)]
Dead code elimination.

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

14 years ago"Fix and issue in SparcAsmPrinter where multiple identical .LLGETPCHn symbols could...
Chris Lattner [Wed, 17 Feb 2010 18:57:19 +0000 (18:57 +0000)]
"Fix and issue in SparcAsmPrinter where multiple identical .LLGETPCHn symbols could be emitted in the same file (it was uniqued by block number, but not by function number). "  Patch by Nathan Keynes!

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

14 years agomove isOnlyReachableByFallthrough out of MachineBasicBlock into AsmPrinter,
Chris Lattner [Wed, 17 Feb 2010 18:52:56 +0000 (18:52 +0000)]
move isOnlyReachableByFallthrough out of MachineBasicBlock into AsmPrinter,
and add a sparc implementation that knows about delay slots.  Patch by
Nathan Keynes!

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

14 years agoadd a note, from PR5100
Chris Lattner [Wed, 17 Feb 2010 18:42:24 +0000 (18:42 +0000)]
add a note, from PR5100

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

14 years agoadd missing method, PR6284
Chris Lattner [Wed, 17 Feb 2010 18:39:56 +0000 (18:39 +0000)]
add missing method, PR6284

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