oota-llvm.git
14 years agoAvoid counting InlineAsm as a call - it prevents loop unrolling.
Jakob Stoklund Olesen [Wed, 26 May 2010 22:40:28 +0000 (22:40 +0000)]
Avoid counting InlineAsm as a call - it prevents loop unrolling.
PR7026
Patch by Pekka Jääskeläinen!

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

14 years agoFix Lint printing warnings multiple times. Remove the ErrorStr
Dan Gohman [Wed, 26 May 2010 22:28:53 +0000 (22:28 +0000)]
Fix Lint printing warnings multiple times. Remove the ErrorStr
option from lintModule, which was an artifact from being
based on Verifier code.

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

14 years agoAsmMatcher/X86: Mark _REV instructions as "code gen only", they aren't expected
Daniel Dunbar [Wed, 26 May 2010 22:21:28 +0000 (22:21 +0000)]
AsmMatcher/X86: Mark _REV instructions as "code gen only", they aren't expected
to be matched.

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

14 years agoReinstate checking of stackrestore, with checking for both Read
Dan Gohman [Wed, 26 May 2010 22:21:25 +0000 (22:21 +0000)]
Reinstate checking of stackrestore, with checking for both Read
and Write, and add a comment explaining this.

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

14 years agoCheck that inherited subregisters all have a direct SubRegIndex.
Jakob Stoklund Olesen [Wed, 26 May 2010 22:15:07 +0000 (22:15 +0000)]
Check that inherited subregisters all have a direct SubRegIndex.

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

14 years agoGive SubRegIndex names to all ARM subregisters. This will be required by
Jakob Stoklund Olesen [Wed, 26 May 2010 22:15:03 +0000 (22:15 +0000)]
Give SubRegIndex names to all ARM subregisters. This will be required by
TableGen shortly.

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

14 years agoStackrestore is not a load.
Dan Gohman [Wed, 26 May 2010 22:00:10 +0000 (22:00 +0000)]
Stackrestore is not a load.

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

14 years agoFix a missing quote.
Dan Gohman [Wed, 26 May 2010 21:56:15 +0000 (21:56 +0000)]
Fix a missing quote.

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

14 years agoAdd FIXME comment to remove this.
Bill Wendling [Wed, 26 May 2010 21:53:50 +0000 (21:53 +0000)]
Add FIXME comment to remove this.

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

14 years agoRemove a TODO which isn't practical.
Dan Gohman [Wed, 26 May 2010 21:50:41 +0000 (21:50 +0000)]
Remove a TODO which isn't practical.

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

14 years agoMC: Add TargetMachine support for setting the value of MCRelaxAll with
Daniel Dunbar [Wed, 26 May 2010 21:48:55 +0000 (21:48 +0000)]
MC: Add TargetMachine support for setting the value of MCRelaxAll with
-filetype=obj.

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

14 years agoAdd StringRef::compare_numeric and use it to sort TableGen register records.
Jakob Stoklund Olesen [Wed, 26 May 2010 21:47:28 +0000 (21:47 +0000)]
Add StringRef::compare_numeric and use it to sort TableGen register records.

This means that our Registers are now ordered R7, R8, R9, R10, R12, ...
Not R1, R10, R11, R12, R2, R3, ...

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

14 years agoImplement checking of the tail keyword.
Dan Gohman [Wed, 26 May 2010 21:46:36 +0000 (21:46 +0000)]
Implement checking of the tail keyword.

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

14 years agoSuppress emmission of empty subreg/superreg/alias sets.
Jakob Stoklund Olesen [Wed, 26 May 2010 21:35:55 +0000 (21:35 +0000)]
Suppress emmission of empty subreg/superreg/alias sets.

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

14 years agoThere is no need to force an line number entry (using previous location) for a temp...
Devang Patel [Wed, 26 May 2010 21:23:46 +0000 (21:23 +0000)]
There is no need to force an line number entry (using previous location) for a temp label at unknown location.

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

14 years agoAdd "setjmp_syscall", "savectx", "qsetjmp", "vfork", "getcontext" to the list of
Bill Wendling [Wed, 26 May 2010 20:39:00 +0000 (20:39 +0000)]
Add "setjmp_syscall", "savectx", "qsetjmp", "vfork", "getcontext" to the list of
usual suspects that could "return twice".

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

14 years agoMC: When running with -mc-relax-all, we can eagerly relax instructions and avoid...
Daniel Dunbar [Wed, 26 May 2010 20:37:03 +0000 (20:37 +0000)]
MC: When running with -mc-relax-all, we can eagerly relax instructions and avoid creating unnecessary MCInstFragments.

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

14 years agoMC/Mach-O: Factor out EmitInstTo{Fragment,Data} for emitting MCInst's as MCInstFragme...
Daniel Dunbar [Wed, 26 May 2010 20:37:00 +0000 (20:37 +0000)]
MC/Mach-O: Factor out EmitInstTo{Fragment,Data} for emitting MCInst's as MCInstFragments or appending onto an MCDataFragment.

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

14 years agoAdjust eh.sjlj.setjmp to properly have a chain and to have an opcode entry in
Jim Grosbach [Wed, 26 May 2010 20:22:18 +0000 (20:22 +0000)]
Adjust eh.sjlj.setjmp to properly have a chain and to have an opcode entry in
ISD::. No functional change.

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

14 years agoUpdate debug info when live-in reg is copied into a vreg.
Devang Patel [Wed, 26 May 2010 20:18:50 +0000 (20:18 +0000)]
Update debug info when live-in reg is copied into a vreg.

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

14 years agoFix the x86 move to/from segment register instructions.
Kevin Enderby [Wed, 26 May 2010 20:10:45 +0000 (20:10 +0000)]
Fix the x86 move to/from segment register instructions.

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

14 years agoMove the check for "calls setjmp" to SelectionDAGISel so that it can be used by
Bill Wendling [Wed, 26 May 2010 19:46:12 +0000 (19:46 +0000)]
Move the check for "calls setjmp" to SelectionDAGISel so that it can be used by
more than just the stack slot coloring algorithm.

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

14 years agoIdentify instructions, that needs a label to mark debug info entity, in advance....
Devang Patel [Wed, 26 May 2010 19:37:24 +0000 (19:37 +0000)]
Identify instructions, that needs a label to mark debug info entity, in advance. This simplifies beginScope().

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

14 years agoEliminate the use of PriorityQueue and just use a std::vector,
Dan Gohman [Wed, 26 May 2010 18:52:00 +0000 (18:52 +0000)]
Eliminate the use of PriorityQueue and just use a std::vector,
implementing pop with a linear search for a "best" element. The priority
queue was a neat idea, but in practice the comparison functions depend
on dynamic information.

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

14 years agoFix indentation.
Dan Gohman [Wed, 26 May 2010 18:37:48 +0000 (18:37 +0000)]
Fix indentation.

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

14 years agoDelete an unused function.
Dan Gohman [Wed, 26 May 2010 18:34:12 +0000 (18:34 +0000)]
Delete an unused function.

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

14 years agoMC: Change RelaxInstruction to only take the input and output instructions.
Daniel Dunbar [Wed, 26 May 2010 18:15:06 +0000 (18:15 +0000)]
MC: Change RelaxInstruction to only take the input and output instructions.

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

14 years agoFix a typo in a comment that Gabor noticed.
Dan Gohman [Wed, 26 May 2010 18:03:53 +0000 (18:03 +0000)]
Fix a typo in a comment that Gabor noticed.

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

14 years agoTestcase for 104624/104619/PR7191/8023512.
Dale Johannesen [Wed, 26 May 2010 17:55:45 +0000 (17:55 +0000)]
Testcase for 104624/104619/PR7191/8023512.
Reduced from one provided by Duncan Sands, thanks!

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

14 years agoMC: Eliminate an unnecessary copy.
Daniel Dunbar [Wed, 26 May 2010 17:50:16 +0000 (17:50 +0000)]
MC: Eliminate an unnecessary copy.

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

14 years agoMC: Simplify MayNeedRelaxation to not provide the fixups, so we can query it
Daniel Dunbar [Wed, 26 May 2010 17:45:29 +0000 (17:45 +0000)]
MC: Simplify MayNeedRelaxation to not provide the fixups, so we can query it
before encoding.

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

14 years agoRemove dead code.
Devang Patel [Wed, 26 May 2010 17:42:50 +0000 (17:42 +0000)]
Remove dead code.

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

14 years agoDo not construct location list backword!
Devang Patel [Wed, 26 May 2010 17:29:32 +0000 (17:29 +0000)]
Do not construct location list backword!

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

14 years agoReplace the SubRegSet tablegen class with a less error-prone mechanism.
Jakob Stoklund Olesen [Wed, 26 May 2010 17:27:12 +0000 (17:27 +0000)]
Replace the SubRegSet tablegen class with a less error-prone mechanism.

A Register with subregisters must also provide SubRegIndices for adressing the
subregisters. TableGen automatically inherits indices for sub-subregisters to
minimize typing.

CompositeIndices may be specified for the weirder cases such as the XMM sub_sd
index that returns the same register, and ARM NEON Q registers where both D
subregs have ssub_0 and ssub_1 sub-subregs.

It is now required that all subregisters are named by an index, and a future
patch will also require inherited subregisters to be named. This is necessary to
allow composite subregister indices to be reduced to a single index.

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

14 years agoAdd entry for llvm.eh.sjlj.longjmp. PR4999.
Jim Grosbach [Wed, 26 May 2010 16:21:41 +0000 (16:21 +0000)]
Add entry for llvm.eh.sjlj.longjmp. PR4999.

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

14 years agoMC: Eliminate MCAsmFixup, replace with MCFixup.
Daniel Dunbar [Wed, 26 May 2010 15:18:56 +0000 (15:18 +0000)]
MC: Eliminate MCAsmFixup, replace with MCFixup.

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

14 years agoMC: Simplify MCFixup and increase the available offset size.
Daniel Dunbar [Wed, 26 May 2010 15:18:40 +0000 (15:18 +0000)]
MC: Simplify MCFixup and increase the available offset size.

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

14 years agoMC: Use accessors for access to MCAsmFixup.
Daniel Dunbar [Wed, 26 May 2010 15:18:31 +0000 (15:18 +0000)]
MC: Use accessors for access to MCAsmFixup.

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

14 years agoMC: Change MCInst::dump_pretty to not include a trailing newline.
Daniel Dunbar [Wed, 26 May 2010 15:18:13 +0000 (15:18 +0000)]
MC: Change MCInst::dump_pretty to not include a trailing newline.

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

14 years agoKill unneeded SExt.
Benjamin Kramer [Wed, 26 May 2010 09:45:04 +0000 (09:45 +0000)]
Kill unneeded SExt.

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

14 years agoSRetReturnReg was set in LowerFormalArguments(). So only assert it here.
Zhongxing Xu [Wed, 26 May 2010 08:10:02 +0000 (08:10 +0000)]
SRetReturnReg was set in LowerFormalArguments(). So only assert it here.

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

14 years agoMC: Eliminate MCFragment vtable, which was unnecessary.
Daniel Dunbar [Wed, 26 May 2010 06:50:57 +0000 (06:50 +0000)]
MC: Eliminate MCFragment vtable, which was unnecessary.

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

14 years agoCoding style change (Adding 1 missing space.)
Shih-wei Liao [Wed, 26 May 2010 04:46:50 +0000 (04:46 +0000)]
Coding style change (Adding 1 missing space.)

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

14 years agoAdding the missing implementation for ARM::SBFX and ARM::UBFX.
Shih-wei Liao [Wed, 26 May 2010 03:21:39 +0000 (03:21 +0000)]
Adding the missing implementation for ARM::SBFX and ARM::UBFX.
Fixing http://llvm.org/bugs/show_bug.cgi?id=7225.

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

14 years agoTemporarily revert r104655 as it's breaking the bots.
Eric Christopher [Wed, 26 May 2010 01:59:55 +0000 (01:59 +0000)]
Temporarily revert r104655 as it's breaking the bots.

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

14 years agofix off by 1 (insn) error in eh.sjlj.setjmp thumb code sequence.
Jim Grosbach [Wed, 26 May 2010 01:22:21 +0000 (01:22 +0000)]
fix off by 1 (insn) error in eh.sjlj.setjmp thumb code sequence.

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

14 years agoRevert "Replace the SubRegSet tablegen class with a less error-prone mechanism."
Jakob Stoklund Olesen [Wed, 26 May 2010 01:21:14 +0000 (01:21 +0000)]
Revert "Replace the SubRegSet tablegen class with a less error-prone mechanism."

This reverts commit 104654.

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

14 years agoChange push_all to a non-virtual function and implement it in the
Dan Gohman [Wed, 26 May 2010 01:10:55 +0000 (01:10 +0000)]
Change push_all to a non-virtual function and implement it in the
base class, since all the implementations are the same.

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

14 years agoDelete an unused function.
Dan Gohman [Wed, 26 May 2010 00:56:27 +0000 (00:56 +0000)]
Delete an unused function.

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

14 years agoTrim #include.
Dan Gohman [Wed, 26 May 2010 00:55:59 +0000 (00:55 +0000)]
Trim #include.

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

14 years agoDale and Evan suggested putting the "check for setjmp" much earlier in the
Bill Wendling [Wed, 26 May 2010 00:32:40 +0000 (00:32 +0000)]
Dale and Evan suggested putting the "check for setjmp" much earlier in the
machine code generation. That's a good idea, so I made it so.

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

14 years agoReplace the SubRegSet tablegen class with a less error-prone mechanism.
Jakob Stoklund Olesen [Wed, 26 May 2010 00:28:19 +0000 (00:28 +0000)]
Replace the SubRegSet tablegen class with a less error-prone mechanism.

A Register with subregisters must also provide SubRegIndices for adressing the
subregisters. TableGen automatically inherits indices for sub-subregisters to
minimize typing.

CompositeIndices may be specified for the weirder cases such as the XMM sub_sd
index that returns the same register, and ARM NEON Q registers where both D
subregs have ssub_0 and ssub_1 sub-subregs.

It is now required that all subregisters are named by an index, and a future
patch will also require inherited subregisters to be named. This is necessary to
allow composite subregister indices to be reduced to a single index.

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

14 years agoAdding the missing implementation of Bitfield's "clear" and "insert".
Shih-wei Liao [Wed, 26 May 2010 00:25:05 +0000 (00:25 +0000)]
Adding the missing implementation of Bitfield's "clear" and "insert".
Fixing http://llvm.org/bugs/show_bug.cgi?id=7222.

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

14 years agoTo handle s* registers in emitVFPLoadStoreMultipleInstruction().
Shih-wei Liao [Wed, 26 May 2010 00:02:28 +0000 (00:02 +0000)]
To handle s* registers in emitVFPLoadStoreMultipleInstruction().
Fixing http://llvm.org/bugs/show_bug.cgi?id=7221.

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

14 years agoStart adding mach-o tls reloc support.
Eric Christopher [Wed, 26 May 2010 00:02:12 +0000 (00:02 +0000)]
Start adding mach-o tls reloc support.

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

14 years agoDrop the SuperregHashTable. It is essentially the same as SubregHashTable.
Jakob Stoklund Olesen [Tue, 25 May 2010 23:43:18 +0000 (23:43 +0000)]
Drop the SuperregHashTable. It is essentially the same as SubregHashTable.

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

14 years agoFirst cut at supporting .debug_loc section.
Devang Patel [Tue, 25 May 2010 23:40:22 +0000 (23:40 +0000)]
First cut at supporting .debug_loc section.
This is used to track variable information.

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

14 years agoProperly promote operands when optimizing a single-character memcmp.
Benjamin Kramer [Tue, 25 May 2010 22:53:43 +0000 (22:53 +0000)]
Properly promote operands when optimizing a single-character memcmp.

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

14 years agoConstify function.
Bill Wendling [Tue, 25 May 2010 22:02:22 +0000 (22:02 +0000)]
Constify function.

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

14 years agoDo one map lookup instead of two.
Dan Gohman [Tue, 25 May 2010 21:59:42 +0000 (21:59 +0000)]
Do one map lookup instead of two.

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

14 years agoFix a missing newline in debug output.
Dan Gohman [Tue, 25 May 2010 21:50:35 +0000 (21:50 +0000)]
Fix a missing newline in debug output.

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

14 years agoMove the verbose asm output up a bit so it can be used in the special cases
Eric Christopher [Tue, 25 May 2010 21:49:43 +0000 (21:49 +0000)]
Move the verbose asm output up a bit so it can be used in the special cases
as well.

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

14 years agoOkay, bear with me here...
Bill Wendling [Tue, 25 May 2010 21:44:26 +0000 (21:44 +0000)]
Okay, bear with me here...

If you have a setjmp/longjmp situation, it's possible for stack slot coloring to
reuse a stack slot before it's really dead. For instance, if we have something
like this:

1:  y = g;
    x = sigsetjmp(env, 0);
    switch (x) {
    case 1:
      /* ... */
      goto run;
    case 0:
  run:
      do_run(); /* marked as "no return" */
      break;
    case 3:
      if (...) {
        /* ... */
        goto run;
      }
      /* ... */
      break;
    }

2:  g = y;

"y" may be put onto the stack, so the expression "g = y" is relying upon the
fact that the stack slot containing "y" isn't modified between (1) and (2). But
it can be, because of the "no return" calls in there. A longjmp might come back
with 3, modify the stack slot, and then go to case 0. And it's perfectly
acceptable to reuse the stack slot there because there's no CFG flow from case 3
to (2).

The fix is to disable certain optimizations in these situations. Ideally, we'd
disable them for all "returns twice" functions. But we don't support that
attribute. Check for "setjmp" and "sigsetjmp" instead.

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

14 years agoAdd support for initialized global data for darwin tls. Update comments
Eric Christopher [Tue, 25 May 2010 21:28:50 +0000 (21:28 +0000)]
Add support for initialized global data for darwin tls.  Update comments
and testcases accordingly.

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

14 years agoChanged the encoding of X86 floating point stack operations where both operands
Kevin Enderby [Tue, 25 May 2010 20:52:34 +0000 (20:52 +0000)]
Changed the encoding of X86 floating point stack operations where both operands
are st(0).  These can be encoded using an opcode for storing in st(0) or using
an opcode for storing in st(i), where i can also be 0.  To allow testing with
the darwin assembler and get a matching binary the opcode for storing in st(0)
is now used.  To do this the same logical trick is use from the darwin assembler
in converting things like this:

fmul %st(0), %st

into this:

fmul %st(0)

by looking for the second operand being X86::ST0 for specific floating point
mnemonics then removing the second X86::ST0 operand.  This also has the add
benefit to allow things like:

fmul %st(1), %st

that llvm-mc did not assemble.

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

14 years agoRemoving test; Chris thinks it's better to have the
Dale Johannesen [Tue, 25 May 2010 20:40:10 +0000 (20:40 +0000)]
Removing test; Chris thinks it's better to have the
bug go untested than have a testcase this large.  So be it.

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

14 years agoSeparate unrelated cases that once shared a numeric value
Jakob Stoklund Olesen [Tue, 25 May 2010 19:49:40 +0000 (19:49 +0000)]
Separate unrelated cases that once shared a numeric value

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

14 years agoPrint symbolic SubRegIndex names on machine operands.
Jakob Stoklund Olesen [Tue, 25 May 2010 19:49:38 +0000 (19:49 +0000)]
Print symbolic SubRegIndex names on machine operands.

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

14 years agoRemove NumberHack entirely.
Jakob Stoklund Olesen [Tue, 25 May 2010 19:49:33 +0000 (19:49 +0000)]
Remove NumberHack entirely.

SubRegIndex instances are now numbered uniquely the same way Register instances
are - in lexicographical order by name.

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

14 years agoMC/X86: Add a hack to allow recognizing 'cmpltps' and friends.
Daniel Dunbar [Tue, 25 May 2010 19:49:32 +0000 (19:49 +0000)]
MC/X86: Add a hack to allow recognizing 'cmpltps' and friends.

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

14 years agoFix another variant of PR 7191. Also add a testcase
Dale Johannesen [Tue, 25 May 2010 18:47:23 +0000 (18:47 +0000)]
Fix another variant of PR 7191.  Also add a testcase
Mon Ping provided; unfortunately bugpoint failed to
reduce it, but I think it's important to have a test for
this in the suite.  8023512.

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

14 years agoMC/X86: Define explicit immediate forms of cmp{ss,sd,ps,pd}.
Daniel Dunbar [Tue, 25 May 2010 18:40:53 +0000 (18:40 +0000)]
MC/X86: Define explicit immediate forms of cmp{ss,sd,ps,pd}.

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

14 years agoThe BT64ri8 record in X86Instr64bit.td was missing a REX_W which is required
Kevin Enderby [Tue, 25 May 2010 18:16:58 +0000 (18:16 +0000)]
The BT64ri8 record in X86Instr64bit.td was missing a REX_W which is required
for the 64-bit version of the Bit Test instruction.

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

14 years agoFix PR 7191. I have been unable to create a .ll file that fails, sorry.
Dale Johannesen [Tue, 25 May 2010 17:50:03 +0000 (17:50 +0000)]
Fix PR 7191.  I have been unable to create a .ll file that fails, sorry.
(oye, a word which should be better known to people writing tree
traversals, means grandchild.)

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

14 years agoMake sure aeskeygenassist uses an unsigned immediate field.
Eric Christopher [Tue, 25 May 2010 17:33:22 +0000 (17:33 +0000)]
Make sure aeskeygenassist uses an unsigned immediate field.

Fixes rdar://8017638

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

14 years agoIgnore NumberHack and give each SubRegIndex instance a unique enum value instead.
Jakob Stoklund Olesen [Tue, 25 May 2010 17:21:04 +0000 (17:21 +0000)]
Ignore NumberHack and give each SubRegIndex instance a unique enum value instead.

This passes lit tests, but I'll give it a go through the buildbots to smoke out
any remaining places that depend on the old SubRegIndex numbering.

Then I'll remove NumberHack entirely.

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

14 years agoUse enums instead of literals for SystemZ subregisters
Jakob Stoklund Olesen [Tue, 25 May 2010 17:04:18 +0000 (17:04 +0000)]
Use enums instead of literals for SystemZ subregisters

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

14 years agoUse enums instead of literals for X86 subregisters.
Jakob Stoklund Olesen [Tue, 25 May 2010 17:04:16 +0000 (17:04 +0000)]
Use enums instead of literals for X86 subregisters.

The cases in getMatchingSuperRegClass cannot be broken up until the enums have
unique values.

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

14 years agoAdd missing implementation to the materialization of VFP misc. instructions (vmrs...
Zonr Chang [Tue, 25 May 2010 10:23:52 +0000 (10:23 +0000)]
Add missing implementation to the materialization of VFP misc. instructions (vmrs, vmsr and vmov (immediate))

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

14 years agoAdd support to MOVimm32 using movt/movw for ARM JIT
Zonr Chang [Tue, 25 May 2010 08:42:45 +0000 (08:42 +0000)]
Add support to MOVimm32 using movt/movw for ARM JIT

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

14 years agoAllow t2MOVsrl_flag and t2MOVsra_flag instructions to be predicated.
Bob Wilson [Tue, 25 May 2010 04:51:47 +0000 (04:51 +0000)]
Allow t2MOVsrl_flag and t2MOVsra_flag instructions to be predicated.
I don't know of any particular reason why that would be important, but
neither can I see any reason to disallow it.

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

14 years agoFix up instruction classes for Thumb2 RSB instructions to be consistent with
Bob Wilson [Tue, 25 May 2010 04:43:08 +0000 (04:43 +0000)]
Fix up instruction classes for Thumb2 RSB instructions to be consistent with
Thumb2 ADD and SUB instructions: allow RSB instructions be changed to set the
condition codes, and allow RSBS instructions to be predicated.

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

14 years agoClean up indentation.
Bob Wilson [Tue, 25 May 2010 03:36:52 +0000 (03:36 +0000)]
Clean up indentation.

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

14 years agoDisable invalid coalescer assertion.
Jakob Stoklund Olesen [Tue, 25 May 2010 00:15:18 +0000 (00:15 +0000)]
Disable invalid coalescer assertion.

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

14 years agoUse enums instead of literals in the ARM backend.
Jakob Stoklund Olesen [Tue, 25 May 2010 00:15:15 +0000 (00:15 +0000)]
Use enums instead of literals in the ARM backend.

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

14 years agoPrint out the name of the function during SSC.
Bill Wendling [Mon, 24 May 2010 23:16:04 +0000 (23:16 +0000)]
Print out the name of the function during SSC.

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

14 years agoSwitch SubRegSet to using symbolic SubRegIndices
Jakob Stoklund Olesen [Mon, 24 May 2010 23:03:18 +0000 (23:03 +0000)]
Switch SubRegSet to using symbolic SubRegIndices

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

14 years agoAllow Thumb2 MVN instructions to set condition codes. The immediate operand
Bob Wilson [Mon, 24 May 2010 22:41:19 +0000 (22:41 +0000)]
Allow Thumb2 MVN instructions to set condition codes.  The immediate operand
version of t2MVN already allowed that, but not the register versions.

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

14 years agodiaggroup categories should take precedence over diag-specific groups.
Chris Lattner [Mon, 24 May 2010 21:55:47 +0000 (21:55 +0000)]
diaggroup categories should take precedence over diag-specific groups.

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

14 years agoLose the dummies
Jakob Stoklund Olesen [Mon, 24 May 2010 21:47:01 +0000 (21:47 +0000)]
Lose the dummies

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

14 years agoReplace the tablegen RegisterClass field SubRegClassList with an alist-like data
Jakob Stoklund Olesen [Mon, 24 May 2010 21:46:58 +0000 (21:46 +0000)]
Replace the tablegen RegisterClass field SubRegClassList with an alist-like data
structure that represents a mapping without any dependencies on SubRegIndex
numbering.

This brings us closer to being able to remove the explicit SubRegIndex
numbering, and it is now possible to specify any mapping without inventing
*_INVALID register classes.

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

14 years agoAvoid adding duplicate function live-in's.
Evan Cheng [Mon, 24 May 2010 21:33:37 +0000 (21:33 +0000)]
Avoid adding duplicate function live-in's.

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

14 years agoFix an mmx movd encoding.
Dan Gohman [Mon, 24 May 2010 20:51:08 +0000 (20:51 +0000)]
Fix an mmx movd encoding.

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

14 years agoMC/X86: Add aliases for CMOVcc variants.
Kevin Enderby [Mon, 24 May 2010 20:32:23 +0000 (20:32 +0000)]
MC/X86: Add aliases for CMOVcc variants.

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

14 years agoClean up some extra whitespace.
Bob Wilson [Mon, 24 May 2010 20:08:34 +0000 (20:08 +0000)]
Clean up some extra whitespace.

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

14 years agoThumb2 RSBS instructions were being printed without the 'S' suffix.
Bob Wilson [Mon, 24 May 2010 18:44:06 +0000 (18:44 +0000)]
Thumb2 RSBS instructions were being printed without the 'S' suffix.
Fix it by changing the T2I_rbin_s_is multiclass to handle the CPSR
output and 'S' suffix in the same way as T2I_bin_s_irs.

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

14 years agoDo not emit line number entries for unknown debug values.
Devang Patel [Mon, 24 May 2010 18:26:49 +0000 (18:26 +0000)]
Do not emit line number entries for unknown debug values.
This fixes recent regression in store.exp from gdb testsuite.

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

14 years agoLR is in GPR, not tGPR even in Thumb1 mode.
Evan Cheng [Mon, 24 May 2010 18:00:18 +0000 (18:00 +0000)]
LR is in GPR, not tGPR even in Thumb1 mode.

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

14 years agoAdd SubRegIndex defs to PowerPC. It looks like the CR subregister indices are
Jakob Stoklund Olesen [Mon, 24 May 2010 17:55:38 +0000 (17:55 +0000)]
Add SubRegIndex defs to PowerPC. It looks like the CR subregister indices are
never used.

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

14 years agoUse SubRegIndex in SystemZ.
Jakob Stoklund Olesen [Mon, 24 May 2010 17:43:01 +0000 (17:43 +0000)]
Use SubRegIndex in SystemZ.

Anton, please review the change to SystemZAsmPrinter.cpp. It could be a bug.

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