oota-llvm.git
13 years agoPut GCOVFile and other related interface in a common header so that llvm-cov tool...
Devang Patel [Tue, 4 Oct 2011 17:24:48 +0000 (17:24 +0000)]
Put GCOVFile and other related interface in a common header so that llvm-cov tool can share it with GCOV writer.

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

13 years agoUnbreak MSVC build.
Francois Pichet [Tue, 4 Oct 2011 16:28:07 +0000 (16:28 +0000)]
Unbreak MSVC build.

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

13 years agoFix PR9833/PR11054 (patch provided by Patrik Hägglund)
David Dean [Tue, 4 Oct 2011 16:26:41 +0000 (16:26 +0000)]
Fix PR9833/PR11054 (patch provided by Patrik Hägglund)

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

13 years agoTeach TableGen to infer missing register classes.
Jakob Stoklund Olesen [Tue, 4 Oct 2011 15:28:49 +0000 (15:28 +0000)]
Teach TableGen to infer missing register classes.

The set of register classes should be closed under sub-register
operations and intersections. That will allow the register allocator to
model combinations of constraints accurately.

This patch implements the easiest form of register class inference:  For
every register class, and for every sub-register SubIdx, the subset of
registers in RC that have a SubIdx sub-register should also be a register
class.

This does create some new register classes for the targets in the tree:

ARM gets a new QQQQPR_with_ssub_0.  This class was omitted from the .td
file on purpose because it only has two registers.  InstrEmitter and
RegisterCoalescer have safeguards against selecting too small register
classes, so it is harmless.

PowerPC gets a G8RC_with_sub_32 class because LR is not a sub_32
sub-register of LR8.  I think that might be an omission?

X86 puts RIP in the GR64 class, and since that register doesn't have
8-bit sub-registers, we get:

  GR64_with_sub_8bit
  GR64_TC_with_sub_8bit
  GR64_NOREX_with_sub_8bit
  GR64_TC_with_sub_8bit_hi

The various CodeGen classes have already been fixed so adding new
register classes should not affect compile time.

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

13 years agoTeach PPCInstrInfo to handle sub-classes.
Jakob Stoklund Olesen [Tue, 4 Oct 2011 15:28:47 +0000 (15:28 +0000)]
Teach PPCInstrInfo to handle sub-classes.

This has already been done for most other targets.

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

13 years agoTableGen: Store all allocation orders together.
Jakob Stoklund Olesen [Tue, 4 Oct 2011 15:28:44 +0000 (15:28 +0000)]
TableGen: Store all allocation orders together.

There is no need to keep the primary order separate.

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

13 years agoTableGen: Privatize CodeGenRegisterClass::TheDef and Name.
Jakob Stoklund Olesen [Tue, 4 Oct 2011 15:28:08 +0000 (15:28 +0000)]
TableGen: Privatize CodeGenRegisterClass::TheDef and Name.

When TableGen starts creating its own register classes, the synthesized
classes won't have a Record reference.  All register classes must have a
name, though.

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

13 years agoTableGen: Don't add synthetic Records to the RecordKeeper.
Jakob Stoklund Olesen [Tue, 4 Oct 2011 15:27:53 +0000 (15:27 +0000)]
TableGen: Don't add synthetic Records to the RecordKeeper.

The RecordKeeper could be shared by multiple target instances, causing
duplicate record errors.

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

13 years agotblgen: add preprocessor as a separate mode
Che-Liang Chiou [Tue, 4 Oct 2011 15:14:51 +0000 (15:14 +0000)]
tblgen: add preprocessor as a separate mode

This patch adds a preprocessor that can expand nested for-loops for
saving some copy-n-paste in *.td files.

The preprocessor is not yet integrated with TGParser, and so it has
no direct effect on *.td inputs.  However, you may preprocess an td
input (and only preprocess it).

To test the proprecessor, type:
  tblgen -E -o $@ $<

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

13 years agoSet operation actions to legal types only.
Nadav Rotem [Tue, 4 Oct 2011 12:05:35 +0000 (12:05 +0000)]
Set operation actions to legal types only.

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

13 years agoOperations should be custom lowered only if their type is legal.
Nadav Rotem [Tue, 4 Oct 2011 10:03:32 +0000 (10:03 +0000)]
Operations should be custom lowered only if their type is legal.

Test: CellSPU/v2i32.ll when running with -promote-elements

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

13 years agoThe product of two chrec's can always be represented as a chrec.
Nick Lewycky [Tue, 4 Oct 2011 06:51:26 +0000 (06:51 +0000)]
The product of two chrec's can always be represented as a chrec.

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

13 years agoAdd support in the disassembler for ignoring the L-bit on certain VEX instructions...
Craig Topper [Tue, 4 Oct 2011 06:30:42 +0000 (06:30 +0000)]
Add support in the disassembler for ignoring the L-bit on certain VEX instructions. Mark instructions that have this behavior. Fixes PR10676.

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

13 years agoLSR should avoid redundant edge splitting.
Andrew Trick [Tue, 4 Oct 2011 03:50:44 +0000 (03:50 +0000)]
LSR should avoid redundant edge splitting.

This handles the case in which LSR rewrites an IV user that is a phi and
splits critical edges originating from a switch.
Fixes <rdar://problem/6453893> LSR is not splitting edges "nicely"

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

13 years agowhitespace
Andrew Trick [Tue, 4 Oct 2011 03:34:49 +0000 (03:34 +0000)]
whitespace

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

13 years agoRemove last references to hotpatch.
Rafael Espindola [Tue, 4 Oct 2011 03:08:43 +0000 (03:08 +0000)]
Remove last references to hotpatch.

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

13 years agoExclude libLLVMTableGen.a from the shared library
Peter Collingbourne [Tue, 4 Oct 2011 00:30:34 +0000 (00:30 +0000)]
Exclude libLLVMTableGen.a from the shared library

Unbreaks tools for --enable-shared build.

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

13 years agoGeneric cleanup.
Bill Wendling [Tue, 4 Oct 2011 00:16:40 +0000 (00:16 +0000)]
Generic cleanup.

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

13 years agoUnit test for r140919, loop unroll heuristics.
Andrew Trick [Tue, 4 Oct 2011 00:07:02 +0000 (00:07 +0000)]
Unit test for r140919, loop unroll heuristics.

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

13 years agoTidy up. These tests are covered in the .s file tests now.
Jim Grosbach [Mon, 3 Oct 2011 23:40:13 +0000 (23:40 +0000)]
Tidy up. These tests are covered in the .s file tests now.

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

13 years agoARM assembly parsing and encoding for VMOV immediate.
Jim Grosbach [Mon, 3 Oct 2011 23:38:36 +0000 (23:38 +0000)]
ARM assembly parsing and encoding for VMOV immediate.

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

13 years agoTidy up. 80 columns.
Jim Grosbach [Mon, 3 Oct 2011 23:03:26 +0000 (23:03 +0000)]
Tidy up. 80 columns.

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

13 years agoUse the PC label ID rather than '1'. Add support for thumb-2, because I heard that...
Bill Wendling [Mon, 3 Oct 2011 22:44:15 +0000 (22:44 +0000)]
Use the PC label ID rather than '1'. Add support for thumb-2, because I heard that some people use it.

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

13 years agoDon't carry over the dispatchsetup hack from the old system.
Bill Wendling [Mon, 3 Oct 2011 22:42:40 +0000 (22:42 +0000)]
Don't carry over the dispatchsetup hack from the old system.

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

13 years agoARM parsing/encoding for VCMP/VCMPE.
Jim Grosbach [Mon, 3 Oct 2011 22:30:24 +0000 (22:30 +0000)]
ARM parsing/encoding for VCMP/VCMPE.

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

13 years agoFix typo in comments.
Nick Lewycky [Mon, 3 Oct 2011 21:30:08 +0000 (21:30 +0000)]
Fix typo in comments.

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

13 years agoCheck-pointing the new SjLj EH lowering.
Bill Wendling [Mon, 3 Oct 2011 21:25:38 +0000 (21:25 +0000)]
Check-pointing the new SjLj EH lowering.

This code will replace the version in ARMAsmPrinter.cpp. It creates a new
machine basic block, which is the dispatch for the return from a longjmp
call. It then shoves the address of that machine basic block into the correct
place in the function context so that the EH runtime will jump to it directly
instead of having to go through a compare-and-jump-to-the-dispatch bit. This
should be more efficient in the common case.

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

13 years agoMove CHECK after entry label.
Akira Hatanaka [Mon, 3 Oct 2011 21:24:30 +0000 (21:24 +0000)]
Move CHECK after entry label.

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

13 years agoAdd support for 64-bit logical NOR.
Akira Hatanaka [Mon, 3 Oct 2011 21:23:18 +0000 (21:23 +0000)]
Add support for 64-bit logical NOR.

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

13 years agoAdd support for 64-bit count leading ones and zeros instructions.
Akira Hatanaka [Mon, 3 Oct 2011 21:16:50 +0000 (21:16 +0000)]
Add support for 64-bit count leading ones and zeros instructions.

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

13 years agoMove the grabbing of the jump buffer into the caller function, eliminating the need...
Bill Wendling [Mon, 3 Oct 2011 21:15:28 +0000 (21:15 +0000)]
Move the grabbing of the jump buffer into the caller function, eliminating the need for returning a std::pair.

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

13 years agoARM assembly parsing and encoding for VMRS/FMSTAT.
Jim Grosbach [Mon, 3 Oct 2011 21:12:43 +0000 (21:12 +0000)]
ARM assembly parsing and encoding for VMRS/FMSTAT.

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

13 years agoAdd support for 64-bit divide instructions.
Akira Hatanaka [Mon, 3 Oct 2011 21:06:13 +0000 (21:06 +0000)]
Add support for 64-bit divide instructions.

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

13 years agoAdd C api for Instruction->eraseFromParent().
Devang Patel [Mon, 3 Oct 2011 20:59:18 +0000 (20:59 +0000)]
Add C api for Instruction->eraseFromParent().

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

13 years agoUpdate test for 141010.
Jim Grosbach [Mon, 3 Oct 2011 20:58:08 +0000 (20:58 +0000)]
Update test for 141010.

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

13 years agoThumb2 ADD/SUB can take SP as a destination register.
Jim Grosbach [Mon, 3 Oct 2011 20:51:59 +0000 (20:51 +0000)]
Thumb2 ADD/SUB can take SP as a destination register.

It's documented as a separate instruction to line up with the Thumb1
encodings, for which it really is a distinct instruction encoding.

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

13 years agoClean up MipsInstrInfo::copyPhysReg and handle copies from and to 64-bit integer
Akira Hatanaka [Mon, 3 Oct 2011 20:38:08 +0000 (20:38 +0000)]
Clean up MipsInstrInfo::copyPhysReg and handle copies from and to 64-bit integer
registers.

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

13 years agoAdd support for 64-bit integer multiply instructions.
Akira Hatanaka [Mon, 3 Oct 2011 20:01:11 +0000 (20:01 +0000)]
Add support for 64-bit integer multiply instructions.

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

13 years agoAdd definitions of instructions which move values between 64-bit integer
Akira Hatanaka [Mon, 3 Oct 2011 19:28:44 +0000 (19:28 +0000)]
Add definitions of instructions which move values between 64-bit integer
registers and 64-bit HI and LO registers. Fix encoding of the 32-bit versions
of the instructions.

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

13 years agoFind the strip tool that works with the specified SDKROOT. rdar://10165908
Bob Wilson [Mon, 3 Oct 2011 18:48:16 +0000 (18:48 +0000)]
Find the strip tool that works with the specified SDKROOT.  rdar://10165908

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

13 years agoTidy up a bit. Formatting.
Jim Grosbach [Mon, 3 Oct 2011 17:59:31 +0000 (17:59 +0000)]
Tidy up a bit. Formatting.

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

13 years agoAdd support for MOVBE and RDRAND instructions for the assembler and disassembler...
Craig Topper [Mon, 3 Oct 2011 17:28:23 +0000 (17:28 +0000)]
Add support for MOVBE and RDRAND instructions for the assembler and disassembler. Includes feature flag checking, but no instrinsic support. Fixes PR10832, PR11026 and PR11027.

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

13 years agoWhitespace.
Eric Christopher [Mon, 3 Oct 2011 15:49:20 +0000 (15:49 +0000)]
Whitespace.

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

13 years agoTypo.
Eric Christopher [Mon, 3 Oct 2011 15:49:16 +0000 (15:49 +0000)]
Typo.

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

13 years agoAdd the returns_twice attribute to LLVM.
Rafael Espindola [Mon, 3 Oct 2011 14:45:37 +0000 (14:45 +0000)]
Add the returns_twice attribute to LLVM.

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

13 years agoTreat VEX.vvvv as a 3-bit field outside of 64-bit mode. Prevents access to registers...
Craig Topper [Mon, 3 Oct 2011 08:14:29 +0000 (08:14 +0000)]
Treat VEX.vvvv as a 3-bit field outside of 64-bit mode. Prevents access to registers xmm8-xmm15 outside 64-bit mode.

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

13 years agoTest updates that were supposed to go with r140993.
Craig Topper [Mon, 3 Oct 2011 07:53:59 +0000 (07:53 +0000)]
Test updates that were supposed to go with r140993.

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

13 years agoFix VEX disassembling to ignore REX.RXBW bits in 32-bit mode.
Craig Topper [Mon, 3 Oct 2011 07:51:09 +0000 (07:51 +0000)]
Fix VEX disassembling to ignore REX.RXBW bits in 32-bit mode.

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

13 years agoReapply r140979 with fix! We never did get a testcase, but careful review of the
Nick Lewycky [Mon, 3 Oct 2011 07:10:45 +0000 (07:10 +0000)]
Reapply r140979 with fix! We never did get a testcase, but careful review of the
logic by David Meyer revealed this bug.

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

13 years agoattempt to fix ocaml bindings: landing pads
Torok Edwin [Mon, 3 Oct 2011 06:41:46 +0000 (06:41 +0000)]
attempt to fix ocaml bindings: landing pads

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

13 years agoRevert r140979 due to reports of bootstrap failure.
Nick Lewycky [Mon, 3 Oct 2011 05:14:59 +0000 (05:14 +0000)]
Revert r140979 due to reports of bootstrap failure.

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

13 years agoAdd one more case we compute a max trip count.
Nick Lewycky [Mon, 3 Oct 2011 01:03:57 +0000 (01:03 +0000)]
Add one more case we compute a max trip count.

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

13 years agoFix some Intel syntax disassembly issues with instructions that implicitly use AL...
Craig Topper [Sun, 2 Oct 2011 21:08:12 +0000 (21:08 +0000)]
Fix some Intel syntax disassembly issues with instructions that implicitly use AL/AX/EAX/RAX such as ADD/SUB/ADC/SUBB/XOR/OR/AND/CMP/MOV/TEST.

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

13 years agoSpecial case disassembler handling of REX.B prefix on NOP instruction to decode as...
Craig Topper [Sun, 2 Oct 2011 16:56:09 +0000 (16:56 +0000)]
Special case disassembler handling of REX.B prefix on NOP instruction to decode as XCHG R8D, EAX instead. Fixes PR10344.

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

13 years agoAdd a new icmp+select optz'n. Also shows off the load(cst) folding added in
Nick Lewycky [Sun, 2 Oct 2011 10:37:37 +0000 (10:37 +0000)]
Add a new icmp+select optz'n. Also shows off the load(cst) folding added in
r140966.

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

13 years agoEnhance a couple places where we were doing constant folding of instructions,
Nick Lewycky [Sun, 2 Oct 2011 09:12:55 +0000 (09:12 +0000)]
Enhance a couple places where we were doing constant folding of instructions,
but not load instructions. Noticed by inspection.

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

13 years agoFix typo in r140954.
Craig Topper [Sun, 2 Oct 2011 04:54:26 +0000 (04:54 +0000)]
Fix typo in r140954.

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

13 years agoMake canonicalization of ImmutableSetRef::asImmutableSet() semi-explicit.
Ted Kremenek [Sun, 2 Oct 2011 01:47:07 +0000 (01:47 +0000)]
Make canonicalization of ImmutableSetRef::asImmutableSet() semi-explicit.

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

13 years agoFix disassembling of INVEPT and INVVPID to take operands
Craig Topper [Sat, 1 Oct 2011 21:20:14 +0000 (21:20 +0000)]
Fix disassembling of INVEPT and INVVPID to take operands

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

13 years agoFix disassembler handling of CRC32 which is an odd instruction that uses 0xf2 as...
Craig Topper [Sat, 1 Oct 2011 19:54:56 +0000 (19:54 +0000)]
Fix disassembler handling of CRC32 which is an odd instruction that uses 0xf2 as an opcode extension and allows the opsize prefix. This necessitated adding IC_XD_OPSIZE and IC_64BIT_XD_OPSIZE contexts. Unfortunately, this increases the size of the disassembler tables. Fixes PR10702.

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

13 years agoRevert r140924 "Attempt to fix dynamic stack realignment for thumb1 functions."
Chad Rosier [Sat, 1 Oct 2011 19:30:36 +0000 (19:30 +0000)]
Revert r140924 "Attempt to fix dynamic stack realignment for thumb1 functions."
to appease nightly testers.  Not quite there yet.

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

13 years agoMoved type construction out of the loop and added an assert on the legality of the...
Nadav Rotem [Sat, 1 Oct 2011 18:39:28 +0000 (18:39 +0000)]
Moved type construction out of the loop and added an assert on the legality of the type. Formatted lines to the 80 char limit.

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

13 years agoMove TableGen's parser and entry point into a library
Peter Collingbourne [Sat, 1 Oct 2011 16:41:13 +0000 (16:41 +0000)]
Move TableGen's parser and entry point into a library

This is the first step towards splitting LLVM and Clang's tblgen executables.

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

13 years agoNo one should be using the method directly. Assert if they do.
Bill Wendling [Sat, 1 Oct 2011 12:47:34 +0000 (12:47 +0000)]
No one should be using the method directly. Assert if they do.

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

13 years agoAdd a convenience method to tell if two things are equal.
Bill Wendling [Sat, 1 Oct 2011 12:44:28 +0000 (12:44 +0000)]
Add a convenience method to tell if two things are equal.

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

13 years agoUse the ARMConstantPoolMBB class to handle the MBB values.
Bill Wendling [Sat, 1 Oct 2011 09:30:42 +0000 (09:30 +0000)]
Use the ARMConstantPoolMBB class to handle the MBB values.

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

13 years agoAdd ARMConstantPoolMBB to hold an MBB value in the constant pool.
Bill Wendling [Sat, 1 Oct 2011 09:19:10 +0000 (09:19 +0000)]
Add ARMConstantPoolMBB to hold an MBB value in the constant pool.

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

13 years agoRemove dead code.
Bill Wendling [Sat, 1 Oct 2011 09:05:12 +0000 (09:05 +0000)]
Remove dead code.

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

13 years agoRemove now dead methods and ivar.
Bill Wendling [Sat, 1 Oct 2011 09:04:18 +0000 (09:04 +0000)]
Remove now dead methods and ivar.

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

13 years agoUse the new ARMConstantPoolSymbol class to handle external symbols.
Bill Wendling [Sat, 1 Oct 2011 08:58:29 +0000 (08:58 +0000)]
Use the new ARMConstantPoolSymbol class to handle external symbols.

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

13 years agoAdd an ARMConstantPool class for external symbols. This will split out the support...
Bill Wendling [Sat, 1 Oct 2011 08:36:59 +0000 (08:36 +0000)]
Add an ARMConstantPool class for external symbols. This will split out the support for external symbols from the base class.

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

13 years agoRemove now dead methods and ivar from ARMConstantPoolValue.
Bill Wendling [Sat, 1 Oct 2011 08:02:05 +0000 (08:02 +0000)]
Remove now dead methods and ivar from ARMConstantPoolValue.

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

13 years agoSwitch over to using ARMConstantPoolConstant for global variables, functions,
Bill Wendling [Sat, 1 Oct 2011 08:00:54 +0000 (08:00 +0000)]
Switch over to using ARMConstantPoolConstant for global variables, functions,
and block addresses.

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

13 years agoSome more refactoring.
Bill Wendling [Sat, 1 Oct 2011 07:52:37 +0000 (07:52 +0000)]
Some more refactoring.

* Add a couple of Create methods to the ARMConstantPoolConstant class,
* Add its own version of getExistingMachineCPValue, and
* Modify hasSameValue to return false if the object isn't an ARMConstantPoolConstant.

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

13 years agoAdd a Create method that accepts 'kind' and 'pcadj' arguments.
Bill Wendling [Sat, 1 Oct 2011 06:44:24 +0000 (06:44 +0000)]
Add a Create method that accepts 'kind' and 'pcadj' arguments.

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

13 years agoRefactoring: Separate out the ARM constant pool Constant from the ARM constant
Bill Wendling [Sat, 1 Oct 2011 06:40:33 +0000 (06:40 +0000)]
Refactoring: Separate out the ARM constant pool Constant from the ARM constant
pool value.

It's not used right now, but will be soon.

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

13 years agoSubtarget getFeatureBits() returns a uint64_t, not unsigned.
Bob Wilson [Sat, 1 Oct 2011 02:47:54 +0000 (02:47 +0000)]
Subtarget getFeatureBits() returns a uint64_t, not unsigned.

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

13 years agoAttempt to fix dynamic stack realignment for thumb1 functions. It is in fact
Chad Rosier [Sat, 1 Oct 2011 02:03:18 +0000 (02:03 +0000)]
Attempt to fix dynamic stack realignment for thumb1 functions.  It is in fact
useful if an optimization assumes the stack has been realigned.  Credit to
Eli for his assistance.
rdar://10043857

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

13 years agoInlining and unrolling heuristics should be aware of free truncs.
Andrew Trick [Sat, 1 Oct 2011 01:39:05 +0000 (01:39 +0000)]
Inlining and unrolling heuristics should be aware of free truncs.

We want heuristics to be based on accurate data, but more importantly
we don't want llvm to behave randomly. A benign trunc inserted by an
upstream pass should not cause a wild swings in optimization
level. See PR11034. It's a general problem with threshold-based
heuristics, but we can make it less bad.

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

13 years agowhitespace
Andrew Trick [Sat, 1 Oct 2011 01:27:56 +0000 (01:27 +0000)]
whitespace

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

13 years agoAdd Windows x64 stack walking support. Patch by Aaron Ballman!
Michael J. Spencer [Sat, 1 Oct 2011 00:05:20 +0000 (00:05 +0000)]
Add Windows x64 stack walking support. Patch by Aaron Ballman!

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

13 years agoUse precomputed BitVector for CodeGenRegisterClass::hasSubClass().
Jakob Stoklund Olesen [Fri, 30 Sep 2011 23:47:05 +0000 (23:47 +0000)]
Use precomputed BitVector for CodeGenRegisterClass::hasSubClass().

All the sub-class bit vectors are computed when first creating the
register bank.

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

13 years agoFilecheck-ize.
Bill Wendling [Fri, 30 Sep 2011 23:40:29 +0000 (23:40 +0000)]
Filecheck-ize.

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

13 years agoAdd new line at end of file.
Bill Wendling [Fri, 30 Sep 2011 23:21:11 +0000 (23:21 +0000)]
Add new line at end of file.

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

13 years agoWhen inferring the pointer alignment, if the global doesn't have an initializer
Bill Wendling [Fri, 30 Sep 2011 23:19:55 +0000 (23:19 +0000)]
When inferring the pointer alignment, if the global doesn't have an initializer
and the alignment is 0 (i.e., it's defined globally in one file and declared in
another file) it could get an alignment which is larger than the ABI allows for
that type, resulting in aligned moves being used for unaligned loads.

For instance, in file A.c:

   struct S s;

In file B.c:
   struct {
     // something long
   };
   extern S s;

   void foo() {
     struct S p = s;
     // ...
   }

this copy is a 'memcpy' which is turned into a series of 'movaps' instructions
on X86. But this is wrong, because 'struct S' has alignment of 4, not 16.

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

13 years agoPromote comment to doxycomment. Adjust whitespace. No functionality change.
Nick Lewycky [Fri, 30 Sep 2011 22:19:53 +0000 (22:19 +0000)]
Promote comment to doxycomment. Adjust whitespace. No functionality change.

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

13 years agoStore sub-class lists as a bit vector.
Jakob Stoklund Olesen [Fri, 30 Sep 2011 22:19:07 +0000 (22:19 +0000)]
Store sub-class lists as a bit vector.

This uses less memory and it reduces the complexity of sub-class
operations:

- hasSubClassEq() and friends become O(1) instead of O(N).

- getCommonSubClass() becomes O(N) instead of O(N^2).

In the future, TableGen will infer register classes.  This makes it
cheap to add them.

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

13 years agoExtract a slightly more general BitVector printer.
Jakob Stoklund Olesen [Fri, 30 Sep 2011 22:18:54 +0000 (22:18 +0000)]
Extract a slightly more general BitVector printer.

This one can also print 32-bit groups.

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

13 years agoMove getCommonSubClass() into TRI.
Jakob Stoklund Olesen [Fri, 30 Sep 2011 22:18:51 +0000 (22:18 +0000)]
Move getCommonSubClass() into TRI.

It will soon need the context.

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

13 years agoCompute lists of super-classes in CodeGenRegisterClass.
Jakob Stoklund Olesen [Fri, 30 Sep 2011 22:18:45 +0000 (22:18 +0000)]
Compute lists of super-classes in CodeGenRegisterClass.

Use these lists instead of computing them on the fly in
RegisterInfoEmitter.

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

13 years agoCorrect for my over-eager delete finger.
Jim Grosbach [Fri, 30 Sep 2011 22:02:45 +0000 (22:02 +0000)]
Correct for my over-eager delete finger.

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

13 years agoAdd definition of MipsELFObjectWriter.
Akira Hatanaka [Fri, 30 Sep 2011 21:55:40 +0000 (21:55 +0000)]
Add definition of MipsELFObjectWriter.

Patch by Reed Kotler at Mips Technologies.

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

13 years agoRegister the MC object streamer.
Akira Hatanaka [Fri, 30 Sep 2011 21:29:38 +0000 (21:29 +0000)]
Register the MC object streamer.

Patch by Reed Kotler at Mips Technologies.

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

13 years agoRegister Asm backend. Add functions to MipsAsmBackend.
Akira Hatanaka [Fri, 30 Sep 2011 21:23:45 +0000 (21:23 +0000)]
Register Asm backend. Add functions to MipsAsmBackend.

Patch by Reed Kotler at Mips Technologies.

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

13 years agoAdd MCELFObjectTargetWriter and MCAsmBackend classes.
Akira Hatanaka [Fri, 30 Sep 2011 21:04:02 +0000 (21:04 +0000)]
Add MCELFObjectTargetWriter and MCAsmBackend classes.

Patch by Reed Kotler at Mips Technologies.

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

13 years agoTest More Complicated Lists
David Greene [Fri, 30 Sep 2011 20:59:52 +0000 (20:59 +0000)]
Test More Complicated Lists

Test of indexing lists of lists of lists works.  This also exercises
some operators.

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

13 years agoTest VarListElementInit:: resolveListElementReference
David Greene [Fri, 30 Sep 2011 20:59:51 +0000 (20:59 +0000)]
Test VarListElementInit:: resolveListElementReference

Add a TableGen test to check if indexing lists of lists works.

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

13 years agoImplement VarListElementInit:: resolveListElementReference
David Greene [Fri, 30 Sep 2011 20:59:49 +0000 (20:59 +0000)]
Implement VarListElementInit:: resolveListElementReference

Implement VarListElementInit:: resolveListElementReference so that
lists of lists can be indexed.

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

13 years agoUpdate CMake build.
Benjamin Kramer [Fri, 30 Sep 2011 20:44:33 +0000 (20:44 +0000)]
Update CMake build.

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

13 years agoInitial implementation of MipsMCCodeEmitter.
Akira Hatanaka [Fri, 30 Sep 2011 20:40:03 +0000 (20:40 +0000)]
Initial implementation of MipsMCCodeEmitter.

Patch by Reed Kotler at Mips Technologies.

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