oota-llvm.git
14 years agoRevert 117518 and 117519 for now. They changed scheduling and cause MC tests to fail...
Evan Cheng [Thu, 28 Oct 2010 02:00:25 +0000 (02:00 +0000)]
Revert 117518 and 117519 for now. They changed scheduling and cause MC tests to fail. Ugh.

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

14 years ago- Assign load / store with shifter op address modes the right itinerary classes.
Evan Cheng [Thu, 28 Oct 2010 01:49:06 +0000 (01:49 +0000)]
- Assign load / store with shifter op address modes the right itinerary classes.
- For now, loads of [r, r] addressing mode is the same as the
  [r, r lsl/lsr/asr #] variants. ARMBaseInstrInfo::getOperandLatency() should
  identify the former case and reduce the output latency by 1.
- Also identify [r, r << 2] case. This special form of shifter addressing mode
  is "free".

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

14 years agoFix a major bug in operand latency computation. The use index must be adjusted
Evan Cheng [Thu, 28 Oct 2010 01:46:29 +0000 (01:46 +0000)]
Fix a major bug in operand latency computation. The use index must be adjusted
by the number of defs first for it to match the instruction itinerary.

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

14 years agoFix pastos in handling of AVX cvttsd2si, PR8491.
Dale Johannesen [Thu, 28 Oct 2010 00:35:54 +0000 (00:35 +0000)]
Fix pastos in handling of AVX cvttsd2si, PR8491.
Bruno, please review, but I'm pretty sure this is right.
Patch by Alex Mac!

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

14 years agoAdd correct NEON encodings for vtbl and vtbx.
Owen Anderson [Thu, 28 Oct 2010 00:18:46 +0000 (00:18 +0000)]
Add correct NEON encodings for vtbl and vtbx.

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

14 years agoAdd correct NEON encodings for vext, vtrn, vuzp, and vzip.
Owen Anderson [Wed, 27 Oct 2010 23:56:39 +0000 (23:56 +0000)]
Add correct NEON encodings for vext, vtrn, vuzp, and vzip.

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

14 years agoFix compiler warnings about signed/unsigned comparisons.
Bob Wilson [Wed, 27 Oct 2010 23:49:00 +0000 (23:49 +0000)]
Fix compiler warnings about signed/unsigned comparisons.

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

14 years agoTeach InstCombine not to use Add and Neg on FP. PR 8490.
Dale Johannesen [Wed, 27 Oct 2010 23:45:18 +0000 (23:45 +0000)]
Teach InstCombine not to use Add and Neg on FP.  PR 8490.

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

14 years agoShifter ops are not always free. Do not fold them (especially to form
Evan Cheng [Wed, 27 Oct 2010 23:41:30 +0000 (23:41 +0000)]
Shifter ops are not always free. Do not fold them (especially to form
complex load / store addressing mode) when they have higher cost and
when they have more than one use.

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

14 years agoPutting r117193 back except for the compile time cost. Rather than assuming fallthrou...
Evan Cheng [Wed, 27 Oct 2010 23:17:17 +0000 (23:17 +0000)]
Putting r117193 back except for the compile time cost. Rather than assuming fallthroughs uses all registers, just gather the union of all successor liveins.

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

14 years agoRefactor ARM STR/STRB instruction patterns into STR{B}i12 and STR{B}rs, like
Jim Grosbach [Wed, 27 Oct 2010 23:12:14 +0000 (23:12 +0000)]
Refactor ARM STR/STRB instruction patterns into STR{B}i12 and STR{B}rs, like
the LDR instructions have. This makes the literal/register forms of the
instructions explicit and allows us to assign scheduling itineraries
appropriately. rdar://8477752

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

14 years agoTests for NEON encoding of vrev.
Owen Anderson [Wed, 27 Oct 2010 22:54:49 +0000 (22:54 +0000)]
Tests for NEON encoding of vrev.

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

14 years agoProvide correct encodings for NEON vcvt, which has its own special immediate encoding
Owen Anderson [Wed, 27 Oct 2010 22:49:00 +0000 (22:49 +0000)]
Provide correct encodings for NEON vcvt, which has its own special immediate encoding
for specifying fractional bits for fixed point conversions.

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

14 years agoTrailing whitespace
Jim Grosbach [Wed, 27 Oct 2010 21:39:08 +0000 (21:39 +0000)]
Trailing whitespace

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

14 years agoProvide correct encodings for the get_lane and set_lane variants of vmov.
Owen Anderson [Wed, 27 Oct 2010 21:28:09 +0000 (21:28 +0000)]
Provide correct encodings for the get_lane and set_lane variants of vmov.

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

14 years agoAdd support for R_386_TLS_GD, R_386_TLS_LE_32, R_386_TLS_IE and R_386_TLS_LE.
Rafael Espindola [Wed, 27 Oct 2010 21:23:52 +0000 (21:23 +0000)]
Add support for R_386_TLS_GD, R_386_TLS_LE_32, R_386_TLS_IE and R_386_TLS_LE.

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

14 years agoAdded the x86 instruction ud2b (2nd official undefined instruction).
Kevin Enderby [Wed, 27 Oct 2010 20:46:49 +0000 (20:46 +0000)]
Added the x86 instruction ud2b (2nd official undefined instruction).

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

14 years agoJIT imm12 encoding for constant pool entry references.
Jim Grosbach [Wed, 27 Oct 2010 20:39:40 +0000 (20:39 +0000)]
JIT imm12 encoding for constant pool entry references.

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

14 years agoSelectionDAG shuffle nodes do not allow operands with different numbers of
Bob Wilson [Wed, 27 Oct 2010 20:38:28 +0000 (20:38 +0000)]
SelectionDAG shuffle nodes do not allow operands with different numbers of
elements than the result vector type.  So, when an instruction like:

%8 = shufflevector <2 x float> %4, <2 x float> %7, <4 x i32> <i32 1, i32 0, i32 3, i32 2>

is translated to a DAG, each operand is changed to a concat_vectors node that appends 2 undef elements.  That is:

shuffle [a,b], [c,d] is changed to:
shuffle [a,b,u,u], [c,d,u,u]

That's probably the right thing for x86 but for NEON, we'd much rather have:

shuffle [a,b,c,d], undef

Teach the DAG combiner how to do that transformation for ARM.  Radar 8597007.

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

14 years agoImplement R_X86_64_GOTTPOFF, R_X86_64_TLSGD and R_X86_64_TPOFF32.
Rafael Espindola [Wed, 27 Oct 2010 20:28:07 +0000 (20:28 +0000)]
Implement R_X86_64_GOTTPOFF, R_X86_64_TLSGD and R_X86_64_TPOFF32.

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

14 years agoARM JIT fix for LDRi12 and company.
Jim Grosbach [Wed, 27 Oct 2010 19:55:59 +0000 (19:55 +0000)]
ARM JIT fix for LDRi12 and company.

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

14 years agoReplace pointer arithmetic with StringRef::substr.
Benjamin Kramer [Wed, 27 Oct 2010 19:53:52 +0000 (19:53 +0000)]
Replace pointer arithmetic with StringRef::substr.

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

14 years agoProvide correct NEON encodings for vdup.
Owen Anderson [Wed, 27 Oct 2010 19:25:54 +0000 (19:25 +0000)]
Provide correct NEON encodings for vdup.

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

14 years agox86-Win32: Switch ftol2 calling convention from stdcall to C.
Michael J. Spencer [Wed, 27 Oct 2010 18:52:38 +0000 (18:52 +0000)]
x86-Win32: Switch ftol2 calling convention from stdcall to C.

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

14 years agoCOFF: Add IMAGE_SCN_MEM_READ to text sections.
Michael J. Spencer [Wed, 27 Oct 2010 18:52:29 +0000 (18:52 +0000)]
COFF: Add IMAGE_SCN_MEM_READ to text sections.

There are currently 100 references to COFF::IMAGE_SCN in 6 files
and 11 different functions. Section to attribute mapping really
needs to happen in one place to avoid problems like this.

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

14 years agoFix whitespace.
Michael J. Spencer [Wed, 27 Oct 2010 18:52:20 +0000 (18:52 +0000)]
Fix whitespace.

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

14 years agoSet default type and flags for .init and .fini.
Rafael Espindola [Wed, 27 Oct 2010 18:45:20 +0000 (18:45 +0000)]
Set default type and flags for .init and .fini.

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

14 years agoTests for NEON encoding of vmovl, vmovn, vqmovn, and vqmovun.
Owen Anderson [Wed, 27 Oct 2010 18:17:12 +0000 (18:17 +0000)]
Tests for NEON encoding of vmovl, vmovn, vqmovn, and vqmovun.

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

14 years agoGive a name to nameless argument.
Devang Patel [Wed, 27 Oct 2010 18:08:31 +0000 (18:08 +0000)]
Give a name to nameless argument.

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

14 years agoTests for NEON encoding of vcls, vclz, and vcnt.
Owen Anderson [Wed, 27 Oct 2010 18:05:25 +0000 (18:05 +0000)]
Tests for NEON encoding of vcls, vclz, and vcnt.

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

14 years agoTests for NEON encoding of vneg and vqneg.
Owen Anderson [Wed, 27 Oct 2010 17:57:26 +0000 (17:57 +0000)]
Tests for NEON encoding of vneg and vqneg.

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

14 years agoProduce an error for an invalid use of .symver.
Rafael Espindola [Wed, 27 Oct 2010 17:56:18 +0000 (17:56 +0000)]
Produce an error for an invalid use of .symver.

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

14 years agoThe new LDR* instruction patterns should handle the necessary encoding of
Jim Grosbach [Wed, 27 Oct 2010 17:52:51 +0000 (17:52 +0000)]
The new LDR* instruction patterns should handle the necessary encoding of
operands in the TableGen'erated bits, so we don't need to do the additional
magic explicitly.

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

14 years agoTests for NEON encoding of vabs and vqabs.
Owen Anderson [Wed, 27 Oct 2010 17:50:07 +0000 (17:50 +0000)]
Tests for NEON encoding of vabs and vqabs.

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

14 years agoAdd correct NEON encodings for vsli and vsri.
Owen Anderson [Wed, 27 Oct 2010 17:40:08 +0000 (17:40 +0000)]
Add correct NEON encodings for vsli and vsri.

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

14 years agoAdd correct NEON encodings for vsra and vrsra.
Owen Anderson [Wed, 27 Oct 2010 17:29:29 +0000 (17:29 +0000)]
Add correct NEON encodings for vsra and vrsra.

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

14 years agoThe immediate operands of an LDRi12 instruction doesn't need the addrmode2
Jim Grosbach [Wed, 27 Oct 2010 16:50:31 +0000 (16:50 +0000)]
The immediate operands of an LDRi12 instruction doesn't need the addrmode2
encoding tricks. Handle the 'imm doesn't fit in the insn' case.

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

14 years agoFormatting.
Jim Grosbach [Wed, 27 Oct 2010 16:30:18 +0000 (16:30 +0000)]
Formatting.

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

14 years agoSymbols defined as the difference of other two end up in the ABS section.
Rafael Espindola [Wed, 27 Oct 2010 16:04:30 +0000 (16:04 +0000)]
Symbols defined as the difference of other two end up in the ABS section.

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

14 years agoAdd support for the .symver directive. This is really ugly, but most of it is
Rafael Espindola [Wed, 27 Oct 2010 15:18:17 +0000 (15:18 +0000)]
Add support for the .symver directive. This is really ugly, but most of it is
contained in the ELF object writer.

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

14 years agoMove more logic to isInSymtab and simplify.
Rafael Espindola [Wed, 27 Oct 2010 14:44:52 +0000 (14:44 +0000)]
Move more logic to isInSymtab and simplify.

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

14 years ago80-col violation.
Mikhail Glushenkov [Wed, 27 Oct 2010 09:09:10 +0000 (09:09 +0000)]
80-col violation.

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

14 years agoRemove try/catch(...) from Win32/Signals.inc.
Mikhail Glushenkov [Wed, 27 Oct 2010 09:09:04 +0000 (09:09 +0000)]
Remove try/catch(...) from Win32/Signals.inc.

catch(...) is used in Win32/Signals.inc for catching Win32 structured
exceptions, but according to [1], this is wrong.

We can't simply change try/catch to __try/__finally, since this syntax is not
supported by MinGW. We can use __try/__finally on MSVC and __try1/__except1
macros on MinGW [2], but I think that that solution obfuscates the code too
much.

The use of try/catch(...) in Signals.inc makes it impossible to link
MinGW-compiled libSystem with llvm-gcc compiled executables. I propose that we
just remove try/catch(...) from Signals.inc, since the meaning of the code won't
change.

[1] http://members.cox.net/doug_web/eh.htm
[2] http://article.gmane.org/gmane.comp.compilers.llvm.cvs/81315

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

14 years agoIt is confusing to call a random-access iterator 'InputIterator'.
Mikhail Glushenkov [Wed, 27 Oct 2010 07:39:54 +0000 (07:39 +0000)]
It is confusing to call a random-access iterator 'InputIterator'.

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

14 years agoTrailing whitespace.
Mikhail Glushenkov [Wed, 27 Oct 2010 07:39:48 +0000 (07:39 +0000)]
Trailing whitespace.

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

14 years agoYet another tweak to X86 instructions to add ud2a as an alias to ud2
Kevin Enderby [Wed, 27 Oct 2010 03:01:02 +0000 (03:01 +0000)]
Yet another tweak to X86 instructions to add ud2a as an alias to ud2
(still to add ud2b).

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

14 years agoAnother tweak to X86 instructions to add the missing flex instruction (without
Kevin Enderby [Wed, 27 Oct 2010 02:53:04 +0000 (02:53 +0000)]
Another tweak to X86 instructions to add the missing flex instruction (without
the wait prefix).

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

14 years agoTweaks to X86 instructions to allow the 'w' suffix in places it makes
Kevin Enderby [Wed, 27 Oct 2010 02:32:19 +0000 (02:32 +0000)]
Tweaks to X86 instructions to allow the 'w' suffix in places it makes
sense, when the instruction takes the 16-bit ax register or m16 memory
location.  These changes to llvm-mc matches what the darwin assembler
allows for these instructions.  Done differently than in r117031 that
caused a valgrind error which was later reverted.

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

14 years agoLDRi12 machine instructions handle negative offset operands normally (simple
Jim Grosbach [Wed, 27 Oct 2010 01:19:41 +0000 (01:19 +0000)]
LDRi12 machine instructions handle negative offset operands normally (simple
integer values), not with the addrmode2 encoding.

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

14 years agoRandom cleanups and format changes.
Bill Wendling [Wed, 27 Oct 2010 01:07:41 +0000 (01:07 +0000)]
Random cleanups and format changes.

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

14 years agoAdded some aliases to the fcomip and fucompi Intel instructions. So that llvm-mc
Kevin Enderby [Wed, 27 Oct 2010 00:59:28 +0000 (00:59 +0000)]
Added some aliases to the fcomip and fucompi Intel instructions. So that llvm-mc
will accept versions that the darwin assembler allows.  Forms ending in "pi" and
forms without all the operands.

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

14 years agoHandle critical loop predecessors by making both inside and outside registers
Jakob Stoklund Olesen [Wed, 27 Oct 2010 00:39:07 +0000 (00:39 +0000)]
Handle critical loop predecessors by making both inside and outside registers
live out.

This doesn't prevent us from inserting a loop preheader later on, if that is
better.

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

14 years agoCompute critical loop predecessors in the same way as critical loop exits.
Jakob Stoklund Olesen [Wed, 27 Oct 2010 00:39:05 +0000 (00:39 +0000)]
Compute critical loop predecessors in the same way as critical loop exits.

Critical edges going into a loop are not as bad as critical exits. We can handle
them by splitting the critical edge, or by having both inside and outside
registers live out of the predecessor.

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

14 years agoPhysical registers trivially have multiple connected components all the time.
Jakob Stoklund Olesen [Wed, 27 Oct 2010 00:39:01 +0000 (00:39 +0000)]
Physical registers trivially have multiple connected components all the time.
Only virtuals should be requires to be connected.

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

14 years agoOne more spot where the new arm mode LDR instruction representation
Jim Grosbach [Wed, 27 Oct 2010 00:38:16 +0000 (00:38 +0000)]
One more spot where the new arm mode LDR instruction representation
doesn't need the additional addrmode2 register operand. Missed it the first
time around.

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

14 years agoAdding disassembler to the MicroBlaze backend.
Wesley Peck [Wed, 27 Oct 2010 00:23:01 +0000 (00:23 +0000)]
Adding disassembler to the MicroBlaze backend.

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

14 years agoSplit ARM::LDRB into LDRBi12 and LDRBrs. Adjust accordingly. Continuing on
Jim Grosbach [Wed, 27 Oct 2010 00:19:44 +0000 (00:19 +0000)]
Split ARM::LDRB into LDRBi12 and LDRBrs. Adjust accordingly. Continuing on
rdar://8477752.

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

14 years agoSince I parameterized this bit, I should probably actually use said parameter.
Jim Grosbach [Tue, 26 Oct 2010 23:58:04 +0000 (23:58 +0000)]
Since I parameterized this bit, I should probably actually use said parameter.

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

14 years agoEnable clang autocompletion by default.
Dan Gohman [Tue, 26 Oct 2010 23:24:54 +0000 (23:24 +0000)]
Enable clang autocompletion by default.

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

14 years agoUse a MemIntrinsicSDNode for ISD::PREFETCH, which touches
Dale Johannesen [Tue, 26 Oct 2010 23:11:10 +0000 (23:11 +0000)]
Use a MemIntrinsicSDNode for ISD::PREFETCH, which touches
memory, so a MachineMemOperand is useful (not propagated
into the MachineInstr yet).  No functional change except
for dump output.

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

14 years agoRemove the vector of live vregs. I thought we would need to track
Andrew Trick [Tue, 26 Oct 2010 22:58:24 +0000 (22:58 +0000)]
Remove the vector of live vregs. I thought we would need to track
them, but hopefully we won't. And this is not the right data structure
to do it anyway.

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

14 years agoAdd correct NEON encodings for vqshl, vqshrn, vqshrun, vqrshl, vqshrn, and vqrshrun.
Owen Anderson [Tue, 26 Oct 2010 22:50:46 +0000 (22:50 +0000)]
Add correct NEON encodings for vqshl, vqshrn, vqshrun, vqrshl, vqshrn, and vqrshrun.

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

14 years agoFirst part of refactoring ARM addrmode2 (load/store) instructions to be more
Jim Grosbach [Tue, 26 Oct 2010 22:37:02 +0000 (22:37 +0000)]
First part of refactoring ARM addrmode2 (load/store) instructions to be more
explicit about the operands. Split out the different variants into separate
instructions. This gives us the ability to, among other things, assign
different scheduling itineraries to the variants. rdar://8477752.

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

14 years agoAfter splitting, compute connected components of all new registers, not just for
Jakob Stoklund Olesen [Tue, 26 Oct 2010 22:36:09 +0000 (22:36 +0000)]
After splitting, compute connected components of all new registers, not just for
the remainder register.

Example:

bb0:
  x = 1
bb1:
  use(x)
  ...
  x = 2
  jump bb1

When x is isolated in bb1, the inner part breaks into two components, x1 and x2:

bb0:
  x0 = 1
bb1:
  x1 = x0
  use(x1)
  ...
  x2 = 2
  x0 = x2
  jump bb1

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

14 years agoVerify that live intervals are connected. If there are multiple connected
Jakob Stoklund Olesen [Tue, 26 Oct 2010 22:36:07 +0000 (22:36 +0000)]
Verify that live intervals are connected. If there are multiple connected
components, each should get its own virtual register.

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

14 years agoCall RenumberValues for all new registers created during splitting. This is
Jakob Stoklund Olesen [Tue, 26 Oct 2010 22:36:05 +0000 (22:36 +0000)]
Call RenumberValues for all new registers created during splitting. This is
necessary to get correct hasPHIKill flags.

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

14 years agoPreserve PHIDef bits in cloned values during splitting.
Jakob Stoklund Olesen [Tue, 26 Oct 2010 22:36:02 +0000 (22:36 +0000)]
Preserve PHIDef bits in cloned values during splitting.

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

14 years agoAssign source ordering to nodes created for StoreInst.
Devang Patel [Tue, 26 Oct 2010 22:14:52 +0000 (22:14 +0000)]
Assign source ordering to nodes created for StoreInst.

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

14 years agoCorrect NEON encodings for vshrn, vrshl, vrshr, vrshrn.
Owen Anderson [Tue, 26 Oct 2010 21:58:41 +0000 (21:58 +0000)]
Correct NEON encodings for vshrn, vrshl, vrshr, vrshrn.

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

14 years agoFileCheck'ize
Jim Grosbach [Tue, 26 Oct 2010 21:26:47 +0000 (21:26 +0000)]
FileCheck'ize

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

14 years agoAdd tests for NEON encoding of vshll.
Owen Anderson [Tue, 26 Oct 2010 21:21:47 +0000 (21:21 +0000)]
Add tests for NEON encoding of vshll.

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

14 years agoSimplify classes for shift instructions, which are never commutable.
Owen Anderson [Tue, 26 Oct 2010 21:13:59 +0000 (21:13 +0000)]
Simplify classes for shift instructions, which are never commutable.

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

14 years agoTests for NEON encoding of vshr.
Owen Anderson [Tue, 26 Oct 2010 21:08:42 +0000 (21:08 +0000)]
Tests for NEON encoding of vshr.

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

14 years agoProvide correct NEON encodings for vshl, register and immediate forms.
Owen Anderson [Tue, 26 Oct 2010 20:56:57 +0000 (20:56 +0000)]
Provide correct NEON encodings for vshl, register and immediate forms.

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

14 years agoTeach MachineBasicBlock::print() to annotate instructions and blocks with
Jakob Stoklund Olesen [Tue, 26 Oct 2010 20:21:46 +0000 (20:21 +0000)]
Teach MachineBasicBlock::print() to annotate instructions and blocks with
SlotIndexes when available.

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

14 years agoRemmeber to print full live interval on verification error.
Jakob Stoklund Olesen [Tue, 26 Oct 2010 20:21:43 +0000 (20:21 +0000)]
Remmeber to print full live interval on verification error.

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

14 years agoAdd support for .ident.
Rafael Espindola [Tue, 26 Oct 2010 19:35:47 +0000 (19:35 +0000)]
Add support for .ident.

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

14 years agoGrammar.
Jim Grosbach [Tue, 26 Oct 2010 19:34:41 +0000 (19:34 +0000)]
Grammar.

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

14 years agoNuke extraneous comment. It's applicable elsewhere, but not in this func.
Jim Grosbach [Tue, 26 Oct 2010 19:22:23 +0000 (19:22 +0000)]
Nuke extraneous comment. It's applicable elsewhere, but not in this func.

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

14 years agoTests for NEON encoding of vrecpe, vrecps, vrsqrte, and vsqrts.
Owen Anderson [Tue, 26 Oct 2010 18:43:13 +0000 (18:43 +0000)]
Tests for NEON encoding of vrecpe, vrecps, vrsqrte, and vsqrts.

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

14 years agoJakob's review of the basic register allocator.
Andrew Trick [Tue, 26 Oct 2010 18:34:01 +0000 (18:34 +0000)]
Jakob's review of the basic register allocator.

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

14 years agoTests for NEON encodings of vpmin and vpmax.
Owen Anderson [Tue, 26 Oct 2010 18:31:47 +0000 (18:31 +0000)]
Tests for NEON encodings of vpmin and vpmax.

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

14 years agoAdd correct NEON encoding for vpadal.
Owen Anderson [Tue, 26 Oct 2010 18:18:03 +0000 (18:18 +0000)]
Add correct NEON encoding for vpadal.

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

14 years agohandle X86::EH_RETURN64 and X86::EH_RETURN.
Rafael Espindola [Tue, 26 Oct 2010 18:09:55 +0000 (18:09 +0000)]
handle X86::EH_RETURN64 and X86::EH_RETURN.

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

14 years agoTests for NEON encoding of vpadd and vpaddl.
Owen Anderson [Tue, 26 Oct 2010 18:04:51 +0000 (18:04 +0000)]
Tests for NEON encoding of vpadd and vpaddl.

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

14 years agos/beginScope/beginInstruction/g
Devang Patel [Tue, 26 Oct 2010 17:49:02 +0000 (17:49 +0000)]
s/beginScope/beginInstruction/g
s/endScope/endInstruction/g

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

14 years agoAdd NEON encodings for vmov and vmvn of immediates.
Owen Anderson [Tue, 26 Oct 2010 17:40:54 +0000 (17:40 +0000)]
Add NEON encodings for vmov and vmvn of immediates.

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

14 years agoDon't verify physical registers going into landing pads.
Jakob Stoklund Olesen [Tue, 26 Oct 2010 16:49:23 +0000 (16:49 +0000)]
Don't verify physical registers going into landing pads.
Magic is happening that we don't understand.

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

14 years agoImplement some relaxations for arithmetic instructions. The limitation
Rafael Espindola [Tue, 26 Oct 2010 14:09:12 +0000 (14:09 +0000)]
Implement some relaxations for arithmetic instructions. The limitation
on RIP relative relocations looks artificial, but this is a superset of
what we were able to do before.

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

14 years agoYet another thing that was forgotten to be added to the release notes...
Duncan Sands [Tue, 26 Oct 2010 12:43:36 +0000 (12:43 +0000)]
Yet another thing that was forgotten to be added to the release notes...

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

14 years agoChange v64 datalayout in SPU.
Kalle Raiskila [Tue, 26 Oct 2010 10:45:47 +0000 (10:45 +0000)]
Change v64 datalayout in SPU.
The SPU ABI does not mention v64, and all examples
in C suggest v128 are treated similarily to arrays,
we use array alignment for v64 too. This makes the
alignment of e.g. [2 x <2 x i32>] behave "intuitively"
and similar to as if the elements were e.g. i32s.

This also makes an "unaligned store" test to be
aligned, with different (but functionally equivalent)
code generated.

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

14 years agoCMake: Build utils/KillTheDoctor only on MSVC for now.
NAKAMURA Takumi [Tue, 26 Oct 2010 05:08:27 +0000 (05:08 +0000)]
CMake: Build utils/KillTheDoctor only on MSVC for now.

Mingw does not have the header <dbghelp.h>.
Thanks to Daniel Newton, testing it on mingw.

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

14 years agoUse instruction itinerary to determine what instructions are 'cheap'.
Evan Cheng [Tue, 26 Oct 2010 02:08:50 +0000 (02:08 +0000)]
Use instruction itinerary to determine what instructions are 'cheap'.

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

14 years agoNEON vmov's are in Neon domain.
Evan Cheng [Tue, 26 Oct 2010 02:03:05 +0000 (02:03 +0000)]
NEON vmov's are in Neon domain.

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

14 years agoFor statistics that are only used in functions declared in !NDEBUG, wrap the
Nick Lewycky [Tue, 26 Oct 2010 00:51:57 +0000 (00:51 +0000)]
For statistics that are only used in functions declared in !NDEBUG, wrap the
declarations in !NDEBUG to avoid -Wunused-variable warnings. Patch by
Matt Beaumont-Gay!

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

14 years agoInlineSpiller can also update LiveStacks.
Jakob Stoklund Olesen [Tue, 26 Oct 2010 00:11:35 +0000 (00:11 +0000)]
InlineSpiller can also update LiveStacks.

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

14 years agoMake the spiller responsible for updating the LiveStacks analysis.
Jakob Stoklund Olesen [Tue, 26 Oct 2010 00:11:33 +0000 (00:11 +0000)]
Make the spiller responsible for updating the LiveStacks analysis.

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

14 years agoWhen the "true" and "false" blocks of a diamond if-conversion are the same,
Bob Wilson [Tue, 26 Oct 2010 00:02:24 +0000 (00:02 +0000)]
When the "true" and "false" blocks of a diamond if-conversion are the same,
do not double-count the duplicate instructions by counting once from the
beginning and again from the end.  Keep track of where the duplicates from
the beginning ended and don't go past that point when counting duplicates
at the end.  Radar 8589805.

This change causes one of the MC/ARM/simple-fp-encoding tests to produce
different (better!) code without the vmovne instruction being tested.
I changed the test to produce vmovne and vmoveq instructions but moving
between register files in the opposite direction.  That's not quite the same
but predicated versions of those instructions weren't being tested before,
so at least the test coverage is not any worse, just different.

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

14 years agoChange if-conversion to keep track of the extra cost due to microcoded
Bob Wilson [Tue, 26 Oct 2010 00:02:21 +0000 (00:02 +0000)]
Change if-conversion to keep track of the extra cost due to microcoded
instructions separately from the count of non-predicated instructions.  The
instruction count is used in places to determine how many instructions to
copy, predicate, etc. and things get confused if that count includes the
extra cost for microcoded ops.

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

14 years agoTidy up redundant check.
Bob Wilson [Tue, 26 Oct 2010 00:02:19 +0000 (00:02 +0000)]
Tidy up redundant check.

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