oota-llvm.git
11 years agoExplicitly request unsigned enum types when desired
Reid Kleckner [Tue, 8 Oct 2013 20:15:11 +0000 (20:15 +0000)]
Explicitly request unsigned enum types when desired

This fixes repeated -Wmicrosoft warnings when self-hosting clang on
Windows, and gets us real unsigned enum types with MSVC.

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

11 years agoDebug Info: update testing to reflect r192018.
Manman Ren [Tue, 8 Oct 2013 20:06:43 +0000 (20:06 +0000)]
Debug Info: update testing to reflect r192018.

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

11 years agoAdd fabsf to the list of inlined functions; otherwise
Reed Kotler [Tue, 8 Oct 2013 19:55:01 +0000 (19:55 +0000)]
Add fabsf to the list of inlined functions; otherwise
Mips16 will try and create a stub for it and this will
result in a link error because that function does not exist in libc.

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

11 years agoAdd DbgVariable::resolve per Eric's suggestion.
Manman Ren [Tue, 8 Oct 2013 19:07:44 +0000 (19:07 +0000)]
Add DbgVariable::resolve per Eric's suggestion.

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

11 years agoDebug Info: rename getOriginalTypeSize to getBaseTypeSize.
Manman Ren [Tue, 8 Oct 2013 18:46:58 +0000 (18:46 +0000)]
Debug Info: rename getOriginalTypeSize to getBaseTypeSize.

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

11 years agoDebug Info: take advantage of the existing CU::resolve.
Manman Ren [Tue, 8 Oct 2013 18:42:58 +0000 (18:42 +0000)]
Debug Info: take advantage of the existing CU::resolve.

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

11 years agoMove DIRef::getName out of line.
Manman Ren [Tue, 8 Oct 2013 18:42:03 +0000 (18:42 +0000)]
Move DIRef::getName out of line.

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

11 years ago[mips] Simplify and optimize code.
Akira Hatanaka [Tue, 8 Oct 2013 18:13:24 +0000 (18:13 +0000)]
[mips] Simplify and optimize code.

No intended functionality change.

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

11 years agoAdd some xfaild R600 tests.
Matt Arsenault [Tue, 8 Oct 2013 18:06:36 +0000 (18:06 +0000)]
Add some xfaild R600 tests.

These are bugs to fix later.

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

11 years agoIRBuilder: Downgrade InsertPointGuard's instruction pointer to a raw pointer.
Benjamin Kramer [Tue, 8 Oct 2013 17:44:56 +0000 (17:44 +0000)]
IRBuilder: Downgrade InsertPointGuard's instruction pointer to a raw pointer.

Sadly this loses the checking from AssertingVH, but apparently storing the
end() of a BasicBlock into an AssertingVH has bad consequences as it's not
really an instruction.

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

11 years agoLet rotr and bswap be handled by expansion for Mips16 since we don't
Reed Kotler [Tue, 8 Oct 2013 17:32:33 +0000 (17:32 +0000)]
Let rotr and bswap be handled by expansion for Mips16 since we don't
have native instructions for this.

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

11 years agoRemoving unintended code block from lli
Andrew Kaylor [Tue, 8 Oct 2013 17:15:11 +0000 (17:15 +0000)]
Removing unintended code block from lli

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

11 years agoGrammar.
Eric Christopher [Tue, 8 Oct 2013 16:47:11 +0000 (16:47 +0000)]
Grammar.

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

11 years agoFix build on Solaris 11.
Rafael Espindola [Tue, 8 Oct 2013 16:12:58 +0000 (16:12 +0000)]
Fix build on Solaris 11.

Patch by Vladimir Voskresensky. The erros were:

Path.inc:274:3: error: ‘Dl_info’ was not declared in this scope
...

and

usr/include/spawn.h:52:14: error: expected ‘,’ or ‘...’ before ‘argv’

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

11 years agoOnly modify lto.exports.def when contents have changed.
Rafael Espindola [Tue, 8 Oct 2013 15:07:00 +0000 (15:07 +0000)]
Only modify lto.exports.def when contents have changed.

Patch by Greg Bedwell.

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

11 years agoAdd a MCTargetStreamer interface.
Rafael Espindola [Tue, 8 Oct 2013 13:08:17 +0000 (13:08 +0000)]
Add a MCTargetStreamer interface.

This patch fixes an old FIXME by creating a MCTargetStreamer interface
and moving the target specific functions for ARM, Mips and PPC to it.

The ARM streamer is still declared in a common place because it is
used from lib/CodeGen/ARMException.cpp, but the Mips and PPC are
completely hidden in the corresponding Target directories.

I will send an email to llvmdev with instructions on how to use this.

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

11 years agoSparcJITInfo.cpp: Prune "default:" label to fix a warning. [-Wcovered-switch-default]
NAKAMURA Takumi [Tue, 8 Oct 2013 10:29:09 +0000 (10:29 +0000)]
SparcJITInfo.cpp: Prune "default:" label to fix a warning. [-Wcovered-switch-default]

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

11 years agoPrune trailing linefeeds.
NAKAMURA Takumi [Tue, 8 Oct 2013 10:29:03 +0000 (10:29 +0000)]
Prune trailing linefeeds.

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

11 years ago[Sparc] Implement JIT for SPARC.
Venkatraman Govindaraju [Tue, 8 Oct 2013 07:15:22 +0000 (07:15 +0000)]
[Sparc] Implement JIT for SPARC.

No new testcases. However, this patch makes all supported JIT testcases in
test/ExecutionEngine  pass on Sparc.

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

11 years agoRemove unneeded MMX instruction definition by moving pattern to an equivalent instruc...
Craig Topper [Tue, 8 Oct 2013 06:30:39 +0000 (06:30 +0000)]
Remove unneeded MMX instruction definition by moving pattern to an equivalent instruction definition and removing the filtering from the disassembler table building.

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

11 years agoFix a typo in the mattr part of the run line.
Craig Topper [Tue, 8 Oct 2013 06:12:26 +0000 (06:12 +0000)]
Fix a typo in the mattr part of the run line.

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

11 years agoExplicitly disable AVX on a bunch of tests so they won't fail on AVX machines post...
Craig Topper [Tue, 8 Oct 2013 06:06:57 +0000 (06:06 +0000)]
Explicitly disable AVX on a bunch of tests so they won't fail on AVX machines post r192171.

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

11 years agoRemove some instructions that existed to provide aliases to the assembler. Can be...
Craig Topper [Tue, 8 Oct 2013 05:53:50 +0000 (05:53 +0000)]
Remove some instructions that existed to provide aliases to the assembler. Can be done with InstAlias instead. Unfortunately, this was causing printer to use 'vmovq' or 'vmovd' based on what was parsed. To cleanup the inconsistencies convert all 'vmovd' with 64-bit registers to 'vmovq', but provide an alias so that 'vmovd' will still parse.

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

11 years ago[Sparc] Do not hardcode nop in the delay slot of TLS_CALL. Use DelaySlotFiller to...
Venkatraman Govindaraju [Tue, 8 Oct 2013 02:50:29 +0000 (02:50 +0000)]
[Sparc] Do not hardcode nop in the delay slot of TLS_CALL. Use DelaySlotFiller to fill the delay slot instead.

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

11 years agotypo.
Adrian Prantl [Tue, 8 Oct 2013 02:30:54 +0000 (02:30 +0000)]
typo.

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

11 years agotypo.
Adrian Prantl [Tue, 8 Oct 2013 02:28:20 +0000 (02:28 +0000)]
typo.

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

11 years agoReduce testcase from 1r92011.
Adrian Prantl [Tue, 8 Oct 2013 02:21:44 +0000 (02:21 +0000)]
Reduce testcase from 1r92011.

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

11 years agoupdate mach-o EXPORT_SYMBOL_* names
Nick Kledzik [Tue, 8 Oct 2013 00:59:13 +0000 (00:59 +0000)]
update mach-o EXPORT_SYMBOL_* names

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

11 years agocmake: don't set LLVM_COMPILER_IS_GCC_COMPATIBLE when using clang-cl
Hans Wennborg [Mon, 7 Oct 2013 22:03:23 +0000 (22:03 +0000)]
cmake: don't set LLVM_COMPILER_IS_GCC_COMPATIBLE when using clang-cl

Tip-of-tree CMake has become clang-cl aware [1]. In this case,
CMAKE_CXX_COMPILER_ID will still be Clang, but MSVC will be true.

[1] See http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d8356d4

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

11 years agoWindows: Avoiding resizing, use uninitialized data() instead
David Majnemer [Mon, 7 Oct 2013 21:57:07 +0000 (21:57 +0000)]
Windows: Avoiding resizing, use uninitialized data() instead

This is ever-so faster but more importantly matches what we have elsewhere.

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

11 years ago[mips] Test case for r192124.
Akira Hatanaka [Mon, 7 Oct 2013 21:32:57 +0000 (21:32 +0000)]
[mips] Test case for r192124.

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

11 years agoLoopVectorize: External uses must use the last value in a reduction cycle
Arnold Schwaighofer [Mon, 7 Oct 2013 21:05:43 +0000 (21:05 +0000)]
LoopVectorize: External uses must use the last value in a reduction cycle

Otherwise, we don't perform operations that would have been performed on
the scalar version.

Fixes PR17498.

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

11 years agoAdd Mips16 patterns for sign extend byte and sign extend halfword.
Reed Kotler [Mon, 7 Oct 2013 20:46:19 +0000 (20:46 +0000)]
Add Mips16 patterns for sign extend byte and sign extend halfword.

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

11 years agoStruct byval: use the correct alignment for loads generated to load
Manman Ren [Mon, 7 Oct 2013 19:47:53 +0000 (19:47 +0000)]
Struct byval: use the correct alignment for loads generated to load
from struct byval to registers.

We used to pass 0 which means the alignment of PtrVT. Even when the alignment
of the struct is smaller than 4, the LOADs would have alignment of 4, and
further optimizations could combine the LOADs into a ldm, which would
cause crash.

The fix is to pass the alignment of the struct byval.

rdar://problem/15144402

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

11 years ago[mips] Coding style clean up.
Akira Hatanaka [Mon, 7 Oct 2013 19:33:02 +0000 (19:33 +0000)]
[mips] Coding style clean up.

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

11 years ago[mips] Disable tail merging when long branch pass is enabled.
Akira Hatanaka [Mon, 7 Oct 2013 19:13:53 +0000 (19:13 +0000)]
[mips] Disable tail merging when long branch pass is enabled.

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

11 years agoX86: Fix type check. Just because an integer type is illegal doesn't mean it's i64.
Benjamin Kramer [Mon, 7 Oct 2013 19:11:35 +0000 (19:11 +0000)]
X86: Fix type check. Just because an integer type is illegal doesn't mean it's i64.

Fixes PR17495, where an i24 triggered this code. It's intended to
optimize i64 loads on 32 bit x86.

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

11 years ago[mips] Define method MipsSubtarget::enableLongBranchPass.
Akira Hatanaka [Mon, 7 Oct 2013 19:06:57 +0000 (19:06 +0000)]
[mips] Define method MipsSubtarget::enableLongBranchPass.

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

11 years agoRevert r191834 until we measure the effect of this benchmarks and maybe find a better...
Alexey Samsonov [Mon, 7 Oct 2013 19:03:24 +0000 (19:03 +0000)]
Revert r191834 until we measure the effect of this benchmarks and maybe find a better way to fix it

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

11 years ago[mips] Fix definition of mfhi and mflo instructions to read from the whole
Akira Hatanaka [Mon, 7 Oct 2013 18:49:46 +0000 (18:49 +0000)]
[mips] Fix definition of mfhi and mflo instructions to read from the whole
accumulator instead of its sub-registers, $hi and $lo.

We need this change to prevent a mflo following a mtlo from reading an
unpredictable/undefined value, as shown in the following example:

mult $6, $7 // result of $6 * $7 is written to $lo and $hi.
mflo $2     // read lower 32-bit result from $lo.
mtlo $4     // write to $lo. the content of $hi becomes unpredictable.
mfhi $3     // read higher 32-bit from $hi, which has an unpredictable value.

I don't have a test case for this change that reliably reproduces the problem.

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

11 years agoFormally added an explicit enum for DWARF TLS support. No functionality change.
Richard Mitton [Mon, 7 Oct 2013 18:39:18 +0000 (18:39 +0000)]
Formally added an explicit enum for DWARF TLS support. No functionality change.

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

11 years agoChange objectsize intrinsic to accept different address spaces.
Matt Arsenault [Mon, 7 Oct 2013 18:06:48 +0000 (18:06 +0000)]
Change objectsize intrinsic to accept different address spaces.

Bitcasting everything to i8* won't work. Autoupgrade the old
intrinsic declarations to use the new mangling.

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

11 years ago[ARM] Improve build attributes emission.
Amara Emerson [Mon, 7 Oct 2013 16:55:23 +0000 (16:55 +0000)]
[ARM] Improve build attributes emission.

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

11 years ago[AArch64] Add support for NEON scalar arithmetic instructions:
Chad Rosier [Mon, 7 Oct 2013 16:36:15 +0000 (16:36 +0000)]
[AArch64] Add support for NEON scalar arithmetic instructions:
SQDMULH, SQRDMULH, FMULX, FRECPS, and FRSQRTS.

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

11 years ago[ARMv8] Add some disassembly tests for Thumb sevl/sevl.w
Joey Gouly [Mon, 7 Oct 2013 16:13:03 +0000 (16:13 +0000)]
[ARMv8] Add some disassembly tests for Thumb sevl/sevl.w

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

11 years agoRevert r191088, corresponding to r191823 to re-enable llvm-lto on cygming.
NAKAMURA Takumi [Mon, 7 Oct 2013 15:42:22 +0000 (15:42 +0000)]
Revert r191088, corresponding to r191823 to re-enable llvm-lto on cygming.

r191088 is "llvm/tools/Makefile: Suppress building llvm-lto on cygming, for now, probably due to LTO.dll."

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

11 years agoWindows/Process.inc: Fix for +Asserts. &Buf[0] is not guaranteed if size is zero.
NAKAMURA Takumi [Mon, 7 Oct 2013 15:33:30 +0000 (15:33 +0000)]
Windows/Process.inc: Fix for +Asserts. &Buf[0] is not guaranteed if size is zero.

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

11 years agoFix typo.
Rafael Espindola [Mon, 7 Oct 2013 13:57:59 +0000 (13:57 +0000)]
Fix typo.

Thanks to Sean Silva for noticing it.

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

11 years agoRemove dead code.
Rafael Espindola [Mon, 7 Oct 2013 13:54:50 +0000 (13:54 +0000)]
Remove dead code.

Support for exception handling in the legacy JIT was removed in r181354 and
this code was dead since then.

Thanks to Yaron Keren for noticing it.

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

11 years agoRemove getEHExceptionRegister and getEHHandlerRegister.
Rafael Espindola [Mon, 7 Oct 2013 13:39:22 +0000 (13:39 +0000)]
Remove getEHExceptionRegister and getEHHandlerRegister.

They haven't been used for a long time. Patch by MathOnNapkins.

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

11 years agoFix the documentation of getDefaultSubtargetFeatures.
Rafael Espindola [Mon, 7 Oct 2013 13:34:05 +0000 (13:34 +0000)]
Fix the documentation of getDefaultSubtargetFeatures.

Patch by David Nadlinger.

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

11 years agoARM: allow cortex-m0 to use hint instructions
Tim Northover [Mon, 7 Oct 2013 11:10:47 +0000 (11:10 +0000)]
ARM: allow cortex-m0 to use hint instructions

The hint instructions ("nop", "yield", etc) are mostly Thumb2-only, but have
been ported across to the v6M architecture. Fortunately, v6M seems to sit
nicely between v6 (thumb-1 only) and v6T2, so we can add a feature for it
fairly easily.

rdar://problem/15144406

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

11 years agoWindows: Be more explicit with Win32 APIs
David Majnemer [Mon, 7 Oct 2013 09:52:36 +0000 (09:52 +0000)]
Windows: Be more explicit with Win32 APIs

This addresses several issues in a similar vein:
 - Use the Unicode APIs when possible, running nm on clang shows that we
   only use Unicode APIs except for FormatMessage, CreateSemaphore, and
   GetModuleHandle.  AFAICT, the latter two are coming from MinGW and
   not LLVM itself.
 - Make getMainExecutable more resilient.  It previously considered
   return values of zero from ::GetModuleFileNameA to be acceptable.

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

11 years ago[Mips] Teach llvm-readobj to print MIPS-specific ELF program headers.
Simon Atanasyan [Mon, 7 Oct 2013 08:58:27 +0000 (08:58 +0000)]
[Mips] Teach llvm-readobj to print MIPS-specific ELF program headers.

The patch reviewed by Michael Spencer.
http://llvm-reviews.chandlerc.com/D1846

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

11 years agoRemove some instructions that seem to only exist to trick the filtering checks in...
Craig Topper [Mon, 7 Oct 2013 07:19:47 +0000 (07:19 +0000)]
Remove some instructions that seem to only exist to trick the filtering checks in the disassembler table creation. Just fix up the filter to let the real instruction through instead.

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

11 years agoRemove FsMOVAPSrr and friends. They have no patterns and are no longer selected anywhere.
Craig Topper [Mon, 7 Oct 2013 06:10:45 +0000 (06:10 +0000)]
Remove FsMOVAPSrr and friends. They have no patterns and are no longer selected anywhere.

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

11 years agoTeach X86 asm parser that VMOVAPSrr and other VEX-encoded register to register moves...
Craig Topper [Mon, 7 Oct 2013 05:42:48 +0000 (05:42 +0000)]
Teach X86 asm parser that VMOVAPSrr and other VEX-encoded register to register moves should be switched from using the MRMSrcReg form to the MRMDestReg form if the source register is a 64-bit extended register and the destination register is not.

This allows the instruction to be encoded using the 2-byte VEX form instead of the 3-byte VEX form. The GNU assembler has similar behavior and instruction selection already does this.

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

11 years agoAdd disassembler support for long encodings for INC/DEC in 32-bit mode.
Craig Topper [Mon, 7 Oct 2013 04:28:06 +0000 (04:28 +0000)]
Add disassembler support for long encodings for INC/DEC in 32-bit mode.

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

11 years agoRevert "Revert "Windows: Add support for unicode command lines""
David Majnemer [Mon, 7 Oct 2013 01:00:07 +0000 (01:00 +0000)]
Revert "Revert "Windows: Add support for unicode command lines""

This reverts commit r192070 which reverted r192069, I forgot to
regenerate the configure scripts.

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

11 years agoFix some assert messages to say the correct opcode name. Looks like one assert got...
Craig Topper [Sun, 6 Oct 2013 22:38:19 +0000 (22:38 +0000)]
Fix some assert messages to say the correct opcode name. Looks like one assert got copy and pasted to many places.

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

11 years agoRevert "Windows: Add support for unicode command lines"
David Majnemer [Sun, 6 Oct 2013 20:44:34 +0000 (20:44 +0000)]
Revert "Windows: Add support for unicode command lines"

This is causing MinGW bots to fail.
This reverts commit r192069.

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

11 years agoWindows: Add support for unicode command lines
David Majnemer [Sun, 6 Oct 2013 20:25:49 +0000 (20:25 +0000)]
Windows: Add support for unicode command lines

Summary:
The MSVCRT deliberately sends main() code-page specific characters.
This isn't too useful to LLVM as we end up converting the arguments to
UTF-16 and subsequently attempt to use the result as, for example, a
file name.  Instead, we need to have the ability to access the Unicode
command line and transform it to UTF-8.

This has the distinct advantage over using the MSVC-specific wmain()
function as our entry point because:
 - It doesn't work on cygwin.
 - It only work on MinGW with caveats and only then on certain versions.
 - We get to keep our entry point as main(). :)

N.B.  This patch includes fixes to other parts of lib/Support/Windows
s.t. we would be able to take advantage of getting the Unicode paths.
E.G.  clang spawning clang -cc1 would want to give it Unicode arguments.

Reviewers: aaron.ballman, Bigcheese, rnk, ruiu

Reviewed By: rnk

CC: llvm-commits, ygao
Differential Revision: http://llvm-reviews.chandlerc.com/D1834

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

11 years agoAdd support for aliases with linkonce_odr.
Rafael Espindola [Sun, 6 Oct 2013 15:10:43 +0000 (15:10 +0000)]
Add support for aliases with linkonce_odr.

This will be used to extend constructor aliases in clang.

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

11 years agoForce a CPU that doesn't have AVX, otherwise this test fails.
Benjamin Kramer [Sun, 6 Oct 2013 13:52:41 +0000 (13:52 +0000)]
Force a CPU that doesn't have AVX, otherwise this test fails.

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

11 years agoX86: Don't fold spills into SSE operations if the stack is unaligned.
Benjamin Kramer [Sun, 6 Oct 2013 13:48:22 +0000 (13:48 +0000)]
X86: Don't fold spills into SSE operations if the stack is unaligned.

Regalloc can emit unaligned spills nowadays, but we can't fold the
spills into SSE ops if we can't guarantee alignment. PR12250.

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

11 years agoAVX-512: added scalar convert instructions and intrinsics.
Elena Demikhovsky [Sun, 6 Oct 2013 13:11:09 +0000 (13:11 +0000)]
AVX-512: added scalar convert instructions and intrinsics.
Fixed load folding in VPERM2I instruction.

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

11 years ago[Mips] Add MIPS program header types.
Simon Atanasyan [Sun, 6 Oct 2013 08:49:41 +0000 (08:49 +0000)]
[Mips] Add MIPS program header types.

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

11 years ago[Sparc] Do not emit nop after fcmp* instruction with V9.
Venkatraman Govindaraju [Sun, 6 Oct 2013 07:06:44 +0000 (07:06 +0000)]
[Sparc] Do not emit nop after fcmp* instruction with V9.

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

11 years agoAVX-512: fixed shuffle lowering
Elena Demikhovsky [Sun, 6 Oct 2013 06:11:18 +0000 (06:11 +0000)]
AVX-512: fixed shuffle lowering
in case of BLEND and added VSHUFPS patterns.

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

11 years ago[Sparc] Custom lower addc/adde/subc/sube on i64 in sparc64.
Venkatraman Govindaraju [Sun, 6 Oct 2013 03:36:18 +0000 (03:36 +0000)]
[Sparc] Custom lower addc/adde/subc/sube on i64 in sparc64.
This is required because i64 is a legal type but addxcc/subxcc reads icc carry bit, which are 32 bit conditional codes.

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

11 years ago[Sparc] Use addxcc/subxcc for adde/sube instead of addx/subx.
Venkatraman Govindaraju [Sun, 6 Oct 2013 02:11:10 +0000 (02:11 +0000)]
[Sparc] Use addxcc/subxcc for adde/sube instead of addx/subx.
addx/subx does not modify conditional codes whereas addxcc/subxx does.

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

11 years agoAdd TBM instructions to loading folding tables.
Craig Topper [Sat, 5 Oct 2013 20:20:51 +0000 (20:20 +0000)]
Add TBM instructions to loading folding tables.

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

11 years agoRename this feature to "cx16" to match gcc's flag name. Apparently these strings
Nick Lewycky [Sat, 5 Oct 2013 20:11:44 +0000 (20:11 +0000)]
Rename this feature to "cx16" to match gcc's flag name. Apparently these strings
are directly tied to the flag names in clang with no remapping in between?

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

11 years agoSilencing an MSVC warning.
Aaron Ballman [Sat, 5 Oct 2013 19:41:41 +0000 (19:41 +0000)]
Silencing an MSVC warning.

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

11 years agoEmit a better error when running out of registers on inline asm.
Benjamin Kramer [Sat, 5 Oct 2013 19:33:37 +0000 (19:33 +0000)]
Emit a better error when running out of registers on inline asm.

The most likely case where this error happens is when the user specifies
too many register operands. Don't make it look like an internal LLVM bug
when we can see that the error is coming from an inline asm instruction.
For other instructions we keep the "ran out of registers" error.

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

11 years agoRemove underscores from TBM instruction names for consistency with other instruction...
Craig Topper [Sat, 5 Oct 2013 19:27:26 +0000 (19:27 +0000)]
Remove underscores from TBM instruction names for consistency with other instruction naming.

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

11 years agoRemove unneeded TBM intrinsics. The arithmetic/logical operation patterns are sufficient.
Craig Topper [Sat, 5 Oct 2013 19:22:59 +0000 (19:22 +0000)]
Remove unneeded TBM intrinsics. The arithmetic/logical operation patterns are sufficient.

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

11 years agoAdd an additional pattern for BLCI since opt can turn (not (add x, 1)) into (sub...
Craig Topper [Sat, 5 Oct 2013 17:17:53 +0000 (17:17 +0000)]
Add an additional pattern for BLCI since opt can turn (not (add x, 1)) into (sub -2, x).

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

11 years agoRemove some really nasty uses of hasRawTextSupport.
Rafael Espindola [Sat, 5 Oct 2013 16:42:21 +0000 (16:42 +0000)]
Remove some really nasty uses of hasRawTextSupport.

When MC was first added, targets could use hasRawTextSupport to keep features
working before they were added to the MC interface.

The design goal of MC is to provide an uniform api for printing assembly and
object files. Short of relaxations and other corner cases, a object file is
just another representation of the assembly.

It was never the intention that targets would keep doing things like

if (hasRawTextSupport())
  Set flags in one way.
else
  Set flags in another way.

When they do that they create two code paths and the object file is no longer
just another representation of the assembly. This also then requires testing
with llc -filetype=obj, which is extremelly brittle.

This patch removes some of these hacks by replacing them with smaller ones.
The ARM flag setting is trivial, so I just moved it to the constructor. For
Mips, the patch adds two temporary hack directives that allow the assembly
to represent the same things as the object file was already able to.

The hope is that the mips developers will replace the hack directives with
the same ones that gas uses and drop the -print-hack-directives flag.

I will also try to implement a target streamer interface, so that we can
move this out of the common code.

In summary, for any new work, two rules of the thumb are
  * Don't use "llc -filetype=obj" in tests.
  * Don't add calls to hasRawTextSupport.

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

11 years agolli: Plug leaks in the remote target external implementation.
Benjamin Kramer [Sat, 5 Oct 2013 11:53:20 +0000 (11:53 +0000)]
lli: Plug leaks in the remote target external implementation.

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

11 years agoImplement aarch64 neon instruction set AdvSIMD (Across).
Jiangning Liu [Sat, 5 Oct 2013 08:22:10 +0000 (08:22 +0000)]
Implement aarch64 neon instruction set AdvSIMD (Across).

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

11 years agoAdd OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences of MoveChi...
Craig Topper [Sat, 5 Oct 2013 05:38:16 +0000 (05:38 +0000)]
Add OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon.

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

11 years agoConvert test to FileCheck.
Rafael Espindola [Sat, 5 Oct 2013 02:58:36 +0000 (02:58 +0000)]
Convert test to FileCheck.

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

11 years ago[Sparc] Use correct alignment while loading/storing fp128 values.
Venkatraman Govindaraju [Sat, 5 Oct 2013 02:29:47 +0000 (02:29 +0000)]
[Sparc] Use correct alignment while loading/storing fp128 values.

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

11 years agoUpdating XFAILs for recent GOT tests
Andrew Kaylor [Sat, 5 Oct 2013 01:56:50 +0000 (01:56 +0000)]
Updating XFAILs for recent GOT tests

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

11 years agoAdding tests for multiple GOTs with MCJIT
Andrew Kaylor [Sat, 5 Oct 2013 01:53:19 +0000 (01:53 +0000)]
Adding tests for multiple GOTs with MCJIT

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

11 years agoAdding multiple GOT handling to RuntimeDyldELF
Andrew Kaylor [Sat, 5 Oct 2013 01:52:09 +0000 (01:52 +0000)]
Adding multiple GOT handling to RuntimeDyldELF

Patch by Ashok Thirumurthi

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

11 years agoDebug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_type
Manman Ren [Sat, 5 Oct 2013 01:43:03 +0000 (01:43 +0000)]
Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_type
is updated to use DITypeRef.

Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static
helper functions in DwarfCompileUnit. We already have a static helper function
"isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to
resolve the derived-from field. All three functions need to go across link
for derived-from fields, so we need to get hold of a type identifier map.

A pointer to DwarfDebug is also added to DbgVariable in order to resolve the
derived-from field.

Debug info verifier is updated to check a derived-from field is a TypeRef.
Verifier will not go across link for derived-from fields, in debug info finder,
we go across the link to add derived-from fields to types.

Function getDICompositeType is only used by dragonegg and since dragonegg does
not generate identifier for types, we use an empty map to resolve the
derived-from field.

When printing a derived-from field, we use DITypeRef::getName to either return
the type identifier or getName of the DIType.

A paired commit at clang is required due to changes to DIBuilder.

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

11 years agoReorganize some member variables and update a comment.
Eric Christopher [Sat, 5 Oct 2013 00:39:55 +0000 (00:39 +0000)]
Reorganize some member variables and update a comment.

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

11 years agoFix one comment and update another. Slightly reformat.
Eric Christopher [Sat, 5 Oct 2013 00:32:34 +0000 (00:32 +0000)]
Fix one comment and update another. Slightly reformat.

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

11 years ago[Sparc] Respect hasHardQuad parameter correctly when lowering SINT_TO_FP with fp128...
Venkatraman Govindaraju [Sat, 5 Oct 2013 00:31:41 +0000 (00:31 +0000)]
[Sparc] Respect hasHardQuad parameter correctly when lowering SINT_TO_FP with fp128 operand.

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

11 years agoAdd a resolve method on CompileUnit that forwards to DwarfDebug.
Eric Christopher [Sat, 5 Oct 2013 00:27:02 +0000 (00:27 +0000)]
Add a resolve method on CompileUnit that forwards to DwarfDebug.

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

11 years agoDebug info: Don't crash in SelectionDAGISel when a vreg that is being
Adrian Prantl [Sat, 5 Oct 2013 00:08:27 +0000 (00:08 +0000)]
Debug info: Don't crash in SelectionDAGISel when a vreg that is being
pointed to by a dbg_value belonging to a function argument is eliminated
during instruction selection.
rdar://problem/15094721.

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

11 years agoMake a bunch of CompileUnit member functions private.
Eric Christopher [Sat, 5 Oct 2013 00:05:51 +0000 (00:05 +0000)]
Make a bunch of CompileUnit member functions private.

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

11 years ago[Sparc] Correct the floating point conditional code mapping in GetOppositeBranchCondi...
Venkatraman Govindaraju [Fri, 4 Oct 2013 23:54:30 +0000 (23:54 +0000)]
[Sparc] Correct the floating point conditional code mapping in GetOppositeBranchCondition().

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

11 years agoMinor formatting/comment rewording/etc.
David Blaikie [Fri, 4 Oct 2013 23:52:02 +0000 (23:52 +0000)]
Minor formatting/comment rewording/etc.

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

11 years agoRemove odd use of this.
Eric Christopher [Fri, 4 Oct 2013 23:49:31 +0000 (23:49 +0000)]
Remove odd use of this.

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

11 years agoReformat some odd formattings.
Eric Christopher [Fri, 4 Oct 2013 23:49:29 +0000 (23:49 +0000)]
Reformat some odd formattings.

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

11 years agoTighten up some type arguments to functions. Where we expect a
Eric Christopher [Fri, 4 Oct 2013 23:49:26 +0000 (23:49 +0000)]
Tighten up some type arguments to functions. Where we expect a
scope, pass a scope.

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

11 years agoUpdatePHINodes in BasicBlockUtils should not crash on duplicate predecessors
Hal Finkel [Fri, 4 Oct 2013 23:41:05 +0000 (23:41 +0000)]
UpdatePHINodes in BasicBlockUtils should not crash on duplicate predecessors

UpdatePHINodes has an optimization to reuse an existing PHI node, where it
first deletes all of its entries and then replaces them. Unfortunately, in the
case where we had duplicate predecessors (which are allowed so long as the
associated PHI entries have the same value), the loop removing the existing PHI
entries from the to-be-reused PHI would assert (if that PHI was not the one
which had the duplicates).

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