oota-llvm.git
13 years agoComment grammar fixes.
Torok Edwin [Fri, 30 Sep 2011 13:07:47 +0000 (13:07 +0000)]
Comment grammar fixes.

thanks to Duncan.

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

13 years agoPTX: Attempt to cleanup/unify the handling of FP rounding modes. This requires
Justin Holewinski [Fri, 30 Sep 2011 12:54:43 +0000 (12:54 +0000)]
PTX: Attempt to cleanup/unify the handling of FP rounding modes. This requires
us to manually provide Pat<> definitions for all FP instruction patterns.

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

13 years agoInstead of crashing when MCAsmInfo is NULL, add an assert.
Torok Edwin [Fri, 30 Sep 2011 12:31:57 +0000 (12:31 +0000)]
Instead of crashing when MCAsmInfo is NULL, add an assert.

This helps with porting code from 2.9 to 3.0 as TargetSelect.h changed location,
and if you include the old one by accident you will trigger this assert.

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

13 years agoMips64 shift instructions.
Akira Hatanaka [Fri, 30 Sep 2011 03:18:46 +0000 (03:18 +0000)]
Mips64 shift instructions.

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

13 years agoMips64 arithmetic and logical instructions with one source register and
Akira Hatanaka [Fri, 30 Sep 2011 02:08:54 +0000 (02:08 +0000)]
Mips64 arithmetic and logical instructions with one source register and
immediate.

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

13 years agoARM fix encoding of VMOV.f32 and VMOV.f64 immediates.
Jim Grosbach [Fri, 30 Sep 2011 00:50:06 +0000 (00:50 +0000)]
ARM fix encoding of VMOV.f32 and VMOV.f64 immediates.

Encode the immediate into its 8-bit form as part of isel rather than later,
which simplifies things for mapping the encoding bits, allows the removal
of the custom disassembler decoding hook, makes the operand printer trivial,
and prepares things more cleanly for handling these in the asm parser.

rdar://10211428

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

13 years agoPrecompute a bit vector of register sub-classes.
Jakob Stoklund Olesen [Fri, 30 Sep 2011 00:10:40 +0000 (00:10 +0000)]
Precompute a bit vector of register sub-classes.

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

13 years agoOrder register classes topologically.
Jakob Stoklund Olesen [Fri, 30 Sep 2011 00:10:36 +0000 (00:10 +0000)]
Order register classes topologically.

All register classes are given a lower ID than their sub-classes.
Cliques are ordered alphabetically.

This will be used to simplify some sub-class operations.

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

13 years agoFill delay slot with useful instructions. Modified from Sparc's version of delay
Akira Hatanaka [Thu, 29 Sep 2011 23:52:13 +0000 (23:52 +0000)]
Fill delay slot with useful instructions. Modified from Sparc's version of delay
slot filler.

Patch by Reed Kotler at Mips Technologies.

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

13 years agoCreate a machine basic block in the constant pool and retrieve the symbol for an...
Bill Wendling [Thu, 29 Sep 2011 23:50:42 +0000 (23:50 +0000)]
Create a machine basic block in the constant pool and retrieve the symbol for an MBB.

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

13 years agoSupport creating a constant pool value for a machine basic block.
Bill Wendling [Thu, 29 Sep 2011 23:48:44 +0000 (23:48 +0000)]
Support creating a constant pool value for a machine basic block.

This is used when we want to take the address of a machine basic block, but it's
not associated with a BB in LLVM IR.

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

13 years agoFold two identical set lookups into one. No functionality change.
Nick Lewycky [Thu, 29 Sep 2011 23:40:12 +0000 (23:40 +0000)]
Fold two identical set lookups into one. No functionality change.

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

13 years agoSwitch to ArrayRef<CodeGenRegisterClass*>.
Jakob Stoklund Olesen [Thu, 29 Sep 2011 22:28:37 +0000 (22:28 +0000)]
Switch to ArrayRef<CodeGenRegisterClass*>.

This makes it possible to allocate CodeGenRegisterClass instances
dynamically and reorder them.

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

13 years agoWhen eliminating unnecessary retain+autorelease on return values,
Dan Gohman [Thu, 29 Sep 2011 22:27:34 +0000 (22:27 +0000)]
When eliminating unnecessary retain+autorelease on return values,
handle the case where the retain is in a different basic block.
rdar://10210274.

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

13 years agoDon't eliminate objc_retainBlock calls on stack objects if the
Dan Gohman [Thu, 29 Sep 2011 22:25:23 +0000 (22:25 +0000)]
Don't eliminate objc_retainBlock calls on stack objects if the
objc_retainBlock call is potentially responsible for copying
the block to the heap to extend its lifetime. rdar://10209613.

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

13 years agoTidy up. Formatting.
Jim Grosbach [Thu, 29 Sep 2011 21:43:01 +0000 (21:43 +0000)]
Tidy up. Formatting.

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

13 years agoFix typo.
Nick Lewycky [Thu, 29 Sep 2011 21:07:46 +0000 (21:07 +0000)]
Fix typo.

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

13 years agoMips64 arithmetic and logical instructions with two source registers.
Akira Hatanaka [Thu, 29 Sep 2011 20:37:56 +0000 (20:37 +0000)]
Mips64 arithmetic and logical instructions with two source registers.

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

13 years agoClean up uses of switch instructions so they are not dependent on the operand orderin...
Eli Friedman [Thu, 29 Sep 2011 20:21:17 +0000 (20:21 +0000)]
Clean up uses of switch instructions so they are not dependent on the operand ordering.  Patch by Stepan Dyatkovskiy.

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

13 years agoSimplify.
Devang Patel [Thu, 29 Sep 2011 17:06:40 +0000 (17:06 +0000)]
Simplify.

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

13 years agoClarify comments.
Devang Patel [Thu, 29 Sep 2011 16:52:53 +0000 (16:52 +0000)]
Clarify comments.

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

13 years agoRemove unnecessary and unused data member.
Devang Patel [Thu, 29 Sep 2011 16:48:44 +0000 (16:48 +0000)]
Remove unnecessary and unused data member.

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

13 years agoCosmetic changes, as per Nick's review.
Devang Patel [Thu, 29 Sep 2011 16:46:47 +0000 (16:46 +0000)]
Cosmetic changes, as per Nick's review.

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

13 years agoPlace this bracket according to the LLVM style.
Duncan Sands [Thu, 29 Sep 2011 16:01:46 +0000 (16:01 +0000)]
Place this bracket according to the LLVM style.

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

13 years agoPTX: Fix broken shared library build
Justin Holewinski [Thu, 29 Sep 2011 14:25:48 +0000 (14:25 +0000)]
PTX: Fix broken shared library build

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

13 years agoExpand the x86 V_SET0* pseudos right after register allocation.
Jakob Stoklund Olesen [Thu, 29 Sep 2011 05:10:54 +0000 (05:10 +0000)]
Expand the x86 V_SET0* pseudos right after register allocation.

This also makes it possible to reduce the number of pseudo instructions
and get rid of the encoding information.

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

13 years agoTarget/ARM: Unbreak! CMake! Build!
NAKAMURA Takumi [Thu, 29 Sep 2011 03:32:49 +0000 (03:32 +0000)]
Target/ARM: Unbreak! CMake! Build!

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

13 years agoDelete NEONMoveFix, now unused.
Jakob Stoklund Olesen [Thu, 29 Sep 2011 02:56:45 +0000 (02:56 +0000)]
Delete NEONMoveFix, now unused.

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

13 years agoUse ExecutionDepsFix instead of NEONMoveFix.
Jakob Stoklund Olesen [Thu, 29 Sep 2011 02:48:41 +0000 (02:48 +0000)]
Use ExecutionDepsFix instead of NEONMoveFix.

This enables NEON domain tracking across basic blocks, but should
otherwise do the same thing.

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

13 years agotypo + pasto
Andrew Trick [Thu, 29 Sep 2011 01:53:08 +0000 (01:53 +0000)]
typo + pasto

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

13 years agoRemove NumImplicitOps which is now unused.
Jakob Stoklund Olesen [Thu, 29 Sep 2011 01:47:36 +0000 (01:47 +0000)]
Remove NumImplicitOps which is now unused.

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

13 years agoLSR: rewrite inner loops only.
Andrew Trick [Thu, 29 Sep 2011 01:33:38 +0000 (01:33 +0000)]
LSR: rewrite inner loops only.

Rewriting the entire loop nest now requires -enable-lsr-nested.
See PR11035 for some performance data.
A few unit tests specifically test nested LSR, and are now under a flag.

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

13 years agowhitespace
Andrew Trick [Thu, 29 Sep 2011 01:31:48 +0000 (01:31 +0000)]
whitespace

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

13 years agoFix build failures better.
Andrew Trick [Thu, 29 Sep 2011 01:22:31 +0000 (01:22 +0000)]
Fix build failures better.

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

13 years agoFix build failure.
Daniel Dunbar [Thu, 29 Sep 2011 01:14:42 +0000 (01:14 +0000)]
Fix build failure.

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

13 years agoMove to ISelLowering.
Bill Wendling [Thu, 29 Sep 2011 01:13:55 +0000 (01:13 +0000)]
Move to ISelLowering.

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

13 years agoPTX: Add new patterns for bitconvert and any_extend
Justin Holewinski [Thu, 29 Sep 2011 01:13:12 +0000 (01:13 +0000)]
PTX: Add new patterns for bitconvert and any_extend

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

13 years agollvm-size: Apply Chris's code review fixes.
Michael J. Spencer [Thu, 29 Sep 2011 00:59:18 +0000 (00:59 +0000)]
llvm-size: Apply Chris's code review fixes.

This doesn't use formated_raw_ostream because it doesn't support the
functionality needed.

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

13 years agoUse the local we already set up.
Eric Christopher [Thu, 29 Sep 2011 00:50:59 +0000 (00:50 +0000)]
Use the local we already set up.

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

13 years agoRewrite MachineInstr::addOperand() to avoid NumImplicitOps.
Jakob Stoklund Olesen [Thu, 29 Sep 2011 00:40:51 +0000 (00:40 +0000)]
Rewrite MachineInstr::addOperand() to avoid NumImplicitOps.

The function needs to scan the implicit operands anyway, so no
performance is won by caching the number of implicit operands added to
an instruction.

This also fixes a bug when adding operands after an implicit operand has
been added manually.  The NumImplicitOps count wasn't kept up to date.

MachineInstr::addOperand() will now consistently place all explicit
operands before all the implicit operands, regardless of the order they
are added.  It is possible to change an MI opcode and add additional
explicit operands.  They will be inserted before any existing implicit
operands.

The only exception is inline asm instructions where operands are never
reordered.  This is because of a hack that marks explicit clobber regs
on inline asm as <implicit-def> to please the fast register allocator.
This hack can go away when InstrEmitter and FastIsel can add exact
<dead> flags to physreg defs.

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

13 years agotblgen/ClangDiagnostics: Add support for split default warning "no-werror" and
Daniel Dunbar [Thu, 29 Sep 2011 00:29:04 +0000 (00:29 +0000)]
tblgen/ClangDiagnostics: Add support for split default warning "no-werror" and
"show-in-system-header" bits, which I will be adding in Clang shortly.

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

13 years agoRevert r140731, "Define classes for unary and binary FP instructions and use them...
Jakob Stoklund Olesen [Wed, 28 Sep 2011 23:59:28 +0000 (23:59 +0000)]
Revert r140731, "Define classes for unary and binary FP instructions and use them to define"

It broke the unit tests.  Please reapply with tests fixed.

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

13 years agoTighten a ARM dag combine condition to avoid an identity transformation, which
Evan Cheng [Wed, 28 Sep 2011 23:16:31 +0000 (23:16 +0000)]
Tighten a ARM dag combine condition to avoid an identity transformation, which
ends up introducing a cycle in the DAG.

rdar://10196296

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

13 years agoDefine classes for unary and binary FP instructions and use them to define
Akira Hatanaka [Wed, 28 Sep 2011 21:58:01 +0000 (21:58 +0000)]
Define classes for unary and binary FP instructions and use them to define
multiclasses.

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

13 years agoHave the SjLjEHPrepare pass do some more heavy lifting.
Bill Wendling [Wed, 28 Sep 2011 21:56:53 +0000 (21:56 +0000)]
Have the SjLjEHPrepare pass do some more heavy lifting.

Upon further review, most of the EH code should remain written at the IR
level. The part which breaks SSA form is the dispatch table, so that part will
be moved to the back-end.

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

13 years agoFix cast.
Michael J. Spencer [Wed, 28 Sep 2011 21:24:44 +0000 (21:24 +0000)]
Fix cast.

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

13 years agoPR11033: Make sure we don't generate PCMPGTQ and PCMPEQQ if the target CPU does not...
Eli Friedman [Wed, 28 Sep 2011 21:00:25 +0000 (21:00 +0000)]
PR11033: Make sure we don't generate PCMPGTQ and PCMPEQQ if the target CPU does not support them.

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

13 years agoAdd llvm-size.
Michael J. Spencer [Wed, 28 Sep 2011 20:57:46 +0000 (20:57 +0000)]
Add llvm-size.

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

13 years agoObject: Add isSection{Data,BSS}.
Michael J. Spencer [Wed, 28 Sep 2011 20:57:30 +0000 (20:57 +0000)]
Object: Add isSection{Data,BSS}.

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

13 years agoNULL cannot be portably used as the last argument to a function with __attribute...
Eli Friedman [Wed, 28 Sep 2011 20:41:50 +0000 (20:41 +0000)]
NULL cannot be portably used as the last argument to a function with __attribute((sentinel)), even though it usually works.  Use (void*)0 instead.  PR11002.

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

13 years agoPerform the lowering only if there are invokes.
Bill Wendling [Wed, 28 Sep 2011 20:29:45 +0000 (20:29 +0000)]
Perform the lowering only if there are invokes.

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

13 years agoAhem...actually *add* the ARMSjLjLowering pass to the pass manager.
Bill Wendling [Wed, 28 Sep 2011 20:29:28 +0000 (20:29 +0000)]
Ahem...actually *add* the ARMSjLjLowering pass to the pass manager.

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

13 years agoAdd a note on removing LLVMC.
Eric Christopher [Wed, 28 Sep 2011 19:47:28 +0000 (19:47 +0000)]
Add a note on removing LLVMC.

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

13 years agoIntroduce llvm-cov.
Devang Patel [Wed, 28 Sep 2011 18:50:00 +0000 (18:50 +0000)]
Introduce llvm-cov.

Add llvm-cov skeleton. It has initial support to read coverage info generated by GCOVProfiling.cpp.
Today, you can do
prompt> clang a.c -ftest-coverage -fprofile-arcs -o a
prompt> ./a
prompt> llvm-cov -gcno a.gcno -gcda a.gcda
a.c
 : #include "a.h"
 :
 : int main() {
 : int i = 0;
 : if (i) {
1: int j = 0;
1: j = 1;
1: } else {
 : int k = 1;
 : k = 2;
 : }
1: return 0;
 : }
 :
 :

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

13 years agoPTX: Fix alignment logic
Justin Holewinski [Wed, 28 Sep 2011 18:24:58 +0000 (18:24 +0000)]
PTX: Fix alignment logic

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

13 years agoRename predicate In32BitMode to NotFP64bit and add definition of IsFP64bit.
Akira Hatanaka [Wed, 28 Sep 2011 18:11:19 +0000 (18:11 +0000)]
Rename predicate In32BitMode to NotFP64bit and add definition of IsFP64bit.

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

13 years agoRemove definitions of branch-on-FP-likely instructions. They are deprecated.
Akira Hatanaka [Wed, 28 Sep 2011 17:56:55 +0000 (17:56 +0000)]
Remove definitions of branch-on-FP-likely instructions. They are deprecated.

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

13 years agoMips64 predicate definitions. Patch by Liu.
Akira Hatanaka [Wed, 28 Sep 2011 17:50:27 +0000 (17:50 +0000)]
Mips64 predicate definitions. Patch by Liu.

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

13 years agoindvars: generalize SCEV getPreStartForSignExtend.
Andrew Trick [Wed, 28 Sep 2011 17:02:54 +0000 (17:02 +0000)]
indvars: generalize SCEV getPreStartForSignExtend.

Handle general Add expressions to avoid leaving around redundant
32-bit IVs.

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

13 years agoPTX: MC-ize the PTX backend (patch 2 of N)
Justin Holewinski [Wed, 28 Sep 2011 14:32:06 +0000 (14:32 +0000)]
PTX: MC-ize the PTX backend (patch 2 of N)

Get rid of some of the no-longer-needed parts of PTXAsmPrinter.

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

13 years agoPTX: MC-ize the PTX back-end (patch 1 of N)
Justin Holewinski [Wed, 28 Sep 2011 14:32:04 +0000 (14:32 +0000)]
PTX: MC-ize the PTX back-end (patch 1 of N)

Lay some groundwork for converting to MC-based asm printer. This is the first
of probably many patches to bring the back-end back up-to-date with all of the
recent MC changes.

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

13 years agoCheck in a patch that has already been code reviewed by Owen that I'd forgotten to...
James Molloy [Wed, 28 Sep 2011 14:21:38 +0000 (14:21 +0000)]
Check in a patch that has already been code reviewed by Owen that I'd forgotten to commit.

Build on previous patches to successfully distinguish between an M-series and A/R-series MSR and MRS instruction. These take different mask names and have a *slightly* different opcode format.

Add decoder and disassembler tests.

Improvement on the previous patch - successfully distinguish between valid v6m and v7m masks (one is a subset of the other). The patch had to be edited slightly to apply to ToT.

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

13 years agoChanged comments on foreign C++ exceptions (generated with type info 7),
Garrison Venn [Wed, 28 Sep 2011 10:53:56 +0000 (10:53 +0000)]
Changed comments on foreign C++ exceptions (generated with type info 7),
handling with references to
http://sourcery.mentor.com/public/cxx-abi/abi-eh.html (r 1.22).

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

13 years agoA typeid of zero means a cleanup, not a catch. This case occurs
Duncan Sands [Wed, 28 Sep 2011 09:13:02 +0000 (09:13 +0000)]
A typeid of zero means a cleanup, not a catch.  This case occurs
when there is both a catch and a cleanup.  Correct the comment.

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

13 years agoPTX: Simplify code. No functionality change.
Benjamin Kramer [Wed, 28 Sep 2011 04:32:36 +0000 (04:32 +0000)]
PTX: Simplify code. No functionality change.

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

13 years agoPTX: Pass param name strings per const reference.
Benjamin Kramer [Wed, 28 Sep 2011 04:08:02 +0000 (04:08 +0000)]
PTX: Pass param name strings per const reference.

The copies caused use-after-free bugs on std::string implementations without COW (i.e. anything but libstdc++)

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

13 years agoStrip off pointer casts when looking at the eh.sjlj.functioncontext's argument.
Bill Wendling [Wed, 28 Sep 2011 03:52:41 +0000 (03:52 +0000)]
Strip off pointer casts when looking at the eh.sjlj.functioncontext's argument.

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

13 years agoBitcast the alloca to an i8* to match the intrinsic's signature.
Bill Wendling [Wed, 28 Sep 2011 03:47:11 +0000 (03:47 +0000)]
Bitcast the alloca to an i8* to match the intrinsic's signature.

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

13 years agoCreate and use an llvm.eh.sjlj.functioncontext intrinsic.
Bill Wendling [Wed, 28 Sep 2011 03:36:43 +0000 (03:36 +0000)]
Create and use an llvm.eh.sjlj.functioncontext intrinsic.

This intrinsic is used to pass the index of the function context to the back-end
for further processing. The back-end is in charge of filling in the rest of the
entries.

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

13 years agoIn the new EH model, setup the function context and the call site info.
Bill Wendling [Wed, 28 Sep 2011 03:14:05 +0000 (03:14 +0000)]
In the new EH model, setup the function context and the call site info.

The DWARF exception pass uses the call site information, which is set up here. A
pre-RA pass is too late for it to use this information. So create and setup the
function context here, and then insert the call site values here (and map the
call sites for the DWARF EH pass). This is simpler than the original pass, and
doesn't make the CFG lose its SSA-ness.

It's a win-win-win-win-lose-win-win situation.

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

13 years agoDon't conditionalize execution of the SjLj EH prepare pass.
Bill Wendling [Wed, 28 Sep 2011 03:07:34 +0000 (03:07 +0000)]
Don't conditionalize execution of the SjLj EH prepare pass.

We may need an SjLj EH preparation pass for some call site information, at least
in the short term.

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

13 years agoTest case for r140670: indvars should hoist sext.
Andrew Trick [Wed, 28 Sep 2011 02:13:32 +0000 (02:13 +0000)]
Test case for r140670: indvars should hoist sext.

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

13 years agoindvars should hoist [sz]ext because licm is not rerun.
Andrew Trick [Wed, 28 Sep 2011 01:35:36 +0000 (01:35 +0000)]
indvars should hoist [sz]ext because licm is not rerun.

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

13 years agoPR10628: Fix getModRefInfo so it queries the underlying alias() implementation correc...
Eli Friedman [Wed, 28 Sep 2011 00:34:27 +0000 (00:34 +0000)]
PR10628: Fix getModRefInfo so it queries the underlying alias() implementation correctly while checking nocapture calls.

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

13 years agoRename class and clean up source.
Jakob Stoklund Olesen [Wed, 28 Sep 2011 00:01:56 +0000 (00:01 +0000)]
Rename class and clean up source.

No functional change intended.

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

13 years agoRename SSEDomainFix -> lib/CodeGen/ExecutionDepsFix.
Jakob Stoklund Olesen [Wed, 28 Sep 2011 00:01:54 +0000 (00:01 +0000)]
Rename SSEDomainFix -> lib/CodeGen/ExecutionDepsFix.

I'll clean up the source in the next commit.

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

13 years agoRemove MipsFPRound. Mips1 is no longer supported.
Akira Hatanaka [Tue, 27 Sep 2011 23:55:37 +0000 (23:55 +0000)]
Remove MipsFPRound. Mips1 is no longer supported.

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

13 years agoRemove X86-dependent stuff from SSEDomainFix.
Jakob Stoklund Olesen [Tue, 27 Sep 2011 23:50:46 +0000 (23:50 +0000)]
Remove X86-dependent stuff from SSEDomainFix.

This also enables domain swizzling for AVX code which required a few
trivial test changes.

The pass will be moved to lib/CodeGen shortly.

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

13 years agoUnbreak CMake build.
Ted Kremenek [Tue, 27 Sep 2011 23:29:59 +0000 (23:29 +0000)]
Unbreak CMake build.

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

13 years agoImplement TII::get/setExecutionDomain() for ARM.
Jakob Stoklund Olesen [Tue, 27 Sep 2011 22:57:21 +0000 (22:57 +0000)]
Implement TII::get/setExecutionDomain() for ARM.

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

13 years agoPromote the X86 Get/SetSSEDomain functions to TargetInstrInfo.
Jakob Stoklund Olesen [Tue, 27 Sep 2011 22:57:18 +0000 (22:57 +0000)]
Promote the X86 Get/SetSSEDomain functions to TargetInstrInfo.

I am going to unify the SSEDomainFix and NEONMoveFix passes into a
single target independent pass.  They are essentially doing the same
thing.

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

13 years agoARM Thumb2 asm parsing [SU]XT[BH] without rotate but with .w.
Jim Grosbach [Tue, 27 Sep 2011 22:18:54 +0000 (22:18 +0000)]
ARM Thumb2 asm parsing [SU]XT[BH] without rotate but with .w.

Add inst alias to handle these assembly forms. Add tests, too.

rdar://10178799

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

13 years agoThis is the start of the new SjLj EH preparation pass, which will replace the
Bill Wendling [Tue, 27 Sep 2011 22:14:12 +0000 (22:14 +0000)]
This is the start of the new SjLj EH preparation pass, which will replace the
current IR-level pass.

The old SjLj EH pass has some problems, especially with the new EH model. Most
significantly, it violates some of the new restrictions the new model has. For
instance, the 'dispatch' table wants to jump to the landing pad, but we cannot
allow that because only an invoke's unwind edge can jump to a landing pad. This
requires us to mangle the code something awful. In addition, we need to keep the
now dead landingpad instructions around instead of CSE'ing them because the
DWARF emitter uses that information (they are dead because no control flow edge
will execute them - the control flow edge from an invoke's unwind is superceded
by the edge coming from the dispatch).

Basically, this pass belongs not at the IR level where SSA is king, but at the
code-gen level, where we have more flexibility.

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

13 years agoEmbed patterns in definitions of MFC1 and MTC1 instead of defining them outside
Akira Hatanaka [Tue, 27 Sep 2011 22:01:01 +0000 (22:01 +0000)]
Embed patterns in definitions of MFC1 and MTC1 instead of defining them outside
of the instruction definitions using Pat<>.

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

13 years agoRemove an invalid assert that is really just asserting when the scheduler emits
Cameron Zwarich [Tue, 27 Sep 2011 21:59:16 +0000 (21:59 +0000)]
Remove an invalid assert that is really just asserting when the scheduler emits
a suboptimal schedule.

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

13 years agotest/CMakeLists.txt: Depend on llvm-objdump. "make check" is expected to resolve...
NAKAMURA Takumi [Tue, 27 Sep 2011 21:54:50 +0000 (21:54 +0000)]
test/CMakeLists.txt: Depend on llvm-objdump. "make check" is expected to resolve test-dependent targets on CMake build.

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

13 years agoRename AddSelectionDAGCSEId() to addSelectionDAGCSEId().
Jim Grosbach [Tue, 27 Sep 2011 20:59:33 +0000 (20:59 +0000)]
Rename AddSelectionDAGCSEId() to addSelectionDAGCSEId().

Naming conventions consistency. No functional change.

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

13 years agoStop emitting instructions with the name "tmp" they eat up memory and have to be...
Benjamin Kramer [Tue, 27 Sep 2011 20:39:19 +0000 (20:39 +0000)]
Stop emitting instructions with the name "tmp" they eat up memory and have to be uniqued, without any benefit.

If someone prefers %tmp42 to %42, run instnamer.

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

13 years agoRemove incorrect passage.
Bill Wendling [Tue, 27 Sep 2011 20:16:57 +0000 (20:16 +0000)]
Remove incorrect passage.

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

13 years agoThese symbols appear to be visible by SearchForAddressOfSymbol and no longer
Chad Rosier [Tue, 27 Sep 2011 20:01:41 +0000 (20:01 +0000)]
These symbols appear to be visible by SearchForAddressOfSymbol and no longer
require special case handling.
rdar://10117377

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

13 years agoAdd binary archive support to llvm-nm.
Michael J. Spencer [Tue, 27 Sep 2011 19:37:18 +0000 (19:37 +0000)]
Add binary archive support to llvm-nm.

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

13 years agoObject: Add archive support.
Michael J. Spencer [Tue, 27 Sep 2011 19:36:55 +0000 (19:36 +0000)]
Object: Add archive support.

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

13 years agoCheck that catch clauses have pointer type.
Duncan Sands [Tue, 27 Sep 2011 19:34:22 +0000 (19:34 +0000)]
Check that catch clauses have pointer type.

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

13 years agoPTX: Fix case where printed alignment could be 0
Justin Holewinski [Tue, 27 Sep 2011 19:25:49 +0000 (19:25 +0000)]
PTX: Fix case where printed alignment could be 0

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

13 years agoUnbreak tests.
Michael J. Spencer [Tue, 27 Sep 2011 19:06:37 +0000 (19:06 +0000)]
Unbreak tests.

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

13 years agoAdd FCA to the lexicon.
Bill Wendling [Tue, 27 Sep 2011 18:44:01 +0000 (18:44 +0000)]
Add FCA to the lexicon.

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

13 years agoPTX: Use external symbols to keep track of params and locals. This also fixes
Justin Holewinski [Tue, 27 Sep 2011 18:12:55 +0000 (18:12 +0000)]
PTX: Use external symbols to keep track of params and locals. This also fixes
a couple of outstanding issues with frame objects occuring as instruction
operands.

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

13 years agoUse existing function.
Jakob Stoklund Olesen [Tue, 27 Sep 2011 17:55:08 +0000 (17:55 +0000)]
Use existing function.

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

13 years agoFix function MipsRegisterInfo::getRegisterNumbering.
Akira Hatanaka [Tue, 27 Sep 2011 17:15:27 +0000 (17:15 +0000)]
Fix function MipsRegisterInfo::getRegisterNumbering.
Return numbers of 64-bit registers.

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

13 years agoDo not add the pass that restores $gp if target is Mips64.
Akira Hatanaka [Tue, 27 Sep 2011 16:58:43 +0000 (16:58 +0000)]
Do not add the pass that restores $gp if target is Mips64.

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