oota-llvm.git
12 years agoRename some ocaml functions.
Erick Tryzelaar [Wed, 3 Mar 2010 23:51:30 +0000 (23:51 +0000)]
Rename some ocaml functions.

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

12 years agoExpose the external functions for ocaml's execution engine as an optimization.
Erick Tryzelaar [Wed, 3 Mar 2010 23:51:28 +0000 (23:51 +0000)]
Expose the external functions for ocaml's execution engine as an optimization.

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

12 years agoExpose alignment and stack alignment attributes to llvm-c and ocaml.
Erick Tryzelaar [Wed, 3 Mar 2010 23:51:25 +0000 (23:51 +0000)]
Expose alignment and stack alignment attributes to llvm-c and ocaml.

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

12 years agoMove MachineInstrExpressionTrait::getHashValue() out of line so it can skip over...
Evan Cheng [Wed, 3 Mar 2010 23:37:30 +0000 (23:37 +0000)]
Move MachineInstrExpressionTrait::getHashValue() out of line so it can skip over only virtual register defs. This matches what isEqual() is doing.

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

12 years agoRe-apply r97667 but with a little bit of thought put into the patch. This implements...
Evan Cheng [Wed, 3 Mar 2010 23:27:36 +0000 (23:27 +0000)]
Re-apply r97667 but with a little bit of thought put into the patch. This implements a special DenseMapInfo trait for DenseMap<MachineInstr*> that compare the value of the MachineInstr rather than the pointer value. Since the hashing and equality test functions ignore defs it's useful for doing CSE kind optimization.

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

12 years agoModified the asm string of 16-bit Thumb MUL instruction so that it prints:
Johnny Chen [Wed, 3 Mar 2010 23:15:43 +0000 (23:15 +0000)]
Modified the asm string of 16-bit Thumb MUL instruction so that it prints:

MULS <Rdm>, <Rn>, <Rdm>

according to A8.6.105 MUL Encoding T1.

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

12 years agoRevert 97667. It broke a bunch of tests.
Dan Gohman [Wed, 3 Mar 2010 22:40:03 +0000 (22:40 +0000)]
Revert 97667. It broke a bunch of tests.

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

12 years agoFix funky indentation and add comments.
Evan Cheng [Wed, 3 Mar 2010 21:54:14 +0000 (21:54 +0000)]
Fix funky indentation and add comments.

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

12 years agoMove DenseMapInfo for MachineInstr* to MachineInstr.h
Evan Cheng [Wed, 3 Mar 2010 21:47:16 +0000 (21:47 +0000)]
Move DenseMapInfo for MachineInstr* to MachineInstr.h

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

12 years agoFix a bug in SelectionDAG's ReplaceAllUsesWith in the case where
Dan Gohman [Wed, 3 Mar 2010 21:33:37 +0000 (21:33 +0000)]
Fix a bug in SelectionDAG's ReplaceAllUsesWith in the case where
CSE and recursive RAUW calls delete a node from the use list,
invalidating the use list iterator. There's currently no known
way to reproduce this in an unmodified LLVM, however there's no
fundamental reason why a SelectionDAG couldn't be formed which
would trigger this case.

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

12 years agoMachine CSE work in progress. It's doing some CSE now. But implicit def of physical...
Evan Cheng [Wed, 3 Mar 2010 21:20:05 +0000 (21:20 +0000)]
Machine CSE work in progress. It's doing some CSE now. But implicit def of physical registers are getting in the way.

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

12 years agoAdd MachineRegisterInfo::hasOneUse and hasOneNonDBGUse.
Evan Cheng [Wed, 3 Mar 2010 21:18:38 +0000 (21:18 +0000)]
Add MachineRegisterInfo::hasOneUse and hasOneNonDBGUse.

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

12 years agodon't use always_inline with gcc 3.4, it has some unimplemented features
Chris Lattner [Wed, 3 Mar 2010 20:47:12 +0000 (20:47 +0000)]
don't use always_inline with gcc 3.4, it has some unimplemented features
and is too old to really care about the performance of the generated
compiler.

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

12 years agoTopLevelMap[] reference is a pointer.
Evan Cheng [Wed, 3 Mar 2010 20:46:48 +0000 (20:46 +0000)]
TopLevelMap[] reference is a pointer.

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

12 years agoFix PR6444, note still doesn't compile libgcc2 all the way, but fixes that error...
Andrew Lenharth [Wed, 3 Mar 2010 20:15:31 +0000 (20:15 +0000)]
Fix PR6444, note still doesn't compile libgcc2 all the way, but fixes that error.  May not fix it in an ABI complient way.  It wasn't clear what gcc does

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

12 years agofix incorrect folding of icmp with undef, PR6481.
Chris Lattner [Wed, 3 Mar 2010 19:46:03 +0000 (19:46 +0000)]
fix incorrect folding of icmp with undef, PR6481.

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

12 years agoRevert...
Bill Wendling [Wed, 3 Mar 2010 19:31:05 +0000 (19:31 +0000)]
Revert...
--- Reverse-merging r97592 into '.':
U    lib/CodeGen/TargetLoweringObjectFileImpl.cpp

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

12 years agoAdded 32-bit Thumb instructions LDRT, LDRBT, LDRHT,,LDRSBT, LDRSHT, STRT, STRBT,
Johnny Chen [Wed, 3 Mar 2010 18:45:36 +0000 (18:45 +0000)]
Added 32-bit Thumb instructions LDRT, LDRBT, LDRHT,,LDRSBT, LDRSHT, STRT, STRBT,
and STRHT for disassembly only.

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

12 years agoadd some of the more obscure predicate types to the
Chris Lattner [Wed, 3 Mar 2010 07:46:25 +0000 (07:46 +0000)]
add some of the more obscure predicate types to the
Scope accelerator.

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

12 years agospeed up scope node processing: if the first element of a scope
Chris Lattner [Wed, 3 Mar 2010 07:31:15 +0000 (07:31 +0000)]
speed up scope node processing: if the first element of a scope
entry we're about to process is obviously going to fail, don't
bother pushing a scope only to have it immediately be popped.
This avoids a lot of scope stack traffic in common cases.

Unfortunately, this requires duplicating some of the predicate
dispatch.  To avoid duplicating the actual logic I pulled each
predicate out to its own static function which gets used in
both places.

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

12 years agointroduce a new SwitchTypeMatcher node (which is analogous to
Chris Lattner [Wed, 3 Mar 2010 06:28:15 +0000 (06:28 +0000)]
introduce a new SwitchTypeMatcher node (which is analogous to
SwitchOpcodeMatcher) and have DAGISelMatcherOpt form it.  This
speeds up selection, particularly for X86 which has lots of
variants of instructions with only type differences.

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

12 years agoFix comment.
Bill Wendling [Wed, 3 Mar 2010 05:40:40 +0000 (05:40 +0000)]
Fix comment.

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

12 years agoMake SCEVExpander and LSR more aggressive about hoisting expressions out
Dan Gohman [Wed, 3 Mar 2010 05:29:13 +0000 (05:29 +0000)]
Make SCEVExpander and LSR more aggressive about hoisting expressions out
of loops.

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

12 years agoRevert r97580; that's not the right way to fix this.
Dan Gohman [Wed, 3 Mar 2010 04:36:42 +0000 (04:36 +0000)]
Revert r97580; that's not the right way to fix this.

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

12 years agoWork in progress. Finding some cse now.
Evan Cheng [Wed, 3 Mar 2010 02:48:20 +0000 (02:48 +0000)]
Work in progress. Finding some cse now.

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

12 years agoremove nvload and two patterns that use it which are
Chris Lattner [Wed, 3 Mar 2010 02:14:54 +0000 (02:14 +0000)]
remove nvload and two patterns that use it which are
better done by dag combine.

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

12 years agoAdded 32-bit Thumb instructions t2NOP, t2YIELD, t2WFE, t2WFI, t2SEV, and t2DBG
Johnny Chen [Wed, 3 Mar 2010 02:09:43 +0000 (02:09 +0000)]
Added 32-bit Thumb instructions t2NOP, t2YIELD, t2WFE, t2WFI, t2SEV, and t2DBG
for disassembly only.

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

12 years agoUse APInt instead of zext value.
Bill Wendling [Wed, 3 Mar 2010 01:58:01 +0000 (01:58 +0000)]
Use APInt instead of zext value.

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

12 years agofactor the 'in the default address space' check out to a single
Chris Lattner [Wed, 3 Mar 2010 01:52:59 +0000 (01:52 +0000)]
factor the 'in the default address space' check out to a single
'dsload' pattern.  tblgen doesn't check patterns to see if they're
textually identical.  This allows better factoring.

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

12 years agofactor the 'sign extended from 8 bit' patterns better so
Chris Lattner [Wed, 3 Mar 2010 01:45:01 +0000 (01:45 +0000)]
factor the 'sign extended from 8 bit' patterns better so
that they are not destination type specific.  This allows
tblgen to factor them and the type check is redundant with
what the isel does anyway.

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

12 years ago- Change MachineInstr::isIdenticalTo to take a new option that determines whether...
Evan Cheng [Wed, 3 Mar 2010 01:44:33 +0000 (01:44 +0000)]
- Change MachineInstr::isIdenticalTo to take a new option that determines whether it should skip checking defs or at least virtual register defs. This subsumes part of the TargetInstrInfo::isIdentical functionality.
- Eliminate TargetInstrInfo::isIdentical and replace it with produceSameValue. In the default case, produceSameValue just checks whether two machine instructions are identical (except for virtual register defs). But targets may override it to check for unusual cases (e.g. ARM pic loads from constant pools).

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

12 years agoAdd an option to enable machine cse (it's not doing anything yet.
Evan Cheng [Wed, 3 Mar 2010 01:38:35 +0000 (01:38 +0000)]
Add an option to enable machine cse (it's not doing anything yet.

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

12 years agoOrdering forward declarations.
Evan Cheng [Wed, 3 Mar 2010 01:37:50 +0000 (01:37 +0000)]
Ordering forward declarations.

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

12 years agoDon't turn assertions on by default.
Bill Wendling [Wed, 3 Mar 2010 01:13:55 +0000 (01:13 +0000)]
Don't turn assertions on by default.

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

12 years agoEliminate unused instruction classes.
Evan Cheng [Wed, 3 Mar 2010 00:43:15 +0000 (00:43 +0000)]
Eliminate unused instruction classes.

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

12 years agoThis test case:
Bill Wendling [Wed, 3 Mar 2010 00:35:56 +0000 (00:35 +0000)]
This test case:

long test(long x) { return (x & 123124) | 3; }

Currently compiles to:

_test:
        orl     $3, %edi
        movq    %rdi, %rax
        andq    $123127, %rax
        ret

This is because instruction and DAG combiners canonicalize

  (or (and x, C), D) -> (and (or, D), (C | D))

However, this is only profitable if (C & D) != 0. It gets in the way of the
3-addressification because the input bits are known to be zero.

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

12 years agoAdded 32-bit Thumb instructions t2DMB variants, t2DSB variants, and t2ISBsy for
Johnny Chen [Wed, 3 Mar 2010 00:16:28 +0000 (00:16 +0000)]
Added 32-bit Thumb instructions t2DMB variants, t2DSB variants, and t2ISBsy for
disassembly only.

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

12 years agoUse the ocaml tag 0 since we are just returning an option value.
Erick Tryzelaar [Tue, 2 Mar 2010 23:59:08 +0000 (23:59 +0000)]
Use the ocaml tag 0 since we are just returning an option value.

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

12 years agoDon't use an ocaml keyword in an ocamldoc comment.
Erick Tryzelaar [Tue, 2 Mar 2010 23:59:05 +0000 (23:59 +0000)]
Don't use an ocaml keyword in an ocamldoc comment.

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

12 years agoExpose the optimization level for the jit in ocaml.
Erick Tryzelaar [Tue, 2 Mar 2010 23:59:03 +0000 (23:59 +0000)]
Expose the optimization level for the jit in ocaml.

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

12 years agoRemove module providers from ocaml.
Erick Tryzelaar [Tue, 2 Mar 2010 23:59:00 +0000 (23:59 +0000)]
Remove module providers from ocaml.

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

12 years agoAdd Module functions in place of module providers.
Erick Tryzelaar [Tue, 2 Mar 2010 23:58:54 +0000 (23:58 +0000)]
Add Module functions in place of module providers.

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

12 years agomerge two loops over all nodes in the graph into one.
Chris Lattner [Tue, 2 Mar 2010 23:12:51 +0000 (23:12 +0000)]
merge two loops over all nodes in the graph into one.

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

12 years agoeliminate PreprocessForRMW now that isel handles it.
Chris Lattner [Tue, 2 Mar 2010 22:33:56 +0000 (22:33 +0000)]
eliminate PreprocessForRMW now that isel handles it.
We still preprocess calls and fp return stuff.

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

12 years agoremove 300 lines of code that is now dead in the MSP430 backend
Chris Lattner [Tue, 2 Mar 2010 22:30:08 +0000 (22:30 +0000)]
remove 300 lines of code that is now dead in the MSP430 backend
now that isel handles chains more aggressively.  This also
allows us to make isLegalToFold non-virtual.

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

12 years agoFix some issues in WalkChainUsers dealing with
Chris Lattner [Tue, 2 Mar 2010 22:20:06 +0000 (22:20 +0000)]
Fix some issues in WalkChainUsers dealing with
CopyToReg/CopyFromReg/INLINEASM.  These are annoying because
they have the same opcode before an after isel.  Fix this by
setting their NodeID to -1 to indicate that they are selected,
just like what automatically happens when selecting things that
end up being machine nodes.

With that done, give IsLegalToFold a new flag that causes it to
ignore chains.  This lets the HandleMergeInputChains routine be
the one place that validates chains after a match is successful,
enabling the new hotness in chain processing.  This smarter
chain processing eliminates the need for "PreprocessRMW" in the
X86 and MSP430 backends and enables MSP to start matching it's
multiple mem operand instructions more aggressively.

I currently #if out the dead code in the X86 backend and MSP
backend, I'll remove it for real in a follow-on patch.

The testcase changes are:
  test/CodeGen/X86/sse3.ll: we generate better code
  test/CodeGen/X86/store_op_load_fold2.ll: PreprocessRMW was
      miscompiling this before, we now generate correct code
      Convert it to filecheck while I'm at it.
  test/CodeGen/MSP430/Inst16mm.ll: Add a testcase for mem/mem
      folding to make anton happy. :)

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

12 years agoAdded 32-bit Thumb instruction CLREX (Clear-Exclusive) for disassembly only.
Johnny Chen [Tue, 2 Mar 2010 22:11:06 +0000 (22:11 +0000)]
Added 32-bit Thumb instruction CLREX (Clear-Exclusive) for disassembly only.

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

12 years agoAllow specialization of ScopedHashTable of non-default DenseMapInfo.
Evan Cheng [Tue, 2 Mar 2010 22:10:24 +0000 (22:10 +0000)]
Allow specialization of ScopedHashTable of non-default DenseMapInfo.

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

12 years agoOkay. One last attempt:
Bill Wendling [Tue, 2 Mar 2010 21:50:35 +0000 (21:50 +0000)]
Okay. One last attempt:

Place the LSDA into the TEXT section on Mach-O. This saves space.

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

12 years agothis testcase is failing because pic16 doesn't define a reg/reg
Chris Lattner [Tue, 2 Mar 2010 20:48:24 +0000 (20:48 +0000)]
this testcase is failing because pic16 doesn't define a reg/reg
xor pattern.  I have no plans to fix this XFAIL.

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

12 years agoAdd support for use to ocaml.
Erick Tryzelaar [Tue, 2 Mar 2010 20:32:32 +0000 (20:32 +0000)]
Add support for use to ocaml.

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

12 years agoRename LLVMUseIteratorRef to LLVMUseRef since we don't refer to iterators in llvm-c.
Erick Tryzelaar [Tue, 2 Mar 2010 20:32:28 +0000 (20:32 +0000)]
Rename LLVMUseIteratorRef to LLVMUseRef since we don't refer to iterators in llvm-c.

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

12 years agoxfail this for now.
Chris Lattner [Tue, 2 Mar 2010 19:53:25 +0000 (19:53 +0000)]
xfail this for now.

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

12 years agoRemoved the extra S from the multiclass def T2I_adde_sube_s_irs as well as from
Johnny Chen [Tue, 2 Mar 2010 19:38:59 +0000 (19:38 +0000)]
Removed the extra S from the multiclass def T2I_adde_sube_s_irs as well as from
the opc string passed in, since it's a given from the class inheritance of T2sI.
The fixed the extra 's' in adcss & sbcss when disassembly printing.

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

12 years agorun HandleMergeInputChains even if we only have one input chain.
Chris Lattner [Tue, 2 Mar 2010 19:34:59 +0000 (19:34 +0000)]
run HandleMergeInputChains even if we only have one input chain.

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

12 years agoWhen expanding an expression such as (A + B + C + D), sort the operands
Dan Gohman [Tue, 2 Mar 2010 19:32:21 +0000 (19:32 +0000)]
When expanding an expression such as (A + B + C + D), sort the operands
by loop depth and emit loop-invariant subexpressions outside of loops.
This speeds up MultiSource/Applications/viterbi and others.

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

12 years agoSwap parameters of isSafeToMove and isSafeToReMat for consistency.
Evan Cheng [Tue, 2 Mar 2010 19:03:01 +0000 (19:03 +0000)]
Swap parameters of isSafeToMove and isSafeToReMat for consistency.

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

12 years agoFix typo.
Evan Cheng [Tue, 2 Mar 2010 19:02:27 +0000 (19:02 +0000)]
Fix typo.

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

12 years agoclean up some testcases.
Chris Lattner [Tue, 2 Mar 2010 18:56:03 +0000 (18:56 +0000)]
clean up some testcases.

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

12 years agothe sorting predicate should work for comparing an element
Chris Lattner [Tue, 2 Mar 2010 18:15:02 +0000 (18:15 +0000)]
the sorting predicate should work for comparing an element
to itself, even though this isn't wildly useful.

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

12 years agoAdded 32-bit Thumb instructions: CPS, SDIV, UDIV, SXTB16, SXTAB16, UXTAB16, SEL,
Johnny Chen [Tue, 2 Mar 2010 18:14:57 +0000 (18:14 +0000)]
Added 32-bit Thumb instructions: CPS, SDIV, UDIV, SXTB16, SXTAB16, UXTAB16, SEL,
SMMULR, SMMLAR, SMMLSR, TBB, TBH, and 16-bit Thumb instruction CPS for
disassembly only.

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

12 years agoFix grammar.
Devang Patel [Tue, 2 Mar 2010 17:58:15 +0000 (17:58 +0000)]
Fix grammar.
Thanks Duncan!

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

12 years agoAL is an optional mnemonic extension for always, except in IT instructions.
Johnny Chen [Tue, 2 Mar 2010 17:57:15 +0000 (17:57 +0000)]
AL is an optional mnemonic extension for always, except in IT instructions.
Add printMandatoryPredicateOperand() PrintMethod for IT predicate printing.

Ref: A8.3 Conditional execution

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

12 years agoChange some asm shift opcode strings to lowercase.
Johnny Chen [Tue, 2 Mar 2010 17:03:18 +0000 (17:03 +0000)]
Change some asm shift opcode strings to lowercase.

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

12 years agofix typo add missing (
Xerxes Ranby [Tue, 2 Mar 2010 13:42:03 +0000 (13:42 +0000)]
fix typo add missing (

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

12 years agoUnbreak llvm-arm-linux buildbot and fix PR5309.
Xerxes Ranby [Tue, 2 Mar 2010 13:26:18 +0000 (13:26 +0000)]
Unbreak llvm-arm-linux buildbot and fix PR5309.

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

12 years agoRather than passing "false" for InsertBefore, AddressSpace for ThreadLocal,
Duncan Sands [Tue, 2 Mar 2010 11:18:43 +0000 (11:18 +0000)]
Rather than passing "false" for InsertBefore, AddressSpace for ThreadLocal,
and nothing for AddressSpace, pass 0 for InsertBefore, "false" for ThreadLocal
and AddressSpace for AddressSpace.  Spotted by gcc-4.5.

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

12 years agoFix the xfail I added a couple of patches back. The issue
Chris Lattner [Tue, 2 Mar 2010 07:50:03 +0000 (07:50 +0000)]
Fix the xfail I added a couple of patches back.  The issue
was that we weren't properly handling the case when interior
nodes of a matched pattern become dead after updating chain
and flag uses.  Now we handle this explicitly in
UpdateChainsAndFlags.

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

12 years agoI was confused about this, it turns out that MorphNodeTo
Chris Lattner [Tue, 2 Mar 2010 07:14:49 +0000 (07:14 +0000)]
I was confused about this, it turns out that MorphNodeTo
*does* delete ex-operands that become dead.

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

12 years agofactor node morphing out to its own helper method.
Chris Lattner [Tue, 2 Mar 2010 06:55:04 +0000 (06:55 +0000)]
factor node morphing out to its own helper method.

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

12 years agoattributes are not part of types anymore, patch by James Woodyatt!
Chris Lattner [Tue, 2 Mar 2010 06:36:51 +0000 (06:36 +0000)]
attributes are not part of types anymore, patch by James Woodyatt!

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

12 years agoeliminate CodeGen/DAGISelHeader.h, it is empty now.
Chris Lattner [Tue, 2 Mar 2010 06:36:28 +0000 (06:36 +0000)]
eliminate CodeGen/DAGISelHeader.h, it is empty now.

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

12 years agoSink InstructionSelect() out of each target into SDISel, and rename it
Chris Lattner [Tue, 2 Mar 2010 06:34:30 +0000 (06:34 +0000)]
Sink InstructionSelect() out of each target into SDISel, and rename it
DoInstructionSelection.  Inline "SelectRoot" into it from DAGISelHeader.
Sink some other stuff out of DAGISelHeader into SDISel.

Eliminate the various 'Indent' stuff from various targets, which dates
to when isel was recursive.

 17 files changed, 114 insertions(+), 430 deletions(-)

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

12 years agoOnly save vector registers if we've defined for the vector registers.
Eric Christopher [Tue, 2 Mar 2010 06:25:00 +0000 (06:25 +0000)]
Only save vector registers if we've defined for the vector registers.

Fixes PR5309.

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

12 years agomove some code out of DAGISelHeader up to SelectionDAGISel.h where it
Chris Lattner [Tue, 2 Mar 2010 06:04:12 +0000 (06:04 +0000)]
move some code out of DAGISelHeader up to SelectionDAGISel.h where it
is shared by all targets.

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

12 years agoFix looking up MD names to not need a module.
Erick Tryzelaar [Tue, 2 Mar 2010 05:32:52 +0000 (05:32 +0000)]
Fix looking up MD names to not need a module.

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

12 years agoMove the docsdir to /usr/share/doc/llvm to match other projects.
Eric Christopher [Tue, 2 Mar 2010 05:17:21 +0000 (05:17 +0000)]
Move the docsdir to /usr/share/doc/llvm to match other projects.

Fixes PR6267.

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

12 years agoMake sure we save CXXFLAGS before setting it as pedantic and regenerate
Eric Christopher [Tue, 2 Mar 2010 05:06:54 +0000 (05:06 +0000)]
Make sure we save CXXFLAGS before setting it as pedantic and regenerate
configure.

Fixes PR6388.

Patch by Yann Droneaud!

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

12 years agoAdd file to CMakeLists.txt
Eric Christopher [Tue, 2 Mar 2010 02:49:43 +0000 (02:49 +0000)]
Add file to CMakeLists.txt

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

12 years agoAdd skeleton of a machine level cse pass.
Evan Cheng [Tue, 2 Mar 2010 02:38:24 +0000 (02:38 +0000)]
Add skeleton of a machine level cse pass.

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

12 years agoAdd count() and lookup() to ScopedHashTable. It might be useful to get information...
Evan Cheng [Tue, 2 Mar 2010 02:37:33 +0000 (02:37 +0000)]
Add count() and lookup() to ScopedHashTable. It might be useful to get information out of the hash table.

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

12 years agoUse the right induction variable.
Chris Lattner [Tue, 2 Mar 2010 02:37:23 +0000 (02:37 +0000)]
Use the right induction variable.

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

12 years agoRewrite chain handling validation and input TokenFactor handling
Chris Lattner [Tue, 2 Mar 2010 02:22:10 +0000 (02:22 +0000)]
Rewrite chain handling validation and input TokenFactor handling
stuff now that we don't care about emulating the old broken
behavior of the old isel.  This eliminates the
'CheckChainCompatible' check (along with IsChainCompatible) which
did an incorrect and inefficient scan *up* the chain nodes which
happened as the pattern was being formed and does the validation
at the end in HandleMergeInputChains when it forms a structural
pattern.  This scans "down" the graph, which means that it is
quickly bounded by nodes already selected.  This also handles
token factors that get "trapped" in the dag.

Removing the CheckChainCompatible nodes also shrinks the
generated tables by about 6K for X86 (down to 83K).

There are two pieces remaining before I can nuke PreprocessRMW:
1. I xfailed a test because we're now producing worse code in a
   case that has nothing to do with the change: it turns out that
   our use of MorphNodeTo will leave dead nodes in the graph
   which (depending on how the graph is walked) end up causing
   bogus uses of chains and blocking matches.  This is really
   bad for other reasons, so I'll fix this in a follow-up patch.

2. CheckFoldableChainNode needs to be improved to handle the TF.

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

12 years agoFix several places to handle vector operands properly.
Dan Gohman [Tue, 2 Mar 2010 02:14:38 +0000 (02:14 +0000)]
Fix several places to handle vector operands properly.
Based on a patch by Micah Villmow for PR6438.

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

12 years agoNon-affine post-inc SCEV expansions have more code which must be
Dan Gohman [Tue, 2 Mar 2010 01:59:21 +0000 (01:59 +0000)]
Non-affine post-inc SCEV expansions have more code which must be
emitted after the increment. Make sure the insert position
reflects this. This fixes PR6453.

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

12 years agoRemove dead parameter passing.
Bill Wendling [Tue, 2 Mar 2010 01:55:18 +0000 (01:55 +0000)]
Remove dead parameter passing.

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

12 years agoConstructors and operators for anonymous aggregates does not names. Do not force...
Devang Patel [Tue, 2 Mar 2010 01:26:20 +0000 (01:26 +0000)]
Constructors and operators for anonymous aggregates does not names. Do not force empty AT_name attribute in such cases.

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

12 years agoFloating-point add, sub, and mul are now spelled fadd, fsub, and fmul,
Dan Gohman [Tue, 2 Mar 2010 01:11:08 +0000 (01:11 +0000)]
Floating-point add, sub, and mul are now spelled fadd, fsub, and fmul,
respectively.

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

12 years agoPerformTailCallOpt was renamed to GuaranteedTailCallOpt to
Dan Gohman [Tue, 2 Mar 2010 01:08:11 +0000 (01:08 +0000)]
PerformTailCallOpt was renamed to GuaranteedTailCallOpt to
better reflect its meaning, now that tail call optimizations
are done by default in some cases.

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

12 years agoremove dead code.
Chris Lattner [Tue, 2 Mar 2010 00:40:26 +0000 (00:40 +0000)]
remove dead code.

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

12 years agoadd some missing \n's
Chris Lattner [Tue, 2 Mar 2010 00:13:03 +0000 (00:13 +0000)]
add some missing \n's

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

12 years agoDon't attempt load PRE when there is no real redundancy (i.e., the load is in
Bob Wilson [Tue, 2 Mar 2010 00:09:29 +0000 (00:09 +0000)]
Don't attempt load PRE when there is no real redundancy (i.e., the load is in
a loop and is itself the only dependency).

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

12 years agorefactor some code out of OPC_EmitMergeInputChains into a
Chris Lattner [Tue, 2 Mar 2010 00:00:03 +0000 (00:00 +0000)]
refactor some code out of OPC_EmitMergeInputChains into a
new helper function.

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

12 years agoremove some functions that were only used by the
Chris Lattner [Mon, 1 Mar 2010 23:40:33 +0000 (23:40 +0000)]
remove some functions that were only used by the
old isel generated code.

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

12 years agoWhen GVN needs to split critical edges for load PRE, check all of the
Bob Wilson [Mon, 1 Mar 2010 23:37:32 +0000 (23:37 +0000)]
When GVN needs to split critical edges for load PRE, check all of the
predecessors before returning.  Otherwise, if multiple predecessor edges need
splitting, we only get one of them per iteration.  This makes a small but
measurable compile time improvement with -enable-full-load-pre.

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

12 years agofixme resolved.
Chris Lattner [Mon, 1 Mar 2010 23:08:51 +0000 (23:08 +0000)]
fixme resolved.

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

12 years agoremove a little hack I did for the old isel, not needed
Chris Lattner [Mon, 1 Mar 2010 22:51:11 +0000 (22:51 +0000)]
remove a little hack I did for the old isel, not needed
now that it is gone.

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

12 years agoresolve some fixmes
Chris Lattner [Mon, 1 Mar 2010 22:49:06 +0000 (22:49 +0000)]
resolve some fixmes

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

12 years agoresolve a fixme and simplify code by moving insertion of the
Chris Lattner [Mon, 1 Mar 2010 22:46:42 +0000 (22:46 +0000)]
resolve a fixme and simplify code by moving insertion of the
EmitMergeInputChainsMatcher node up into EmitResultCode.  This
doesn't have much of an effect on the generated code, the X86
table is exactly the same size.

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

12 years agoresolve a fixme by having the .td file parser reject thigns like
Chris Lattner [Mon, 1 Mar 2010 22:29:19 +0000 (22:29 +0000)]
resolve a fixme by having the .td file parser reject thigns like

(set GPR, somecomplexpattern)

if somecomplexpattern doesn't declare what it can match.

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