oota-llvm.git
13 years agoMissing test case for r141164.
Andrew Trick [Wed, 5 Oct 2011 06:23:32 +0000 (06:23 +0000)]
Missing test case for r141164.

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

13 years agoFix disabled SCEV analysis caused r141161 and add unit test.
Andrew Trick [Wed, 5 Oct 2011 05:58:49 +0000 (05:58 +0000)]
Fix disabled SCEV analysis caused r141161 and add unit test.

I noticed during self-review that my previous checkin disabled some
analysis. Even with the reenabled analysis the test case runs in about
5ms. Without the fix, it will take several minutes at least.

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

13 years agoAdd more initializers to quiet a clang warning.
Eric Christopher [Wed, 5 Oct 2011 05:00:26 +0000 (05:00 +0000)]
Add more initializers to quiet a clang warning.

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

13 years agoChange C++ style comments to C style comments in X86 disassembler. Patch from Joe...
Craig Topper [Wed, 5 Oct 2011 03:29:32 +0000 (03:29 +0000)]
Change C++ style comments to C style comments in X86 disassembler. Patch from Joe Abbey.

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

13 years agoAvoid exponential recursion in SCEV getConstantEvolvingPHI and EvaluateExpression.
Andrew Trick [Wed, 5 Oct 2011 03:25:31 +0000 (03:25 +0000)]
Avoid exponential recursion in SCEV getConstantEvolvingPHI and EvaluateExpression.

Note to compiler writers: never recurse on multiple instruction
operands without memoization.
Fixes rdar://10187945. Was taking 45s, now taking 5ms.

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

13 years agoInsert space.
Akira Hatanaka [Wed, 5 Oct 2011 02:22:49 +0000 (02:22 +0000)]
Insert space.

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

13 years agoDo not examine variadic or implicit operands if instruction is a return (jr).
Akira Hatanaka [Wed, 5 Oct 2011 02:21:58 +0000 (02:21 +0000)]
Do not examine variadic or implicit operands if instruction is a return (jr).

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

13 years agoClean up function Filler::delayHasHazard.
Akira Hatanaka [Wed, 5 Oct 2011 02:18:58 +0000 (02:18 +0000)]
Clean up function Filler::delayHasHazard.

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

13 years agoRemove function Filler::insertCallUses.
Akira Hatanaka [Wed, 5 Oct 2011 02:04:17 +0000 (02:04 +0000)]
Remove function Filler::insertCallUses.
Record the registers used and defined by a call in Filler::insertDefsUses.

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

13 years agoClean up Filler::findDelayInstr.
Akira Hatanaka [Wed, 5 Oct 2011 01:57:46 +0000 (01:57 +0000)]
Clean up Filler::findDelayInstr.

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

13 years agoRemove function Filler::isDelayFiller. Check if I is the same instruction that
Akira Hatanaka [Wed, 5 Oct 2011 01:30:09 +0000 (01:30 +0000)]
Remove function Filler::isDelayFiller. Check if I is the same instruction that
filled the last delay slot visited.

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

13 years agoClean up Filler::runOnMachineBasicBlock. Change interface of
Akira Hatanaka [Wed, 5 Oct 2011 01:23:39 +0000 (01:23 +0000)]
Clean up Filler::runOnMachineBasicBlock. Change interface of
Filler::findDelayInstr.

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

13 years agoDefine a statistic for the number of slots that were filled with useful
Akira Hatanaka [Wed, 5 Oct 2011 01:19:13 +0000 (01:19 +0000)]
Define a statistic for the number of slots that were filled with useful
instructions (instructions that are not NOP).

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

13 years agoRemove unnecessary check. isDelayFiller(MBB, I) will evaluate to true before
Akira Hatanaka [Wed, 5 Oct 2011 01:15:31 +0000 (01:15 +0000)]
Remove unnecessary check. isDelayFiller(MBB, I) will evaluate to true before
I->getDesc().hasDelaySlot() does.

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

13 years agoAdd comments and move assignment statement. If sawStore is true, sawLoad does
Akira Hatanaka [Wed, 5 Oct 2011 01:09:37 +0000 (01:09 +0000)]
Add comments and move assignment statement. If sawStore is true, sawLoad does
not have to be set.

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

13 years agoCorrect description string of enable-mips-delay-filler.
Akira Hatanaka [Wed, 5 Oct 2011 01:06:57 +0000 (01:06 +0000)]
Correct description string of enable-mips-delay-filler.

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

13 years agoLook at the number of entries in the jump table and jump to a 'trap' block if
Bill Wendling [Wed, 5 Oct 2011 00:39:32 +0000 (00:39 +0000)]
Look at the number of entries in the jump table and jump to a 'trap' block if
the value exceeds that number.

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

13 years agoAdd TRI::getSubClassWithSubReg(RC, Idx) function.
Jakob Stoklund Olesen [Wed, 5 Oct 2011 00:35:49 +0000 (00:35 +0000)]
Add TRI::getSubClassWithSubReg(RC, Idx) function.

This function is used to constrain a register class to a sub-class that
supports the given sub-register index.

For example, getSubClassWithSubReg(GR32, sub_8bit) -> GR32_ABCD.

The function will be used to compute register classes when emitting
INSERT_SUBREG and EXTRACT_SUBREG nodes and for register class inflation
of sub-register operations.

The version provided by TableGen is usually adequate, but targets can
override.

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

13 years agoCheckpoint for SJLJ EH code.
Bill Wendling [Wed, 5 Oct 2011 00:02:33 +0000 (00:02 +0000)]
Checkpoint for SJLJ EH code.

This is a first pass at generating the jump table for the sjlj dispatch. It
currently generates something plausible, but hasn't been tested thoroughly.

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

13 years agoAlso add <imp-use,kill> flags for redefined super-registers.
Jakob Stoklund Olesen [Wed, 5 Oct 2011 00:01:48 +0000 (00:01 +0000)]
Also add <imp-use,kill> flags for redefined super-registers.

For example:

  %vreg10:dsub_0<def,undef> = COPY %vreg1
  %vreg10:dsub_1<def> = COPY %vreg2

is rewritten as:

  %D2<def> = COPY %D0, %Q1<imp-def>
  %D3<def> = COPY %D1, %Q1<imp-use,kill>, %Q1<imp-def>

The first COPY doesn't care about the previous value of %Q1, so it
doesn't read that register.

The second COPY is a partial redefinition of %Q1, so it implicitly kills
and redefines that register.

This makes it possible to recognize instructions that can harmlessly
clobber the full super-register.  The write and don't read the
super-register.

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

13 years agoAlso add <def,undef> flags when coalescing sub-registers.
Jakob Stoklund Olesen [Wed, 5 Oct 2011 00:01:46 +0000 (00:01 +0000)]
Also add <def,undef> flags when coalescing sub-registers.

RegisterCoalescer can create sub-register defs when it is joining a
register with a sub-register.  Add <undef> flags to these new
sub-register defs where appropriate.

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

13 years agoTeach the MC to output code/data region marker labels in MachO and ELF modes. These...
Owen Anderson [Tue, 4 Oct 2011 23:26:17 +0000 (23:26 +0000)]
Teach the MC to output code/data region marker labels in MachO and ELF modes.  These are used by disassemblers to provide better disassembly, particularly on targets like ARM Thumb that like to intermingle data in the TEXT segment.

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

13 years agoAdding back support for printing operands symbolically to ARM's new disassembler
Kevin Enderby [Tue, 4 Oct 2011 22:44:48 +0000 (22:44 +0000)]
Adding back support for printing operands symbolically to ARM's new disassembler
using llvm's public 'C' disassembler API now including annotations.

Hooked this up to Darwin's otool(1) so it can again print things like branch
targets for example this:
 blx _puts
instead of this:
 blx #-36
and includes support for annotations for branches to symbol stubs like:
 bl 0x40 @ symbol stub for: _puts
and annotations for pc relative loads like this:
 ldr r3, #8 @ literal pool for: Hello, world!
Also again can print the expression encoded in the Mach-O relocation entries for
things like this:
 movt r0, :upper16:((_foo-_bar)+1234)

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

13 years agoCreate a mapping between the landing pad basic block and the call site index for...
Bill Wendling [Tue, 4 Oct 2011 22:00:35 +0000 (22:00 +0000)]
Create a mapping between the landing pad basic block and the call site index for later use.

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

13 years agoAllow <undef> flags on def operands as well as uses.
Jakob Stoklund Olesen [Tue, 4 Oct 2011 21:49:33 +0000 (21:49 +0000)]
Allow <undef> flags on def operands as well as uses.

The <undef> flag says that a MachineOperand doesn't read its register,
or doesn't depend on the previous value of its register.

A full register def never depends on the previous register value.  A
partial register def may depend on the previous value if it is intended
to update part of a register.

For example:

  %vreg10:dsub_0<def,undef> = COPY %vreg1
  %vreg10:dsub_1<def> = COPY %vreg2

The first copy instruction defines the full %vreg10 register with the
bits not covered by dsub_0 defined as <undef>.  It is not considered a
read of %vreg10.

The second copy modifies part of %vreg10 while preserving the rest.  It
has an implicit read of %vreg10.

This patch adds a MachineOperand::readsReg() method to determine if an
operand reads its register.

Previously, this was modelled by adding a full-register <imp-def>
operand to the instruction.  This approach makes it possible to
determine directly from a MachineOperand if it reads its register.  No
scanning of MI operands is required.

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

13 years agoTidy up formatting.
Jim Grosbach [Tue, 4 Oct 2011 21:43:51 +0000 (21:43 +0000)]
Tidy up formatting.

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

13 years agoDoxygen-ize comments. No functionality change.
Bill Wendling [Tue, 4 Oct 2011 21:25:01 +0000 (21:25 +0000)]
Doxygen-ize comments. No functionality change.

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

13 years agoRemove unused web page.
Daniel Dunbar [Tue, 4 Oct 2011 21:17:19 +0000 (21:17 +0000)]
Remove unused web page.

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

13 years agoUn-XFAIL file. Comment out individual failing instructions.
Jim Grosbach [Tue, 4 Oct 2011 21:16:42 +0000 (21:16 +0000)]
Un-XFAIL file. Comment out individual failing instructions.

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

13 years agoReplace snprintf with raw_string_ostream.
Francois Pichet [Tue, 4 Oct 2011 21:08:56 +0000 (21:08 +0000)]
Replace snprintf with raw_string_ostream.

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

13 years agoTidy up formatting.
Jim Grosbach [Tue, 4 Oct 2011 20:52:57 +0000 (20:52 +0000)]
Tidy up formatting.

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

13 years agoUn-XFAIL file. Fix incorrect CHECK lines. General format cleanup.
Jim Grosbach [Tue, 4 Oct 2011 20:50:05 +0000 (20:50 +0000)]
Un-XFAIL file. Fix incorrect CHECK lines. General format cleanup.

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

13 years agoUn-XFAIL file. Fix incorrect CHECK line. General format cleanup.
Jim Grosbach [Tue, 4 Oct 2011 20:46:49 +0000 (20:46 +0000)]
Un-XFAIL file. Fix incorrect CHECK line. General format cleanup.

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

13 years agoTidy up formatting.
Jim Grosbach [Tue, 4 Oct 2011 20:42:35 +0000 (20:42 +0000)]
Tidy up formatting.

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

13 years agoUn-XFAIL file. Fix incorrect CHECK line.
Jim Grosbach [Tue, 4 Oct 2011 20:42:09 +0000 (20:42 +0000)]
Un-XFAIL file. Fix incorrect CHECK line.

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

13 years agoUn-XFAIL the file. Disable only the individual tests that aren't working yet.
Jim Grosbach [Tue, 4 Oct 2011 20:34:11 +0000 (20:34 +0000)]
Un-XFAIL the file. Disable only the individual tests that aren't working yet.

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

13 years agoAdd method to determine if a begin label has a call site number associated with it.
Bill Wendling [Tue, 4 Oct 2011 20:31:56 +0000 (20:31 +0000)]
Add method to determine if a begin label has a call site number associated with it.

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

13 years agoProperly use const_iterator.
Jakob Stoklund Olesen [Tue, 4 Oct 2011 20:18:39 +0000 (20:18 +0000)]
Properly use const_iterator.

This should unbreak the Windows build.

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

13 years agoUpdate cmake list.
Devang Patel [Tue, 4 Oct 2011 19:38:16 +0000 (19:38 +0000)]
Update cmake list.

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

13 years agoTell people using the tutorial how to make it actually work.
David Chisnall [Tue, 4 Oct 2011 19:36:30 +0000 (19:36 +0000)]
Tell people using the tutorial how to make it actually work.

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

13 years agoTest Operand Arguments
David Greene [Tue, 4 Oct 2011 18:55:40 +0000 (18:55 +0000)]
Test Operand Arguments

Add a test to do list manipulation and pass the result as arguments.
This tests the new list element operator resolve code and provides an
example of using list manipulation to do instruction pattern
substitution.

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

13 years agoAllow Operator Arguments
David Greene [Tue, 4 Oct 2011 18:55:36 +0000 (18:55 +0000)]
Allow Operator Arguments

When resolving an operator list element reference, resolve all
operator operands and try to fold the operator first.  This allows the
operator to collapse to a list which may then be indexed.

Before, it was not possible to do this:
class D<int a, int b> { ... }
class C<list<int> A> : D<A[0], A[1]>;
class B<list<int> b> : C<!foreach(...,b)>;

Now it is.

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

13 years agoUn-XFAIL the file. Disable only the individual tests that aren't working yet.
Jim Grosbach [Tue, 4 Oct 2011 18:43:15 +0000 (18:43 +0000)]
Un-XFAIL the file. Disable only the individual tests that aren't working yet.

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

13 years agoUnbreak CMake build.
Ted Kremenek [Tue, 4 Oct 2011 18:22:24 +0000 (18:22 +0000)]
Unbreak CMake build.

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

13 years agoTidy up. Formatting.
Jim Grosbach [Tue, 4 Oct 2011 17:49:45 +0000 (17:49 +0000)]
Tidy up. Formatting.

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

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