platform/upstream/llvm.git
10 years agoAdd strchr(p, 0) -> p + strlen(p) to SimplifyLibCalls
Kai Nacke [Tue, 4 Feb 2014 05:55:16 +0000 (05:55 +0000)]
Add strchr(p, 0) -> p + strlen(p) to SimplifyLibCalls

Add the missing transformation strchr(p, 0) -> p + strlen(p) to SimplifyLibCalls
and remove the ToDo comment.

Reviewer: Duncan P.N. Exan Smith
llvm-svn: 200736

10 years agoARM: Enable use of relocation type tlsldo in debug info for tls data.
Kai Nacke [Tue, 4 Feb 2014 05:43:09 +0000 (05:43 +0000)]
ARM: Enable use of relocation type tlsldo in debug info for tls data.

This fixes PR18554.

Reviewers: Renato Golin, Keith Walker
llvm-svn: 200735

10 years ago[sanitizer] make __tls_get_addr interceptor (more) AS-safe. No good test so far,...
Kostya Serebryany [Tue, 4 Feb 2014 05:22:00 +0000 (05:22 +0000)]
[sanitizer] make __tls_get_addr interceptor (more) AS-safe. No good test so far, will keep trying.

llvm-svn: 200734

10 years ago[sanitizer] Handle TLS sizes for glibc < 2.13; As discussed in http://gcc.gnu.org...
Kostya Serebryany [Tue, 4 Feb 2014 04:09:38 +0000 (04:09 +0000)]
[sanitizer] Handle TLS sizes for glibc < 2.13; As discussed in gcc.gnu.org/PR60038, the hardcoded sizeof(struct thread); patch by Jakub Jelinek

llvm-svn: 200733

10 years agoIf we fail to attach, return an error rather than returning the success or failure
Jim Ingham [Tue, 4 Feb 2014 01:28:36 +0000 (01:28 +0000)]
If we fail to attach, return an error rather than returning the success or failure
of sending the error packet.

llvm-svn: 200732

10 years agoDebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero...
David Blaikie [Tue, 4 Feb 2014 01:23:52 +0000 (01:23 +0000)]
DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0}

A bunch of test cases needed to be cleaned up for this, many my fault -
when implementid imported modules I updated test cases by simply
duplicating the prior metadata field - which wasn't always the empty
metadata entry.

llvm-svn: 200731

10 years agoRevert r200150, "[CMake] tablegen(): Use -I <dir> according to the list by include_di...
NAKAMURA Takumi [Tue, 4 Feb 2014 01:17:12 +0000 (01:17 +0000)]
Revert r200150, "[CMake] tablegen(): Use -I <dir> according to the list by include_directories()."

It missed include/llvm/Target. Could I avoid GLOB_RECURSE anyways? :(
FYI, I intended to prune ${LLVM_MAIN_INCLUDE_DIR} in TableGen.cmake in r200150.

llvm-svn: 200730

10 years agoAdd implicit declarations of allocation functions when looking them up for
Richard Smith [Tue, 4 Feb 2014 01:14:30 +0000 (01:14 +0000)]
Add implicit declarations of allocation functions when looking them up for
redeclaration, not just when looking them up for a use -- we need the implicit
declaration to appropriately check various properties of them (notably, whether
they're deleted).

llvm-svn: 200729

10 years agoMove error handling down to getSymbolNMTypeChar.
Rafael Espindola [Tue, 4 Feb 2014 00:21:18 +0000 (00:21 +0000)]
Move error handling down to getSymbolNMTypeChar.

llvm-svn: 200727

10 years agoSelf-memcpy-elision and memcpy of constant byte to memset transforms don't care how...
Nick Lewycky [Tue, 4 Feb 2014 00:18:54 +0000 (00:18 +0000)]
Self-memcpy-elision and memcpy of constant byte to memset transforms don't care how many bytes you were trying to transfer. Sink that safety test after those transforms. Noticed by inspection.

llvm-svn: 200726

10 years agoFix UnwindAssembly memory leak by defining and using a shared UnwindAssemblySP type.
Jean-Daniel Dupas [Mon, 3 Feb 2014 23:49:47 +0000 (23:49 +0000)]
Fix UnwindAssembly memory leak by defining and using a shared UnwindAssemblySP type.

llvm-svn: 200725

10 years agoFix numeric.limits.members/traps.pass.cpp to pass on non-x86 architectures. Fixes...
Marshall Clow [Mon, 3 Feb 2014 23:26:56 +0000 (23:26 +0000)]
Fix numeric.limits.members/traps.pass.cpp to pass on non-x86 architectures. Fixes bug #18468

llvm-svn: 200724

10 years agoTidy up and reduce some comment redundancy.
Richard Smith [Mon, 3 Feb 2014 23:22:05 +0000 (23:22 +0000)]
Tidy up and reduce some comment redundancy.

llvm-svn: 200723

10 years agoDebugInfo: Fix for an improvement to DIBuilder to not emit {i32 0} for zero-length...
David Blaikie [Mon, 3 Feb 2014 23:08:59 +0000 (23:08 +0000)]
DebugInfo: Fix for an improvement to DIBuilder to not emit {i32 0} for zero-length arrays.

llvm-svn: 200722

10 years agoDIBuilder: simplify array generation to produce true zero-length arrays
David Blaikie [Mon, 3 Feb 2014 23:08:54 +0000 (23:08 +0000)]
DIBuilder: simplify array generation to produce true zero-length arrays

For some anachronistic reason we were producing {i32 0} for zero-length
debug info arrays.

(this change is paired with a Clang change and may cause temporary
buildbot noise)

Let's not.

llvm-svn: 200721

10 years agoAdd DEBUG_TYPE to SIAnnotateControlFlow
Matt Arsenault [Mon, 3 Feb 2014 22:58:05 +0000 (22:58 +0000)]
Add DEBUG_TYPE to SIAnnotateControlFlow

llvm-svn: 200720

10 years agoFix a -Wmicrosoft warning about an unrepresentable enum value
Reid Kleckner [Mon, 3 Feb 2014 22:20:34 +0000 (22:20 +0000)]
Fix a -Wmicrosoft warning about an unrepresentable enum value

In MSVC, enums are always signed unless you explicitly specify the type.

llvm-svn: 200719

10 years agoFix a -Wformat warning in ASTUnit.cpp
Reid Kleckner [Mon, 3 Feb 2014 22:20:24 +0000 (22:20 +0000)]
Fix a -Wformat warning in ASTUnit.cpp

llvm::sys::cas_flag is 'long' instead of 'uint32_t' on win32, because
that's what InterlockedIncrement is defined to accept.

I still don't know if we should be calling fprintf from ASTUnit.cpp
behind a getenv check.

llvm-svn: 200718

10 years agoinalloca: Don't remove dead arguments in the presence of inalloca args
Reid Kleckner [Mon, 3 Feb 2014 20:42:49 +0000 (20:42 +0000)]
inalloca: Don't remove dead arguments in the presence of inalloca args

It disturbs the layout of the parameters in memory and registers,
leading to problems in the backend.

The plan for optimizing internal inalloca functions going forward is to
essentially SROA the argument memory and demote any captured arguments
(things that aren't trivially written by a load or store) to an indirect
pointer to a static alloca.

llvm-svn: 200717

10 years ago[Mips] In case of executable file linking MIPS ABI requires to add even
Simon Atanasyan [Mon, 3 Feb 2014 20:10:40 +0000 (20:10 +0000)]
[Mips] In case of executable file linking MIPS ABI requires to add even
undefined symbols to '.dynsym' if these symbols have corresponding entries
in a global part of GOT.

llvm-svn: 200716

10 years ago[Mips] Unify #include guard names.
Simon Atanasyan [Mon, 3 Feb 2014 20:10:30 +0000 (20:10 +0000)]
[Mips] Unify #include guard names.

llvm-svn: 200715

10 years agoPR17846, PR17848: don't build a VarTemplateSpecializationDecl for a use of a
Richard Smith [Mon, 3 Feb 2014 20:09:56 +0000 (20:09 +0000)]
PR17846, PR17848: don't build a VarTemplateSpecializationDecl for a use of a
variable template until we know what the template arguments actually are.

llvm-svn: 200714

10 years ago<rdar://problem/15154623>
Enrico Granata [Mon, 3 Feb 2014 19:46:31 +0000 (19:46 +0000)]
<rdar://problem/15154623>

Move a couple formatters from category AppKit to CoreFoundation

llvm-svn: 200713

10 years agoUntabify.
Rui Ueyama [Mon, 3 Feb 2014 19:07:38 +0000 (19:07 +0000)]
Untabify.

llvm-svn: 200712

10 years ago[ms-cxxabi] Fix cast when structor replacement is an alias
Reid Kleckner [Mon, 3 Feb 2014 18:54:51 +0000 (18:54 +0000)]
[ms-cxxabi] Fix cast when structor replacement is an alias

llvm-svn: 200711

10 years agoAllow specifying a custom PathDiagnosticConsumer for use with the static analyzer.
Alexander Kornienko [Mon, 3 Feb 2014 18:37:50 +0000 (18:37 +0000)]
Allow specifying a custom PathDiagnosticConsumer for use with the static analyzer.

Summary:
Make objects returned by CreateAnalysisConsumer expose an interface,
that allows providing a custom PathDiagnosticConsumer, so that users can have
raw data in a form easily usable from the code (unlike plist/HTML in a file).

Reviewers: jordan_rose, krememek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2556

llvm-svn: 200710

10 years agoTest cases for NetBSD/eARM
Joerg Sonnenberger [Mon, 3 Feb 2014 17:46:52 +0000 (17:46 +0000)]
Test cases for NetBSD/eARM

llvm-svn: 200709

10 years agoARM: implement support for crypto intrinsics in arm_neon.h
Tim Northover [Mon, 3 Feb 2014 17:28:04 +0000 (17:28 +0000)]
ARM: implement support for crypto intrinsics in arm_neon.h

llvm-svn: 200708

10 years agoAArch64: use new non-polymorphic crypto intrinsics
Tim Northover [Mon, 3 Feb 2014 17:28:00 +0000 (17:28 +0000)]
AArch64: use new non-polymorphic crypto intrinsics

The LLVM backend now has invariant types on the various crypto-intrinsics,
because in all cases there's only really one interpretation.

llvm-svn: 200707

10 years agoAArch64 & ARM: refactor crypto intrinsics to take scalars
Tim Northover [Mon, 3 Feb 2014 17:27:49 +0000 (17:27 +0000)]
AArch64 & ARM: refactor crypto intrinsics to take scalars

Some of the SHA instructions take a scalar i32 as one argument (largely because
they work on 160-bit hash fragments). This wasn't reflected in the IR
previously, with ARM and AArch64 choosing different types (<4 x i32> and <1 x
i32> respectively) which was ugly.

This makes all the affected intrinsics take a uniform "i32", allowing them to
become non-polymorphic at the same time.

llvm-svn: 200706

10 years agoExpand vector bswap in LegalizeVectorOps
Hal Finkel [Mon, 3 Feb 2014 17:27:25 +0000 (17:27 +0000)]
Expand vector bswap in LegalizeVectorOps

ISD::BSWAP was missing from the list of node types that should be expanded
element-wise.

llvm-svn: 200705

10 years agoUndef'ing _WIN32_IE to silence an MSVC warning about redefining a macro value.
Aaron Ballman [Mon, 3 Feb 2014 17:20:26 +0000 (17:20 +0000)]
Undef'ing _WIN32_IE to silence an MSVC warning about redefining a macro value.

No functional change intended.

llvm-svn: 200704

10 years ago[libsanitizer] Workaround for https://code.google.com/p/address-sanitizer/issues...
Alexander Potapenko [Mon, 3 Feb 2014 16:42:29 +0000 (16:42 +0000)]
[libsanitizer] Workaround for https://code.google.com/p/address-sanitizer/issues/detail?id=261
If pthread_get_stacksize_np() returns 512K for the main thread on Mavericks, obtain the stack size from the current stack rlimit.

llvm-svn: 200703

10 years agoFix crash when handling an argument parsing-related warning.
Alexander Kornienko [Mon, 3 Feb 2014 15:55:35 +0000 (15:55 +0000)]
Fix crash when handling an argument parsing-related warning.

Summary: Don't crash on warnings coming before the translation unit starts.

Reviewers: klimek, djasper

Reviewed By: djasper

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2676

llvm-svn: 200702

10 years ago[libsanitizer] Follow-up for r200700: add the new header to CMakeLists.txt and make...
Alexander Potapenko [Mon, 3 Feb 2014 15:45:03 +0000 (15:45 +0000)]
[libsanitizer] Follow-up for r200700: add the new header to CMakeLists.txt and make it empty on non-Mac.

llvm-svn: 200701

10 years ago[ASan] Move GetMacosVersion() to sanitizer_common.
Alexander Potapenko [Mon, 3 Feb 2014 15:32:19 +0000 (15:32 +0000)]
[ASan] Move GetMacosVersion() to sanitizer_common.

llvm-svn: 200700

10 years agoAdd a note about Clang+LLVM on Sparc64.
Venkatraman Govindaraju [Mon, 3 Feb 2014 15:28:26 +0000 (15:28 +0000)]
Add a note about Clang+LLVM on Sparc64.

llvm-svn: 200699

10 years ago[asan] asan_device_setup.sh: allow overriding adb path.
Evgeniy Stepanov [Mon, 3 Feb 2014 15:12:09 +0000 (15:12 +0000)]
[asan] asan_device_setup.sh: allow overriding adb path.

llvm-svn: 200698

10 years agoRemove outdated & incorrect part of comment.
Eli Bendersky [Mon, 3 Feb 2014 14:33:51 +0000 (14:33 +0000)]
Remove outdated & incorrect part of comment.

This comment was copied over from another class in r34170, where it made sense.

llvm-svn: 200697

10 years ago[asan] Reinitialize allocator quarantine on activation.
Evgeniy Stepanov [Mon, 3 Feb 2014 14:19:08 +0000 (14:19 +0000)]
[asan] Reinitialize allocator quarantine on activation.

This is covered by AddressSanitizer.UAF_* tests in asan_test
with start_deactivated=1.

llvm-svn: 200696

10 years agoDon't use -ffunction-sections if -fno-function-sections is not supported in the compiler.
Evgeniy Stepanov [Mon, 3 Feb 2014 13:57:09 +0000 (13:57 +0000)]
Don't use -ffunction-sections if -fno-function-sections is not supported in the compiler.

This will disable -ffunction-sections in older versions of Clang where it
breaks build of sanitizer runtime library.

llvm-svn: 200695

10 years agoIntroduce SmallPtrSetImpl<T *> which allows insert, erase, count, and
Chandler Carruth [Mon, 3 Feb 2014 11:24:21 +0000 (11:24 +0000)]
Introduce SmallPtrSetImpl<T *> which allows insert, erase, count, and
iteration. This alows the majority of operations to be performed without
encoding a specific small size. It follows the model of
SmallVectorImpl<T>.

llvm-svn: 200688

10 years agoRename the non-templated base class of SmallPtrSet to
Chandler Carruth [Mon, 3 Feb 2014 11:24:18 +0000 (11:24 +0000)]
Rename the non-templated base class of SmallPtrSet to
'SmallPtrSetImplBase'. This more closely matches the organization of
SmallVector and should allow introducing a SmallPtrSetImpl which serves
the same purpose as SmallVectorImpl: isolating the element type from the
particular small size chosen. This in turn allows a lot of
simplification of APIs by not coding them against a specific small size
which is rarely needed.

llvm-svn: 200687

10 years ago[sanitizer] Resubmit r200683: disable -ffunction-sections.
Evgeniy Stepanov [Mon, 3 Feb 2014 11:16:41 +0000 (11:16 +0000)]
[sanitizer] Resubmit r200683: disable -ffunction-sections.

llvm-svn: 200686

10 years agoFix handling of -fno-function-sections, -fno-data-sections in clang driver.
Evgeniy Stepanov [Mon, 3 Feb 2014 11:11:37 +0000 (11:11 +0000)]
Fix handling of -fno-function-sections, -fno-data-sections in clang driver.

llvm-svn: 200685

10 years agoRevert r200683.
Evgeniy Stepanov [Mon, 3 Feb 2014 10:52:53 +0000 (10:52 +0000)]
Revert r200683.

-fno-function-sections is broken in Clang.

llvm-svn: 200684

10 years ago[sanitizer] Disable -ffunction-sections.
Evgeniy Stepanov [Mon, 3 Feb 2014 10:15:08 +0000 (10:15 +0000)]
[sanitizer] Disable -ffunction-sections.

It breaks when a binary is linked with --gc-sections: parts of sanitizer
interface get thrown away and inaccessible from dlopen-ed libs.

llvm-svn: 200683

10 years ago[msan] Fix a typo.
Evgeniy Stepanov [Mon, 3 Feb 2014 07:27:01 +0000 (07:27 +0000)]
[msan] Fix a typo.

Spotted by Keno Fischer.

llvm-svn: 200682

10 years agoFix typo 'uusal'.
Richard Smith [Mon, 3 Feb 2014 07:04:10 +0000 (07:04 +0000)]
Fix typo 'uusal'.

llvm-svn: 200681

10 years agoFix typo in CSS class name.
Richard Smith [Mon, 3 Feb 2014 07:02:19 +0000 (07:02 +0000)]
Fix typo in CSS class name.

llvm-svn: 200680

10 years agoClang 3.4 was released, make the boxes green.
Richard Smith [Mon, 3 Feb 2014 06:58:08 +0000 (06:58 +0000)]
Clang 3.4 was released, make the boxes green.

llvm-svn: 200679

10 years agoTests for DR331-350.
Richard Smith [Mon, 3 Feb 2014 06:34:23 +0000 (06:34 +0000)]
Tests for DR331-350.

llvm-svn: 200678

10 years agoRemove unnecessary include of AArch64GenInstrInfo.inc from AArch64Disassembler.cpp...
Craig Topper [Mon, 3 Feb 2014 06:33:17 +0000 (06:33 +0000)]
Remove unnecessary include of AArch64GenInstrInfo.inc from AArch64Disassembler.cpp. None of the GET_ defines were set that would make the include do anything.

llvm-svn: 200677

10 years ago[ELF] change LayoutBefore Reference to InGroup Reference
Shankar Easwaran [Mon, 3 Feb 2014 04:01:14 +0000 (04:01 +0000)]
[ELF] change LayoutBefore Reference to InGroup Reference

This makes it a lot easier for Section Group design.

llvm-svn: 200675

10 years agoUpdate C++ DR page now 3.4 has been released.
Richard Smith [Mon, 3 Feb 2014 02:40:25 +0000 (02:40 +0000)]
Update C++ DR page now 3.4 has been released.

llvm-svn: 200674

10 years agoImplement DR329. We already did the right thing here in C++98 mode, but r104014
Richard Smith [Mon, 3 Feb 2014 02:37:59 +0000 (02:37 +0000)]
Implement DR329. We already did the right thing here in C++98 mode, but r104014
(which implemented the DR) was disabled in C++11.

llvm-svn: 200673

10 years agoTests for DR321-330.
Richard Smith [Mon, 3 Feb 2014 02:13:49 +0000 (02:13 +0000)]
Tests for DR321-330.

llvm-svn: 200672

10 years agoTests for DR301-320.
Richard Smith [Mon, 3 Feb 2014 01:23:27 +0000 (01:23 +0000)]
Tests for DR301-320.

llvm-svn: 200671

10 years agoMS ABI: Fix some layout tests
David Majnemer [Mon, 3 Feb 2014 00:29:57 +0000 (00:29 +0000)]
MS ABI: Fix some layout tests

Some lines intended to be used for testing x86_64 ABI compatibility were
not firing because lines were annotated with the wrong FileCheck prefix:
X64 vs x64

N.B. Changes beyond just changing x64 to X64 were made, presumably
because other parts of the layout engine have changed.  I've verified
the changes to make sure that MSVC creates a compatible layout.

llvm-svn: 200670

10 years agoHandle O32/N64 ABIs for NetBSD/MIPS64. From Matt Thomas.
Joerg Sonnenberger [Sun, 2 Feb 2014 22:59:16 +0000 (22:59 +0000)]
Handle O32/N64 ABIs for NetBSD/MIPS64. From Matt Thomas.

llvm-svn: 200668

10 years agoReplace hasMipsN32ABIArg with hasMipsABIArg in preparation of o32/n64
Joerg Sonnenberger [Sun, 2 Feb 2014 22:54:18 +0000 (22:54 +0000)]
Replace hasMipsN32ABIArg with hasMipsABIArg in preparation of o32/n64
support.

llvm-svn: 200667

10 years agoUse a switch for the emulation handling.
Joerg Sonnenberger [Sun, 2 Feb 2014 22:50:34 +0000 (22:50 +0000)]
Use a switch for the emulation handling.

llvm-svn: 200666

10 years agoHandle compat support for EABI/old APCS compatibility on NetBSD/ARM.
Joerg Sonnenberger [Sun, 2 Feb 2014 22:47:37 +0000 (22:47 +0000)]
Handle compat support for EABI/old APCS compatibility on NetBSD/ARM.

llvm-svn: 200665

10 years agoLower llvm.expect intrinsic correctly for i1
Duncan P. N. Exon Smith [Sun, 2 Feb 2014 22:43:55 +0000 (22:43 +0000)]
Lower llvm.expect intrinsic correctly for i1

LowerExpectIntrinsic previously only understood the idiom of an expect
intrinsic followed by a comparison with zero. For llvm.expect.i1, the
comparison would be stripped by the early-cse pass.

Patch by Daniel Micay.

llvm-svn: 200664

10 years agoReplace hasMipsN32ABIArg by hasMipsABIArg to make it easier to add
Joerg Sonnenberger [Sun, 2 Feb 2014 22:40:33 +0000 (22:40 +0000)]
Replace hasMipsN32ABIArg by hasMipsABIArg to make it easier to add
support for o32 and n64.

llvm-svn: 200662

10 years agoPass down -mcpu for external assembler in thumb mode, too. From Matt Thomas.
Joerg Sonnenberger [Sun, 2 Feb 2014 22:37:14 +0000 (22:37 +0000)]
Pass down -mcpu for external assembler in thumb mode, too. From Matt Thomas.

llvm-svn: 200661

10 years agoMinor formatting improvement.
Joerg Sonnenberger [Sun, 2 Feb 2014 22:36:13 +0000 (22:36 +0000)]
Minor formatting improvement.

llvm-svn: 200659

10 years agoTest pre-defined macros of aarch64-netbsd.
Joerg Sonnenberger [Sun, 2 Feb 2014 21:55:32 +0000 (21:55 +0000)]
Test pre-defined macros of aarch64-netbsd.

llvm-svn: 200656

10 years agoNetBSD uses signed wchar_t on AArch64. It also wants __LITTLE_ENDIAN__ /
Joerg Sonnenberger [Sun, 2 Feb 2014 21:55:10 +0000 (21:55 +0000)]
NetBSD uses signed wchar_t on AArch64. It also wants __LITTLE_ENDIAN__ /
__BIG_ENDIAN__ as on other architectures.

llvm-svn: 200655

10 years agoUnaligned access is supported on ARMv6 and ARMv7 for the NetBSD target.
Joerg Sonnenberger [Sun, 2 Feb 2014 21:18:36 +0000 (21:18 +0000)]
Unaligned access is supported on ARMv6 and ARMv7 for the NetBSD target.
Patch from Matt Thomas.

llvm-svn: 200654

10 years agoclang-format: Let chromium style inherit google style's javascript tweaks.
Nico Weber [Sun, 2 Feb 2014 20:50:45 +0000 (20:50 +0000)]
clang-format: Let chromium style inherit google style's javascript tweaks.

llvm-svn: 200652

10 years ago[MachO] Add undefined atoms.
Joey Gouly [Sun, 2 Feb 2014 19:34:55 +0000 (19:34 +0000)]
[MachO] Add undefined atoms.

llvm-svn: 200649

10 years agoRemove failure decorators for FreeBSD bug
Ed Maste [Sun, 2 Feb 2014 19:29:50 +0000 (19:29 +0000)]
Remove failure decorators for FreeBSD bug

The issue described in llvm.org/pr18065 is actually due to FreeBSD bug
theads/186309 [1], which is now fixed in FreeBSD SVN r261354 [2] and will
be merged to release branches shortly.

Diagnosed and fixed by John Wolfe.

[1] http://www.freebsd.org/cgi/query-pr.cgi?pr=186309
[2] http://svnweb.freebsd.org/base?view=revision&revision=261354

llvm-svn: 200648

10 years agoUpdate header comment to match filename
Ed Maste [Sun, 2 Feb 2014 19:25:11 +0000 (19:25 +0000)]
Update header comment to match filename

llvm-svn: 200647

10 years agoUse libc++ on FreeBSD as on Darwin
Ed Maste [Sun, 2 Feb 2014 19:24:15 +0000 (19:24 +0000)]
Use libc++ on FreeBSD as on Darwin

This could use some refinement still, but the previous behaviour of adding
-stdlib=libstc++ on FreeBSD w/ Clang is the least likely case to work.

llvm.org/pr17910

llvm-svn: 200646

10 years ago[CMake] Move cmake_minimum_required(2.8.8) at the top.
NAKAMURA Takumi [Sun, 2 Feb 2014 16:59:36 +0000 (16:59 +0000)]
[CMake] Move cmake_minimum_required(2.8.8) at the top.

Suggested by Stephen Kelly.

llvm-svn: 200645

10 years ago[CMake] Untabify.
NAKAMURA Takumi [Sun, 2 Feb 2014 16:46:35 +0000 (16:46 +0000)]
[CMake] Untabify.

llvm-svn: 200644

10 years agoclang/CMakeLists.txt: Untabify.
NAKAMURA Takumi [Sun, 2 Feb 2014 16:46:07 +0000 (16:46 +0000)]
clang/CMakeLists.txt: Untabify.

llvm-svn: 200643

10 years agoclang/lib/ASTMatchers/Dynamic/CMakeLists.txt: redundant
NAKAMURA Takumi [Sun, 2 Feb 2014 16:46:03 +0000 (16:46 +0000)]
clang/lib/ASTMatchers/Dynamic/CMakeLists.txt: redundant

llvm-svn: 200642

10 years agoSema: Reject templates in all extern "C" contexts.
Benjamin Kramer [Sun, 2 Feb 2014 16:35:43 +0000 (16:35 +0000)]
Sema: Reject templates in all extern "C" contexts.

Otherwise we'd accept them if the LinkageDecl was not the direct
parent DeclContext. PR17968.

llvm-svn: 200641

10 years agoReport a correct end location for nameless parameters.
Benjamin Kramer [Sun, 2 Feb 2014 15:28:46 +0000 (15:28 +0000)]
Report a correct end location for nameless parameters.

Ranges before:
void test(void (*)(int), int, float);
          ~~~~~~~~~~~~~  ~~~~ ~~~~~~

Ranges after:
void test(void (*)(int), int, float);
          ~~~~~~~~~~~~~  ~~~  ~~~~~

This does not change the actual location of the ParmVarDecl, it still
points to the location where the name would be. PR17970.

llvm-svn: 200640

10 years agoRemove commented includes
Jean-Daniel Dupas [Sun, 2 Feb 2014 14:06:07 +0000 (14:06 +0000)]
Remove commented includes

llvm-svn: 200637

10 years ago[ELF] Customize dynamic table tag used for .got.plt section referencing.
Simon Atanasyan [Sun, 2 Feb 2014 12:19:29 +0000 (12:19 +0000)]
[ELF] Customize dynamic table tag used for .got.plt section referencing.

The patch reviewed by Shankar Easwaran and Rui Ueyama.

llvm-svn: 200630

10 years ago[Mips] Cleanup assembler code in the test.
Simon Atanasyan [Sun, 2 Feb 2014 12:19:20 +0000 (12:19 +0000)]
[Mips] Cleanup assembler code in the test.

llvm-svn: 200629

10 years agoTableGen/X86RecognizableInstr.h: Prune out-of-date "@param isSSE". [-Wdocumentation]
NAKAMURA Takumi [Sun, 2 Feb 2014 10:53:36 +0000 (10:53 +0000)]
TableGen/X86RecognizableInstr.h: Prune out-of-date "@param isSSE". [-Wdocumentation]

llvm-svn: 200628

10 years agoRevert r200555, r200545.
Evgeniy Stepanov [Sun, 2 Feb 2014 10:39:45 +0000 (10:39 +0000)]
Revert r200555, r200545.

These changes make it impossible to use ARM EHABI for stack unwinding without
enabling exceptions and break AddressSanitizer on ARM.

llvm-svn: 200627

10 years agoMerge x86 HasOpSizePrefix/HasOpSize16Prefix into a 2-bit OpSize field with 0 meaning...
Craig Topper [Sun, 2 Feb 2014 09:25:09 +0000 (09:25 +0000)]
Merge x86 HasOpSizePrefix/HasOpSize16Prefix into a 2-bit OpSize field with 0 meaning no 0x66 prefix in any mode. Rename Opsize16->OpSize32 and OpSize->OpSize16. The classes now refer to their operand size rather than the mode in which they need a 0x66 prefix. Hopefully can merge REX_W into this as OpSize64.

llvm-svn: 200626

10 years agoSimplify some code since VEX and EVEX instructions never have HasOpSizePrefix.
Craig Topper [Sun, 2 Feb 2014 07:46:05 +0000 (07:46 +0000)]
Simplify some code since VEX and EVEX instructions never have HasOpSizePrefix.

llvm-svn: 200625

10 years agoMerge HasVEXPrefix/HasEVEXPrefix/HasXOPPrefix into a 2-bit 'encoding' field in TSFlags.
Craig Topper [Sun, 2 Feb 2014 07:08:01 +0000 (07:08 +0000)]
Merge HasVEXPrefix/HasEVEXPrefix/HasXOPPrefix into a 2-bit 'encoding' field in TSFlags.

llvm-svn: 200624

10 years agoReplace PPC instruction-size code with MCInstrDesc getSize
Hal Finkel [Sun, 2 Feb 2014 06:12:27 +0000 (06:12 +0000)]
Replace PPC instruction-size code with MCInstrDesc getSize

As part of the cleanup done to enable the disassembler, the PPC instructions
now have a valid Size description field. This can now be used to replace some
custom logic in a few places to compute instruction sizes.

Patch by David Wiberg!

llvm-svn: 200623

10 years ago[Sema] Follow-up on r200521 for the -Wnon-literal-null-conversion warning and revert...
Argyrios Kyrtzidis [Sun, 2 Feb 2014 05:26:43 +0000 (05:26 +0000)]
[Sema] Follow-up on r200521 for the -Wnon-literal-null-conversion warning and revert its behavior for C++.

llvm-svn: 200622

10 years agoLoopVectorizer: Enable unrolling of conditional stores and the load/store
Arnold Schwaighofer [Sun, 2 Feb 2014 03:12:34 +0000 (03:12 +0000)]
LoopVectorizer: Enable unrolling of conditional stores and the load/store
unrolling heuristic per default

Benchmarking on x86_64 (thanks Chandler!) and ARM has shown those options speed
up some benchmarks while not causing any interesting regressions.

llvm-svn: 200621

10 years agoAdd some xfailed R600 tests for 64-bit private accesses.
Matt Arsenault [Sun, 2 Feb 2014 00:13:12 +0000 (00:13 +0000)]
Add some xfailed R600 tests for 64-bit private accesses.

llvm-svn: 200620

10 years agoR600/SI: Fix insertelement with dynamic indices.
Matt Arsenault [Sun, 2 Feb 2014 00:05:35 +0000 (00:05 +0000)]
R600/SI: Fix insertelement with dynamic indices.

This didn't work for any integer vectors, and didn't
work with some sizes of float vectors. This should now
work with all sizes of float and i32 vectors.

llvm-svn: 200619

10 years agoFix an assertion failure when building for the iOS simulator. rdar://15959009
Bob Wilson [Sat, 1 Feb 2014 21:06:21 +0000 (21:06 +0000)]
Fix an assertion failure when building for the iOS simulator. rdar://15959009

When building for i386 or x86_64 with IPHONEOS_DEPLOYMENT_TARGET set in the
environment, the toolchain correctly recognizes that the target platform is
the iOS simulator. The code in Darwin::addMinVersionArgs was not updated for
svn 197148, where isTargetIPhoneOS() was widely replaced by isTargetIOSBased().
This is kind of a strange case, though, because we probably ought to be
passing -ios_simulator_version_min to the linker, but according to the FIXME
in the code, we intentionally avoid that unless the -mios-simulator-version-min
option was used. I don't know whether it is safe to change that yet, so
for now, I am just fixing the assertion failure.

llvm-svn: 200618

10 years ago[Sparc] Set %o7 as the return address register instead of %i7 in MCRegisterInfo....
Venkatraman Govindaraju [Sat, 1 Feb 2014 18:54:16 +0000 (18:54 +0000)]
[Sparc] Set %o7 as the return address register instead of %i7 in MCRegisterInfo. Also, add CFI instructions to initialize the frame correctly.

llvm-svn: 200617

10 years agoARMTTI: We don't have 16 allocatable scalar registers
Arnold Schwaighofer [Sat, 1 Feb 2014 18:00:25 +0000 (18:00 +0000)]
ARMTTI: We don't have 16 allocatable scalar registers

This caused an regression on libquantum after enabling the new loop vectorizer
unroll heuristics.

llvm-svn: 200616

10 years agoMC: Fix .octa output for APInts with BitWidth > 128
David Woodhouse [Sat, 1 Feb 2014 16:52:33 +0000 (16:52 +0000)]
MC: Fix .octa output for APInts with BitWidth > 128

llvm-svn: 200615

10 years agoMC: Add support for .octa
David Woodhouse [Sat, 1 Feb 2014 16:20:59 +0000 (16:20 +0000)]
MC: Add support for .octa

This is a minimal implementation which accepts only constants rather than
full expressions, but that should be perfectly sufficient for all known
users for now.

Patch from PaX Team <pageexec@freemail.hu>

llvm-svn: 200614

10 years agoMC: Add AsmLexer::BigNum token for integers greater than 64 bits
David Woodhouse [Sat, 1 Feb 2014 16:20:54 +0000 (16:20 +0000)]
MC: Add AsmLexer::BigNum token for integers greater than 64 bits

This will be needed for .octa support, but we don't want to just use the
existing AsmLexer::Integer for it and then have to litter all its users
with explicit checks for the size, and make them use the new get APIntVal()
method.

So let the lexer produce an AsmLexer::Integer as before for numbers which
are small enough — which appears to cover what was previously a nasty
special case handling of numbers which don't fit in int64_t but *do* fit
in uint64_t.

Where the number is too large even for that, produce an AsmLexer::BigNum
instead. We do nothing with these except complain about them for now,
but that will be changed shortly...

Based on a patch from PaX Team <pageexec@freemail.hu>

llvm-svn: 200613