OSDN Git Service

android-x86/external-llvm.git
13 years agoadd simple support for addrmode5 operands, allowing
Chris Lattner [Fri, 29 Oct 2010 00:27:31 +0000 (00:27 +0000)]
add simple support for addrmode5 operands, allowing
vldr.64 to work.  I have no idea if this is fully right, but
it is in the right direction.

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

13 years agoThe ARM jit cannot handle these tests as of 2010-10-27.
Andrew Trick [Fri, 29 Oct 2010 00:23:43 +0000 (00:23 +0000)]
The ARM jit cannot handle these tests as of 2010-10-27.
(A PR will be linked to this rev.)

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

13 years agoIgnore empty blocks.
Devang Patel [Thu, 28 Oct 2010 22:11:59 +0000 (22:11 +0000)]
Ignore empty blocks.

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

13 years agogive better error diagnostics, for example:
Chris Lattner [Thu, 28 Oct 2010 21:41:58 +0000 (21:41 +0000)]
give better error diagnostics, for example:

t.s:1:14: error: invalid operand for instruction
vldr.64 d17, [r0]
             ^

instead of:

t.s:1:1: error: unrecognized instruction
vldr.64 d17, [r0]
^

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

13 years agohook up getOpcodeName for ARM so that "llc -show-mc-inst" includes
Chris Lattner [Thu, 28 Oct 2010 21:37:33 +0000 (21:37 +0000)]
hook up getOpcodeName for ARM so that "llc -show-mc-inst" includes
the opcode string in the inst dump, e.g.:
vmov r2, r3, d17             @ encoding: [0x31,0x2b,0x53,0xec]
                                        @ <MCInst #989 VMOVRRD
                                        @  <MCOperand Reg:68>
                                        @  <MCOperand Reg:69>
                                        @  <MCOperand Reg:19>
                                        @  <MCOperand Imm:14>
                                        @  <MCOperand Reg:0>>

The "VMOVRRD" is new.

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

13 years agoImprovements to .section parsing:
Rafael Espindola [Thu, 28 Oct 2010 21:33:33 +0000 (21:33 +0000)]
Improvements to .section parsing:
* If we have a M or a G, reject sections without the type
* Only parse the flag specific arguments if we have M or G
* Parse the corresponding arguments for M and G

We ignore the G arguments and flag for now.

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

13 years agomost simple arm instructions match correctly now,
Chris Lattner [Thu, 28 Oct 2010 21:31:07 +0000 (21:31 +0000)]
most simple arm instructions match correctly now,
it looks like we're not handling [] operands though

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

13 years agofix the asmmatcher generator to handle targets with no RegisterPrefix
Chris Lattner [Thu, 28 Oct 2010 21:28:42 +0000 (21:28 +0000)]
fix the asmmatcher generator to handle targets with no RegisterPrefix
(like ARM) correctly.  With this change, we can now match "bx lr"
because we recognize lr as a register.

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

13 years agomove a method out of line.
Chris Lattner [Thu, 28 Oct 2010 21:28:01 +0000 (21:28 +0000)]
move a method out of line.

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

13 years agoremove the rest of hte owningptr's, no functionality change.
Chris Lattner [Thu, 28 Oct 2010 20:52:15 +0000 (20:52 +0000)]
remove the rest of hte owningptr's, no functionality change.

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

13 years agoOne day, physical register live ranges will be sensible.
Jakob Stoklund Olesen [Thu, 28 Oct 2010 20:44:22 +0000 (20:44 +0000)]
One day, physical register live ranges will be sensible.

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

13 years agoFix indentation.
Devang Patel [Thu, 28 Oct 2010 20:41:11 +0000 (20:41 +0000)]
Fix indentation.

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

13 years agoReplace SplitKit SSA update with an iterative algorithm very similar to the one
Jakob Stoklund Olesen [Thu, 28 Oct 2010 20:34:52 +0000 (20:34 +0000)]
Replace SplitKit SSA update with an iterative algorithm very similar to the one
in SSAUpdaterImpl.h

Verifying live intervals revealed that the old method was completely wrong, and
we need an iterative approach to calculating PHI placemant. Fortunately, we have
MachineDominators available, so we don't have to compute that over and over
like SSAUpdaterImpl.h must.

Live-out values are cached between calls to mapValue() and computed in a greedy
way, so most calls will be working with very small block sets.

Thanks to Bob for explaining how this should work.

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

13 years agoMake MachineDominators available for SplitEditor. We are going to need it for
Jakob Stoklund Olesen [Thu, 28 Oct 2010 20:34:50 +0000 (20:34 +0000)]
Make MachineDominators available for SplitEditor. We are going to need it for
proper SSA updating.

This doesn't cause MachineDominators to be recomputed since we are already
requiring MachineLoopInfo which uses dominators as well.

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

13 years agoAdd a temporary command line option to verify machine code after each spill or
Jakob Stoklund Olesen [Thu, 28 Oct 2010 20:34:47 +0000 (20:34 +0000)]
Add a temporary command line option to verify machine code after each spill or
split.

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

13 years agoRevert r117582, which reverted r77396. Searching PATH for a string
Dan Gohman [Thu, 28 Oct 2010 20:34:33 +0000 (20:34 +0000)]
Revert r117582, which reverted r77396. Searching PATH for a string
which contains slashes is inconsistent with the meaning of PATH on
Unix-type platforms, and pretty surprising.

If the user has given a specific path to execute and we can't
execute it, we should fail and say why.  (Apparently the new
posix_spawn code doesn't always say why, but that's a separate
issue.)

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

13 years agoBackward compatibility. Gracefully handle older versions of debug info.
Devang Patel [Thu, 28 Oct 2010 20:08:13 +0000 (20:08 +0000)]
Backward compatibility. Gracefully handle older versions of debug info.

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

13 years agoAdd support for the .string directive.
Rafael Espindola [Thu, 28 Oct 2010 20:02:27 +0000 (20:02 +0000)]
Add support for the .string directive.

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

13 years agoDo not work too hard to find type's file info. There is a special field to record...
Devang Patel [Thu, 28 Oct 2010 19:50:08 +0000 (19:50 +0000)]
Do not work too hard to find type's file info. There is a special field to record file info.

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

13 years agoFix indentation.
Devang Patel [Thu, 28 Oct 2010 19:40:13 +0000 (19:40 +0000)]
Fix indentation.

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

13 years agoDefined weak symbols should have non-zero value.
Rafael Espindola [Thu, 28 Oct 2010 19:39:57 +0000 (19:39 +0000)]
Defined weak symbols should have non-zero value.

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

13 years agollvmc: Make ExecuteProgram() look in the driver directory first.
Mikhail Glushenkov [Thu, 28 Oct 2010 19:33:08 +0000 (19:33 +0000)]
llvmc: Make ExecuteProgram() look in the driver directory first.

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

13 years agoRemove an unnecessary check and an unnecessary temporary.
Mikhail Glushenkov [Thu, 28 Oct 2010 19:33:04 +0000 (19:33 +0000)]
Remove an unnecessary check and an unnecessary temporary.

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

13 years agoRevert r77396.
Mikhail Glushenkov [Thu, 28 Oct 2010 19:32:58 +0000 (19:32 +0000)]
Revert r77396.

Original commit message:

    On "Unix", if Program::FindProgramByName is given a name containing
    slashes, just go with it, regardless of whether it looks like it will
    be executable. This follows the behavior of sh(1) more closely.

It's better when behaviour is consistent between platforms. This change also
makes FindExecutable() behave as expected on unix-likes (before this commit, it
used to always succeed).

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

13 years agoTrailing whitespace.
Mikhail Glushenkov [Thu, 28 Oct 2010 19:32:53 +0000 (19:32 +0000)]
Trailing whitespace.

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

13 years ago80-col violations.
Mikhail Glushenkov [Thu, 28 Oct 2010 19:32:47 +0000 (19:32 +0000)]
80-col violations.

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

13 years agoDo not rely on context to find file info. It is already provided as a separate field.
Devang Patel [Thu, 28 Oct 2010 19:14:28 +0000 (19:14 +0000)]
Do not rely on context to find file info. It is already provided as a separate field.

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

13 years agoFix relocations with renamed symbols.
Rafael Espindola [Thu, 28 Oct 2010 19:08:03 +0000 (19:08 +0000)]
Fix relocations with renamed symbols.

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

13 years agoReduce malloc thrashing.
Benjamin Kramer [Thu, 28 Oct 2010 18:41:23 +0000 (18:41 +0000)]
Reduce malloc thrashing.

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

13 years agoPLD, PLDW, PLI encodings, plus refactor their use of addrmode2.
Jim Grosbach [Thu, 28 Oct 2010 18:34:10 +0000 (18:34 +0000)]
PLD, PLDW, PLI encodings, plus refactor their use of addrmode2.

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

13 years agoAliases defined with .symver should copy the binding of the symbols they alias.
Rafael Espindola [Thu, 28 Oct 2010 18:33:03 +0000 (18:33 +0000)]
Aliases defined with .symver should copy the binding of the symbols they alias.
Move the existing patching for undefined symbols so that all the patching
is done in the same function.

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

13 years agoTechnically DIFile scope should also be handled here.
Devang Patel [Thu, 28 Oct 2010 17:30:52 +0000 (17:30 +0000)]
Technically DIFile scope should also be handled here.

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

13 years agorearrange ParseRegisterList.
Chris Lattner [Thu, 28 Oct 2010 17:23:41 +0000 (17:23 +0000)]
rearrange ParseRegisterList.

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

13 years agorefactor some code to simplify it, eliminating some owningptr's.
Chris Lattner [Thu, 28 Oct 2010 17:20:03 +0000 (17:20 +0000)]
refactor some code to simplify it, eliminating some owningptr's.

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

13 years agoTeach the DAG combiner to fold a splat of a splat. Radar 8597790.
Bob Wilson [Thu, 28 Oct 2010 17:06:14 +0000 (17:06 +0000)]
Teach the DAG combiner to fold a splat of a splat.  Radar 8597790.
Also do some minor refactoring to reduce indentation.

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

13 years agoUse the IDVal directly as there's no need to convert to std::string.
Roman Divacky [Thu, 28 Oct 2010 16:57:58 +0000 (16:57 +0000)]
Use the IDVal directly as there's no need to convert to std::string.
Pointed out by Chris!

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

13 years agoImplement .equ directive as a synonym to .set.
Roman Divacky [Thu, 28 Oct 2010 16:22:58 +0000 (16:22 +0000)]
Implement .equ directive as a synonym to .set.

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

13 years agoTestcase for PR8494 (invalid bitcode crashing the bitcode reader).
Duncan Sands [Thu, 28 Oct 2010 15:57:30 +0000 (15:57 +0000)]
Testcase for PR8494 (invalid bitcode crashing the bitcode reader).

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

13 years agoFix PR8494: when reading invalid bitcode, getTypeByID may return
Duncan Sands [Thu, 28 Oct 2010 15:47:26 +0000 (15:47 +0000)]
Fix PR8494: when reading invalid bitcode, getTypeByID may return
a null pointer.

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

13 years agoImplement R_X86_64_DTPOFF32.
Rafael Espindola [Thu, 28 Oct 2010 15:11:03 +0000 (15:11 +0000)]
Implement R_X86_64_DTPOFF32.

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

13 years agoImplement TLSLD.
Rafael Espindola [Thu, 28 Oct 2010 15:02:40 +0000 (15:02 +0000)]
Implement TLSLD.

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

13 years agoImplement DTPOFF.
Rafael Espindola [Thu, 28 Oct 2010 14:48:59 +0000 (14:48 +0000)]
Implement DTPOFF.

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

13 years agoDocument LLVM_BUILD_TESTS, LLVM_INCLUDE_TESTS. New convenience target
Oscar Fuentes [Thu, 28 Oct 2010 14:38:35 +0000 (14:38 +0000)]
Document LLVM_BUILD_TESTS, LLVM_INCLUDE_TESTS. New convenience target
UnitTests for building all the unit tests.

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

13 years agoImplement TLSLDM.
Rafael Espindola [Thu, 28 Oct 2010 14:37:09 +0000 (14:37 +0000)]
Implement TLSLDM.

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

13 years agoImplement VK_GOTNTPOFF and switch RelocNeedsGOT to use VariantKind.
Rafael Espindola [Thu, 28 Oct 2010 14:22:44 +0000 (14:22 +0000)]
Implement VK_GOTNTPOFF and switch RelocNeedsGOT to use VariantKind.

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

13 years agoReindent.
Mikhail Glushenkov [Thu, 28 Oct 2010 08:25:44 +0000 (08:25 +0000)]
Reindent.

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

13 years agoRe-commit 117518 and 117519 now that ARM MC test failures are out of the way.
Evan Cheng [Thu, 28 Oct 2010 06:47:08 +0000 (06:47 +0000)]
Re-commit 117518 and 117519 now that ARM MC test failures are out of the way.

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

13 years agoDisable most of the ARM vfp / NEON MC tests. These are too fragile to be useful.
Evan Cheng [Thu, 28 Oct 2010 06:46:17 +0000 (06:46 +0000)]
Disable most of the ARM vfp / NEON MC tests. These are too fragile to be useful.
I'll work with Jim, Owen, and Bill on an alternative testing strategy until
the assembly parser is available.

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

13 years agotest/Transforms/SimplifyLibCalls/floor.ll: Mark as XFAIL:win32 due to lack of nearbyi...
NAKAMURA Takumi [Thu, 28 Oct 2010 06:46:04 +0000 (06:46 +0000)]
test/Transforms/SimplifyLibCalls/floor.ll: Mark as XFAIL:win32 due to lack of nearbyintf on MSVC. [PR8466]

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

13 years agotools/llvm-shlib/Makefile: Support for FreeBSD and OpenBSD.
NAKAMURA Takumi [Thu, 28 Oct 2010 06:45:57 +0000 (06:45 +0000)]
tools/llvm-shlib/Makefile: Support for FreeBSD and OpenBSD.

Thanks to Yuri Gribov and Vladimir Kirillov!
*BSD(s) have environ(7) in CRT startup and cannot resolve "environ" at linking llvm.so.
environ(7) is used inlib/System/Unix/Program.inc.

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

13 years agoclarify that not having the ".o file writing" feature
Chris Lattner [Thu, 28 Oct 2010 02:22:02 +0000 (02:22 +0000)]
clarify that not having the ".o file writing" feature
doesn't mean that you can't get a .o file.  Apparently
this is confusing :)

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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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