oota-llvm.git
14 years agofix vnot matching to explicitly specify the type of the
Chris Lattner [Sun, 28 Mar 2010 08:08:07 +0000 (08:08 +0000)]
fix vnot matching to explicitly specify the type of the
input to be v8i8 or v16i8, which buildvectors get canonicalized to.

This allows the patterns that were previously using a bare 'vnot' to
match, before they couldn't.

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

14 years agofix up vnot matching, eliminating a dead pattern, correcting a couple of
Chris Lattner [Sun, 28 Mar 2010 08:00:23 +0000 (08:00 +0000)]
fix up vnot matching, eliminating a dead pattern, correcting a couple of
patterns that would never match because of bitcast, and eliminating use
of vnot_conv.

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

14 years agoadd some nounwinds
Chris Lattner [Sun, 28 Mar 2010 07:58:37 +0000 (07:58 +0000)]
add some nounwinds

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

14 years agothis takes an insane amount of time to run, disable it for now (PR6727)
Chris Lattner [Sun, 28 Mar 2010 07:58:09 +0000 (07:58 +0000)]
this takes an insane amount of time to run, disable it for now (PR6727)

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

14 years agostop using vnot_conv
Chris Lattner [Sun, 28 Mar 2010 07:48:17 +0000 (07:48 +0000)]
stop using vnot_conv

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

14 years agorevert r99743, this is saying that the repmovs instructinos have an
Chris Lattner [Sun, 28 Mar 2010 07:38:39 +0000 (07:38 +0000)]
revert r99743, this is saying that the repmovs instructinos have an
*input* of other type, which is the VT.

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

14 years agoremove a bunch of dead patterns.
Chris Lattner [Sun, 28 Mar 2010 07:38:00 +0000 (07:38 +0000)]
remove a bunch of dead patterns.

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

14 years agovalidate that input sdnodes don't exist in an output pattern.
Chris Lattner [Sun, 28 Mar 2010 06:57:56 +0000 (06:57 +0000)]
validate that input sdnodes don't exist in an output pattern.

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

14 years agoeliminate a bunch of code duplication in ParseTreePattern
Chris Lattner [Sun, 28 Mar 2010 06:50:34 +0000 (06:50 +0000)]
eliminate a bunch of code duplication in ParseTreePattern
by rotating it.

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

14 years agoadd some node definitions.
Chris Lattner [Sun, 28 Mar 2010 06:16:41 +0000 (06:16 +0000)]
add some node definitions.

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

14 years agoSDTCisVT<0, isVoid> is not valid, reject it.
Chris Lattner [Sun, 28 Mar 2010 06:04:39 +0000 (06:04 +0000)]
SDTCisVT<0, isVoid> is not valid, reject it.

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

14 years agoclaiming to return other is pointless.
Chris Lattner [Sun, 28 Mar 2010 05:57:36 +0000 (05:57 +0000)]
claiming to return other is pointless.

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

14 years agocomply with the wishes of a fixme.
Chris Lattner [Sun, 28 Mar 2010 05:55:17 +0000 (05:55 +0000)]
comply with the wishes of a fixme.

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

14 years agonow that (parallel) is gone and a variety of bugs in targets
Chris Lattner [Sun, 28 Mar 2010 05:54:03 +0000 (05:54 +0000)]
now that (parallel) is gone and a variety of bugs in targets
are cleaned up, we can remove an old fixme.

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

14 years agoadd an optimized form of OPC_EmitMergeInputChains for the 1, 0 and
Chris Lattner [Sun, 28 Mar 2010 05:50:16 +0000 (05:50 +0000)]
add an optimized form of OPC_EmitMergeInputChains for the 1, 0 and
1, 1 cases which are by-far the most frequent.  This shrinks the X86
isel table from 77014 -> 74657 bytes.

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

14 years agodon't add nodes to the now-dead nodes list multiple times, this
Chris Lattner [Sun, 28 Mar 2010 05:28:31 +0000 (05:28 +0000)]
don't add nodes to the now-dead nodes list multiple times, this
can cause a crash on crazy situations in msp430 when morph-node-to
is disabled.

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

14 years agoImprove systemz to model cmp and ucmp nodes as returning
Chris Lattner [Sun, 28 Mar 2010 05:21:52 +0000 (05:21 +0000)]
Improve systemz to model cmp and ucmp nodes as returning
their flags correctly.

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

14 years agothe FPCmp node returns an i32.
Chris Lattner [Sun, 28 Mar 2010 05:12:57 +0000 (05:12 +0000)]
the FPCmp node returns an i32.

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

14 years agofix some modelling problems exposed by a patch I'm working on. bsr/bsf/ptest
Chris Lattner [Sun, 28 Mar 2010 05:07:17 +0000 (05:07 +0000)]
fix some modelling problems exposed by a patch I'm working on.  bsr/bsf/ptest
nodes all have an EFLAGS result when made by isel lowering.

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

14 years agodon't add flag nodes with chain results to the NowDeadNodes
Chris Lattner [Sun, 28 Mar 2010 04:54:33 +0000 (04:54 +0000)]
don't add flag nodes with chain results to the NowDeadNodes
list multiple times when MorphNodeTo can't be applied.

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

14 years agoOops, r98447 dropped the reference to ForwardType in the wrong place in
Jeffrey Yasskin [Sun, 28 Mar 2010 01:03:47 +0000 (01:03 +0000)]
Oops, r98447 dropped the reference to ForwardType in the wrong place in
Type::destroy(), so it got skipped for FunctionTypes, StructTypes, and
UnionTypes.  This fixes the resulting leaks in test/Feature/opaquetypes.ll and
test/Integer/opaquetypes_bt.ll.

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

14 years agofix a long standing fixme, which required fixing a bunch of other
Chris Lattner [Sat, 27 Mar 2010 20:45:15 +0000 (20:45 +0000)]
fix a long standing fixme, which required fixing a bunch of other
issues to get here.  We now trim the result type list of the
CompleteMatch or MorphNodeTo operation to be the same size as the
thing we're matching.  this means that if you match (add GPR, GPR)
with an instruction that produces a normal result and a flag that
we now trim the result in tblgen instead of having to do it
dynamically.  This exposed a bunch of inconsistencies in result
counting that happened to be getting lucky since the days of the
old isel.

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

14 years agofix CodeGenTarget::getRegisterVTs to not return the
Chris Lattner [Sat, 27 Mar 2010 20:32:26 +0000 (20:32 +0000)]
fix CodeGenTarget::getRegisterVTs to not return the
same vt multiple times for a register.  For example,
ECX is in 5 different i32 reg classes, just return
1 i32 instead of 5.

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

14 years agohoist some funky logic into CodeGenInstruction
Chris Lattner [Sat, 27 Mar 2010 20:09:24 +0000 (20:09 +0000)]
hoist some funky logic into CodeGenInstruction
from two places in CodeGenDAGPatterns.cpp, and
use it in DAGISelMatcherGen.cpp instead of using
an incorrect predicate that happened to get lucky
on our current targets.

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

14 years agocontinue pushing tblgen's support for nodes with multiple
Chris Lattner [Sat, 27 Mar 2010 19:15:02 +0000 (19:15 +0000)]
continue pushing tblgen's support for nodes with multiple
results forward.  We can now handle an instruction that
produces one implicit def and one result instead of one or
the other when not at the root of the pattern.

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

14 years agoimprove -debug-only=isel comments for cases when we don't enter a
Chris Lattner [Sat, 27 Mar 2010 18:54:50 +0000 (18:54 +0000)]
improve -debug-only=isel comments for cases when we don't enter a
scope due to obviously false predicate.

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

14 years agofix a bug in my recent patch that increased opcode size to 2 bytes:
Chris Lattner [Sat, 27 Mar 2010 18:49:33 +0000 (18:49 +0000)]
fix a bug in my recent patch that increased opcode size to 2 bytes:
the index comments nested under OPC_SwitchOpcode were off by one.
This fixes the comments.

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

14 years agorevert r99719 which is breaking the botz.
Chris Lattner [Sat, 27 Mar 2010 18:01:10 +0000 (18:01 +0000)]
revert r99719 which is breaking the botz.

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

14 years agoMake llvm-ld remove its output files in the event of an error.
Dan Gohman [Sat, 27 Mar 2010 16:49:51 +0000 (16:49 +0000)]
Make llvm-ld remove its output files in the event of an error.

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

14 years agoGive FileRemover a default constructor to allow FileRemovers to be created
Dan Gohman [Sat, 27 Mar 2010 16:39:56 +0000 (16:39 +0000)]
Give FileRemover a default constructor to allow FileRemovers to be created
and initialized separately.

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

14 years agoNo need to check the same condition twice.
Dan Gohman [Sat, 27 Mar 2010 16:36:08 +0000 (16:36 +0000)]
No need to check the same condition twice.

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

14 years agoAdd a comment.
Dan Gohman [Sat, 27 Mar 2010 16:34:32 +0000 (16:34 +0000)]
Add a comment.

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

14 years agoRemove an unnecessary #include.
Dan Gohman [Sat, 27 Mar 2010 16:33:36 +0000 (16:33 +0000)]
Remove an unnecessary #include.

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

14 years agoRemove another memory leak from ABCD by using Edges by value instead of
Jeffrey Yasskin [Sat, 27 Mar 2010 09:09:17 +0000 (09:09 +0000)]
Remove another memory leak from ABCD by using Edges by value instead of
pointer.  There was also a SmallPtrSet whose settiness wasn't being used, so I
changed it to a SmallVector.

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

14 years agoIn ABCD, change the non-null Bound*s to Bound&s.
Jeffrey Yasskin [Sat, 27 Mar 2010 08:15:46 +0000 (08:15 +0000)]
In ABCD, change the non-null Bound*s to Bound&s.

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

14 years agoFix a memory leak in ABCD by giving ownership of Bound objects to the
Jeffrey Yasskin [Sat, 27 Mar 2010 08:09:24 +0000 (08:09 +0000)]
Fix a memory leak in ABCD by giving ownership of Bound objects to the
MemoizedResultChart.

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

14 years agoXFAIL a new tblgen test for memory leak checking.
Jeffrey Yasskin [Sat, 27 Mar 2010 04:59:47 +0000 (04:59 +0000)]
XFAIL a new tblgen test for memory leak checking.

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

14 years agoAvoid leaking the memory allocated for GlobalVariables in the interpreter, by
Jeffrey Yasskin [Sat, 27 Mar 2010 04:53:56 +0000 (04:53 +0000)]
Avoid leaking the memory allocated for GlobalVariables in the interpreter, by
freeing that memory when the GV is destroyed.

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

14 years agoFix indentation.
Bob Wilson [Sat, 27 Mar 2010 04:01:23 +0000 (04:01 +0000)]
Fix indentation.

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

14 years agoAdd a format argument to the N3V and N3VX classes, removing the N3Vf class.
Bob Wilson [Sat, 27 Mar 2010 03:56:52 +0000 (03:56 +0000)]
Add a format argument to the N3V and N3VX classes, removing the N3Vf class.

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

14 years agoremove parallel support.
Chris Lattner [Sat, 27 Mar 2010 02:53:27 +0000 (02:53 +0000)]
remove parallel support.

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

14 years agoeliminate the last of the parallel's!
Chris Lattner [Sat, 27 Mar 2010 02:47:14 +0000 (02:47 +0000)]
eliminate the last of the parallel's!

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

14 years agoWhen we promote a load of an argument make sure to take the alignment
Eric Christopher [Sat, 27 Mar 2010 01:54:00 +0000 (01:54 +0000)]
When we promote a load of an argument make sure to take the alignment
of the previous load - it's usually important.  For example, we don't want
to blindly turn an unaligned load into an aligned one.

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

14 years agoForgot the part where we handle the ".llvm.eh.catch.all.value".
Bill Wendling [Sat, 27 Mar 2010 01:24:30 +0000 (01:24 +0000)]
Forgot the part where we handle the ".llvm.eh.catch.all.value".

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

14 years agoReturn if we changed anything or not.
Bill Wendling [Sat, 27 Mar 2010 01:22:38 +0000 (01:22 +0000)]
Return if we changed anything or not.

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

14 years agoIf a selector has a call to ".llvm.eh.catch.all.value" that we haven't
Bill Wendling [Sat, 27 Mar 2010 01:19:12 +0000 (01:19 +0000)]
If a selector has a call to ".llvm.eh.catch.all.value" that we haven't
converted, then use the initializer, since using the name itself won't work.

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

14 years agoAdd NVMulSLFrm to represent "3-register multiply with scalar" operations and set
Johnny Chen [Sat, 27 Mar 2010 01:03:13 +0000 (01:03 +0000)]
Add NVMulSLFrm to represent "3-register multiply with scalar" operations and set
it as the format for the appropriate N3V*SL*<> classes.  These instructions
require special handling of the M:Vm field which encodes the restricted Dm and
the lane index within Dm.

Examples are A8.6.325 VMLA, VMLAL, VMLS, VMLSL (by scalar):

vmlal.s32 q3, d2, d10[0]

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

14 years agoeliminate almost all the rest of the x86-32 parallels.
Chris Lattner [Sat, 27 Mar 2010 00:45:04 +0000 (00:45 +0000)]
eliminate almost all the rest of the x86-32 parallels.

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

14 years agobump FIRST_TARGET_MEMORY_OPCODE back up, there is no reason to make it a tight bound...
Chris Lattner [Sat, 27 Mar 2010 00:29:41 +0000 (00:29 +0000)]
bump FIRST_TARGET_MEMORY_OPCODE back up, there is no reason to make it a tight bound anymore.

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

14 years agoThumb2 storeFrom/LoadToStackSlot() need to handle tGPR regs directly, not pass
Jim Grosbach [Sat, 27 Mar 2010 00:09:12 +0000 (00:09 +0000)]
Thumb2 storeFrom/LoadToStackSlot() need to handle tGPR regs directly, not pass
through to the generic version. The generic functions use STR/LDR, but T2
needs the t2STR/t2LDR instead so we get the addressing mode correct.

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

14 years agoimprove portability to minix, patch by
Chris Lattner [Fri, 26 Mar 2010 23:54:15 +0000 (23:54 +0000)]
improve portability to minix, patch by
Kees van Reeuwijk for PR6704

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

14 years agoRemove the duplicate multiclass N3VSh_QHSD and use N3VInt_QHSD which is modified
Johnny Chen [Fri, 26 Mar 2010 23:49:07 +0000 (23:49 +0000)]
Remove the duplicate multiclass N3VSh_QHSD and use N3VInt_QHSD which is modified
to now take a format argument.  N3VDInt<> and N3VQInt<> are modified to take a
format argument as well.

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

14 years agoIf we mark clean-ups as clean-ups, then it could break when inlining through an
Bill Wendling [Fri, 26 Mar 2010 23:41:30 +0000 (23:41 +0000)]
If we mark clean-ups as clean-ups, then it could break when inlining through an
'invoke' instruction. You will get a situation like this:

bb:
  %ehptr = eh.exception()
  %sel = eh.selector(%ehptr, @per, 0);

...

bb2:
  invoke _Unwind_Resume_or_Rethrow(%ehptr) %normal unwind to %lpad

lpad:
  ...

The unwinder will see the %sel call as a clean-up and, if it doesn't have a
catch further up the call stack, it will skip running it. But there *is* another
catch up the stack -- the catch for the %lpad. However, we can't see that. This
is fixed in code-gen, where we detect this situation, and convert the "clean-up"
selector call into a "catch-all" selector call. This gives us the correct
semantics.

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

14 years agoAdd NVExtFrm to represent NEON Vector Extract Instructions, that uses Inst{11-8}
Johnny Chen [Fri, 26 Mar 2010 22:28:56 +0000 (22:28 +0000)]
Add NVExtFrm to represent NEON Vector Extract Instructions, that uses Inst{11-8}
to encode the byte location of the extracted result in the concatenation of the
operands, from the least significant end.

Modify VEXTd and VEXTq classes to use the format.

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

14 years agoremove a constructor implementation that isn't declared
Chris Lattner [Fri, 26 Mar 2010 22:17:24 +0000 (22:17 +0000)]
remove a constructor implementation that isn't declared
in the header.  How can both clang and gcc accept this?

PR6703

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

14 years agoAdd few missed libcalls and correct names for others.
Anton Korobeynikov [Fri, 26 Mar 2010 21:32:14 +0000 (21:32 +0000)]
Add few missed libcalls and correct names for others.

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

14 years agoAdd N3RegVShFrm to represent 3-Register Vector Shift Instructions, which do not
Johnny Chen [Fri, 26 Mar 2010 21:26:28 +0000 (21:26 +0000)]
Add N3RegVShFrm to represent 3-Register Vector Shift Instructions, which do not
follow the N3RegFrm's operand order of D:Vd N:Vn M:Vm.  The operand order of
N3RegVShFrm is D:Vd M:Vm N:Vn (notice that M:Vm is the first src operand).

Add a parent class N3Vf which requires passing a Format argument and which the
N3V class is modified to inherit from.  N3V class represents the "normal"
3-Register NEON Instructions with N3RegFrm.

Also add a multiclass N3VSh_QHSD to represent clusters of NEON 3-Register Shift
Instructions and replace 8 invocations with it.

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

14 years agofix iterator name
Gabor Greif [Fri, 26 Mar 2010 19:59:25 +0000 (19:59 +0000)]
fix iterator name

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

14 years agoMinor grammar and html fixes.
Dan Gohman [Fri, 26 Mar 2010 19:51:14 +0000 (19:51 +0000)]
Minor grammar and html fixes.

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

14 years agosome more tweaks
Gabor Greif [Fri, 26 Mar 2010 19:40:38 +0000 (19:40 +0000)]
some more tweaks

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

14 years agoTell "the rest of the story" about LLVM's iterators' implicit conversions.
Dan Gohman [Fri, 26 Mar 2010 19:39:05 +0000 (19:39 +0000)]
Tell "the rest of the story" about LLVM's iterators' implicit conversions.

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

14 years agofix formatting and a validation fail
Gabor Greif [Fri, 26 Mar 2010 19:35:48 +0000 (19:35 +0000)]
fix formatting and a validation fail

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

14 years agoadd a blurb on const versions of chain traversals and a word of caution
Gabor Greif [Fri, 26 Mar 2010 19:30:47 +0000 (19:30 +0000)]
add a blurb on const versions of chain traversals and a word of caution

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

14 years agoDebug info shouldn't affect kills.
Dale Johannesen [Fri, 26 Mar 2010 19:21:26 +0000 (19:21 +0000)]
Debug info shouldn't affect kills.

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

14 years agoAdd a paragram describing how to extract line number information.
Devang Patel [Fri, 26 Mar 2010 19:08:36 +0000 (19:08 +0000)]
Add a paragram describing how to extract line number information.

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

14 years agohttp://englishplus.com/grammar/00000296.htm
Gabor Greif [Fri, 26 Mar 2010 19:04:42 +0000 (19:04 +0000)]
http://englishplus.com/grammar/00000296.htm

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

14 years agoFix SmallVector's insert to handle non-random-access iterators.
Dan Gohman [Fri, 26 Mar 2010 18:53:37 +0000 (18:53 +0000)]
Fix SmallVector's insert to handle non-random-access iterators.

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

14 years agovldm/vstm can only do up to 16 double-word registers at a time.
Jim Grosbach [Fri, 26 Mar 2010 18:41:09 +0000 (18:41 +0000)]
vldm/vstm can only do up to 16 double-word registers at a time.
Radar 7797856

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

14 years agoAdd N3RegFrm to represent "NEON 3 vector register format" instructions.
Johnny Chen [Fri, 26 Mar 2010 18:32:20 +0000 (18:32 +0000)]
Add N3RegFrm to represent "NEON 3 vector register format" instructions.
Examples are VABA (Vector Absolute Difference and Accumulate), VABAL (Vector
Absolute Difference and Accumulate Long), and VABD (Vector Absolute Difference).

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

14 years agoDo not sibcall if stack needs to be dynamically aligned.
Evan Cheng [Fri, 26 Mar 2010 16:26:03 +0000 (16:26 +0000)]
Do not sibcall if stack needs to be dynamically aligned.

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

14 years agoAllow trivial sibcall of vararg callee when no arguments are being passed.
Evan Cheng [Fri, 26 Mar 2010 02:13:13 +0000 (02:13 +0000)]
Allow trivial sibcall of vararg callee when no arguments are being passed.

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

14 years agoLiveVariables should clear kill / dead markers first. This allows us to remove a...
Evan Cheng [Fri, 26 Mar 2010 02:12:24 +0000 (02:12 +0000)]
LiveVariables should clear kill / dead markers first. This allows us to remove a hack in the scheduler.

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

14 years agoAdd N2RegVShLFrm and N2RegVShRFrm formats so that the disassembler can easily
Johnny Chen [Fri, 26 Mar 2010 01:07:59 +0000 (01:07 +0000)]
Add N2RegVShLFrm and N2RegVShRFrm formats so that the disassembler can easily
dispatch to the appropriate routines to handle the different interpretations of
the shift amount encoded in the imm6 field.  The Vd, Vm fields are interpreted
the same between the two, though.

See, for example, A8.6.367 VQSHL, VQSHLU (immediate) for N2RegVShLFrm format and
A8.6.368 VQSHRN, VQSHRUN for N2RegVShRFrm format.

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

14 years agoAvoid leaking argv and env arrays from lli.
Jeffrey Yasskin [Fri, 26 Mar 2010 00:59:12 +0000 (00:59 +0000)]
Avoid leaking argv and env arrays from lli.

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

14 years agoIgnore debug intrinsics in yet more places.
Dan Gohman [Fri, 26 Mar 2010 00:33:27 +0000 (00:33 +0000)]
Ignore debug intrinsics in yet more places.

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

14 years agoTry trivial remat before the coalescer gives up on a vr / physreg coalescing for...
Evan Cheng [Fri, 26 Mar 2010 00:07:25 +0000 (00:07 +0000)]
Try trivial remat before the coalescer gives up on a vr / physreg coalescing for fear of tying up a physical register.

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

14 years agoHandle DEBUG_VALUE in this pass.
Dale Johannesen [Fri, 26 Mar 2010 00:02:44 +0000 (00:02 +0000)]
Handle DEBUG_VALUE in this pass.

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

14 years agoswitch the flag for using NEON for SP floating point to a subtarget 'feature'.
Jim Grosbach [Thu, 25 Mar 2010 23:47:34 +0000 (23:47 +0000)]
switch the flag for using NEON for SP floating point to a subtarget 'feature'.

Re-commit. This time complete with testsuite updates.

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

14 years agoneed to fix 'make check' tests first. revert for a moment.
Jim Grosbach [Thu, 25 Mar 2010 23:34:05 +0000 (23:34 +0000)]
need to fix 'make check' tests first. revert for a moment.

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

14 years agoswitch the flag for using NEON for SP floating point to a subtarget 'feature'
Jim Grosbach [Thu, 25 Mar 2010 23:32:19 +0000 (23:32 +0000)]
switch the flag for using NEON for SP floating point to a subtarget 'feature'

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

14 years agorename pred_const_iterator to const_pred_iterator for consistency's sake
Gabor Greif [Thu, 25 Mar 2010 23:25:28 +0000 (23:25 +0000)]
rename pred_const_iterator to const_pred_iterator for consistency's sake

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

14 years agoRemoved instruction class NI from ARMInstrFormats.td.
Johnny Chen [Thu, 25 Mar 2010 23:11:56 +0000 (23:11 +0000)]
Removed instruction class NI from ARMInstrFormats.td.
It doesn't seem to be used anywhere.

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

14 years agoswitch the use-vml[as] instructions flag to a subtarget 'feature'
Jim Grosbach [Thu, 25 Mar 2010 23:11:16 +0000 (23:11 +0000)]
switch the use-vml[as] instructions flag to a subtarget 'feature'

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

14 years agorename use_const_iterator to const_use_iterator for consistency's sake
Gabor Greif [Thu, 25 Mar 2010 23:06:16 +0000 (23:06 +0000)]
rename use_const_iterator to const_use_iterator for consistency's sake

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

14 years agollvm-mc: Add a -mc-relax-all option, which relaxes every fixup. We always need
Daniel Dunbar [Thu, 25 Mar 2010 22:49:09 +0000 (22:49 +0000)]
llvm-mc: Add a -mc-relax-all option, which relaxes every fixup. We always need
exactly two passes in that case, and don't ever need to recompute any layout,
so this is a nice baseline for relaxation performance.

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

14 years agoAdd NVDupLnFrm and change NVDupLane class to use that format.
Johnny Chen [Thu, 25 Mar 2010 21:49:12 +0000 (21:49 +0000)]
Add NVDupLnFrm and change NVDupLane class to use that format.

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

14 years agoARM cortex-a8 doesn't do vmla/vmls well. disable them by default for that cpu
Jim Grosbach [Thu, 25 Mar 2010 20:48:50 +0000 (20:48 +0000)]
ARM cortex-a8 doesn't do vmla/vmls well. disable them by default for that cpu

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

14 years agoAdd NVCVTFrm (NEON Convert with fractional bits immediate) and modify N2VImm to
Johnny Chen [Thu, 25 Mar 2010 20:39:04 +0000 (20:39 +0000)]
Add NVCVTFrm (NEON Convert with fractional bits immediate) and modify N2VImm to
expect a Format arg.  N2VCvtD/N2VCvtQ are modified to use the NVCVTFrm format.

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

14 years agoAdd nounwind.
Evan Cheng [Thu, 25 Mar 2010 20:01:07 +0000 (20:01 +0000)]
Add nounwind.

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

14 years agoCode clean up.
Evan Cheng [Thu, 25 Mar 2010 19:46:11 +0000 (19:46 +0000)]
Code clean up.

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

14 years agoMC: Stop restarting layout on every relaxation.
Daniel Dunbar [Thu, 25 Mar 2010 19:35:56 +0000 (19:35 +0000)]
MC: Stop restarting layout on every relaxation.
 - Still O(N^2), just a faster form, and now its the MCAsmLayout's fault.

On the .s I am tuning against (combine.s from 403.gcc):
--
ddunbar@lordcrumb:MC$ diff stats-before.txt stats-after.txt
5,10c5,10
<    1728 assembler - Number of assembler layout and relaxation steps
<    7707 assembler - Number of emitted assembler fragments
<  120588 assembler - Number of emitted object file bytes
2233448 assembler - Number of evaluated fixups
<    1727 assembler - Number of relaxed instructions
6723845 mcexpr    - Number of MCExpr evaluations
---
>      3 assembler - Number of assembler layout and relaxation steps
>   7707 assembler - Number of emitted assembler fragments
> 120588 assembler - Number of emitted object file bytes
>  14796 assembler - Number of evaluated fixups
>   1727 assembler - Number of relaxed instructions
>  67889 mcexpr    - Number of MCExpr evaluations
--
Feel free to LOL at the -before numbers, if you like.

I am a little surprised we make more than 2 relaxation passes. It's pretty
trivial for us to do relaxation out-of-order if that would give a speedup.

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

14 years agoFix -Asserts warning, again.
Daniel Dunbar [Thu, 25 Mar 2010 19:35:53 +0000 (19:35 +0000)]
Fix -Asserts warning, again.

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

14 years agoTag SSE2 integer instructions as SSEPackedInt.
Jakob Stoklund Olesen [Thu, 25 Mar 2010 18:52:04 +0000 (18:52 +0000)]
Tag SSE2 integer instructions as SSEPackedInt.

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

14 years agoTeach TableGen to understand X.Y notation in the TSFlagsFields strings.
Jakob Stoklund Olesen [Thu, 25 Mar 2010 18:52:01 +0000 (18:52 +0000)]
Teach TableGen to understand X.Y notation in the TSFlagsFields strings.

Remove much horribleness from X86InstrFormats as a result. Similar
simplifications are probably possible for other targets.

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

14 years agofix a valgrind error on copy-constructor-synthesis.cpp, which is caused when
Chris Lattner [Thu, 25 Mar 2010 18:49:10 +0000 (18:49 +0000)]
fix a valgrind error on copy-constructor-synthesis.cpp, which is caused when
the custom insertion hook deletes the instruction, then we try to set dead
flags on it.  Neither the code that I added nor the code that was there
before was safe.

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

14 years agoRemove an unused option.
Evan Cheng [Thu, 25 Mar 2010 18:37:23 +0000 (18:37 +0000)]
Remove an unused option.

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

14 years agoMC: Simplify main section layout process by moving alignment into LayoutSection.
Daniel Dunbar [Thu, 25 Mar 2010 18:16:42 +0000 (18:16 +0000)]
MC: Simplify main section layout process by moving alignment into LayoutSection.

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

14 years agoMC: Sink Section address assignment into LayoutSection.
Daniel Dunbar [Thu, 25 Mar 2010 18:16:38 +0000 (18:16 +0000)]
MC: Sink Section address assignment into LayoutSection.

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

14 years agoAdd a late SSEDomainFix pass that twiddles SSE instructions to avoid domain crossings.
Jakob Stoklund Olesen [Thu, 25 Mar 2010 17:25:00 +0000 (17:25 +0000)]
Add a late SSEDomainFix pass that twiddles SSE instructions to avoid domain crossings.

On Nehalem and newer CPUs there is a 2 cycle latency penalty on using a register
in a different domain than where it was defined. Some instructions have
equvivalents for different domains, like por/orps/orpd.

The SSEDomainFix pass tries to minimize the number of domain crossings by
changing between equvivalent opcodes where possible.

This is a work in progress, in particular the pass doesn't do anything yet. SSE
instructions are tagged with their execution domain in TableGen using the last
two bits of TSFlags. Note that not all instructions are tagged correctly. Life
just isn't that simple.

The SSE execution domain issue is very similar to the ARM NEON/VFP pipeline
issue handled by NEONMoveFixPass. This pass may become target independent to
handle both.

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

14 years agoAdded a new instruction class NVDupLane to be inherited by VDUPLND and VDUPLNQ,
Johnny Chen [Thu, 25 Mar 2010 17:01:27 +0000 (17:01 +0000)]
Added a new instruction class NVDupLane to be inherited by VDUPLND and VDUPLNQ,
instead of the current N2V.  Format of NVDupLane instances are set to NEONFrm
currently.

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