Commit Graph

157855 Commits

Author SHA1 Message Date
Anton Yartsev f5bcccee76 New message for cases when ownership is taken:
"+method_name: cannot take ownership of memory allocated by 'new'."
instead of the old
"Memory allocated by 'new' should be deallocated by 'delete', not +method_name"

llvm-svn: 190800
2013-09-16 17:51:25 +00:00
Rui Ueyama e0e28d059b [PECOFF] Take into account all sections when setting size fields in the PE header
This patch changes lld to go through all sections while calculating the size
for SizeOfCode, SizeOfInitializedData and SizeOfUninitializedData fields in the
PE header, instead of using only a small set of hard-coded sections.

This only really changes SizeOfInitializedData which didn't include .reloc
section before this patch.

Patch by Ron Ofir.

llvm-svn: 190799
2013-09-16 17:39:26 +00:00
Rui Ueyama d5e4f637ef [PECOFF] Add DISCARDABLE characteristic to .reloc section
This patch sets the IMAGE_SCN_MEM_DISCARDABLE characteristic to the base
relocations section in order to match MS PECOFF specification.

Patch by Ron Ofir.

llvm-svn: 190798
2013-09-16 17:35:13 +00:00
Tim Northover 9c30f7a4ff TableGen: fix constness of new comparison function.
libc++ didn't seem to like a non-const call operator.

llvm-svn: 190797
2013-09-16 17:33:40 +00:00
Argyrios Kyrtzidis 07ee5c44b4 [libclang] Don't report a DecayedType as "unexposed", report it as the original (as written) type.
Patch by Anders Waldenborg!

llvm-svn: 190796
2013-09-16 17:26:23 +00:00
Bill Schmidt c763c22469 [PowerPC] Fix PR17155 - Ignore COPY_TO_REGCLASS during emit.
Fast-isel generates a COPY_TO_REGCLASS for widening f32 to f64, which
is a nop on PPC64.  This is needed to keep the register class system
happy, but on the fast-isel path it is not removed before emit as it
is for DAG select.  Ignore this op when emitting instructions.

llvm-svn: 190795
2013-09-16 17:25:12 +00:00
Alexey Samsonov f71c88910c [ASan] Don't link with pthread on Android
llvm-svn: 190794
2013-09-16 16:51:49 +00:00
Tim Northover c74e691c27 TableGen: give asm match classes deterministic order.
TableGen was sorting the entries in some of its internal data
structures by pointer. This order filtered through to the final
matching table and affected the diagnostics produced on bad assembly
occasionally.

It also turns out STL algorithms are ridiculously easy to misuse on
containers with custom order methods. (No bugs before, or now that I
know of, but plenty in the middle).

This should fix the sanitizer bot, which ends up with weird pointers.

llvm-svn: 190793
2013-09-16 16:43:19 +00:00
Tim Northover f9aaafd97b AsmMatcher: emit subtarget feature enum in deterministic order.
llvm-svn: 190792
2013-09-16 16:43:16 +00:00
Benjamin Kramer 4d6efbb28a Add a define for the ObjFW runtime ABI version.
This removes __has_feature(objc_msg_lookup_stret), as it is not required
anymore after this patch.

Patch by Jonathan Schleifer!

llvm-svn: 190791
2013-09-16 16:31:49 +00:00
Arnold Schwaighofer 53e622cef4 Don't vectorize if there are outside loop users of the induction variable.
We would have to compute the pre increment value, either by computing it on
every loop iteration or by splitting the edge out of the loop and inserting a
computation for it there.

For now, just give up vectorizing such loops.

Fixes PR17179.

llvm-svn: 190790
2013-09-16 16:17:24 +00:00
Jordan Rose 3bde507a7a [analyzer] scan-build: add missing semicolon
Patch by Kevin Zheng!

llvm-svn: 190789
2013-09-16 16:17:18 +00:00
Alexey Samsonov 036a5bef2d [ASan] Split ASan unit tests into two different binaries:
(1) instrumented, i.e. compiled and linked with -fsanitize=address
(2) not instrumented, compiled w/o -fsanitize=address and linked with ASan runtime statically.

llvm-svn: 190788
2013-09-16 15:50:53 +00:00
Alexey Samsonov 48e256466a [ASan] Check that getSymbolizer() is defined. Turn magic mapping constants into named variables
llvm-svn: 190787
2013-09-16 15:45:06 +00:00
Alexey Samsonov ad7925e0c1 Minor enhancements for sanitizer_common build rules
llvm-svn: 190786
2013-09-16 15:43:23 +00:00
Ashok Thirumurthi 725ec4e84f Fixes a typo that causes Reserve(X) to both re-allocate the container and
change the last index (i.e. to X), which has unintended consequences for
Reserve(X) followed by Append().

llvm-svn: 190785
2013-09-16 14:17:27 +00:00
Wei Pan c354d2177a Handle PredefinedExpr with templates and lambdas
Summary:

- lambdas, blocks or captured statements in templates were not
  handled which causes codegen crashes.

Differential Revision: http://llvm-reviews.chandlerc.com/D1628

llvm-svn: 190784
2013-09-16 13:57:27 +00:00
Evgeniy Stepanov 08d649c024 [msan] Check return value of main: compiler-rt tests.
llvm-svn: 190783
2013-09-16 13:25:26 +00:00
Evgeniy Stepanov 604293fbb4 [msan] Check return value of main().
llvm-svn: 190782
2013-09-16 13:24:32 +00:00
Evgeniy Stepanov 65562f5281 [msan] Fix origin of deallocated memory.
MSan poisons deallocated memory but it used to give it an invalid origin value,
resulting in confusing reports. This change associates deallocation stack trace
with such memory.

Note that MSan does not have quarantine, and use-after-free detection is very
limited.

llvm-svn: 190781
2013-09-16 11:03:31 +00:00
Vladimir Medic 05bcde6d9a This patch implements Mips load/store instructions from/to coprocessor 2. Test cases are added.
llvm-svn: 190780
2013-09-16 10:29:42 +00:00
Benjamin Kramer 2ef689caf3 ARM: Deduplicate ConstantPoolValues.
llvm-svn: 190779
2013-09-16 10:17:31 +00:00
Daniel Sanders a6822ed91f Fix the build for git repositories with multiple remotes.
Summary:
When a git repository had multiple remotes, ${repository} will be set to a multiline string. This causes compilation errors in SVNVersion.inc.

Fix this by limiting the output of utils/GetRepositoryPath to the first remote (which is reasonably likely to be 'origin').

Reviewers: jordan_rose

CC: llvm-commits, t.p.northover

Differential Revision: http://llvm-reviews.chandlerc.com/D1659

llvm-svn: 190778
2013-09-16 09:25:49 +00:00
Richard Sandiford 109a7c6ff1 [SystemZ] Improve extload handling
The port originally had special patterns for extload, mapping them to the
same instructions as sextload.  It seemed neater to have patterns that
match "an extension that is allowed to be signed" and "an extension that
is allowed to be unsigned".

This was originally meant to be a clean-up, but it does improve the handling
of promoted integers a little, as shown by args-06.ll.

llvm-svn: 190777
2013-09-16 09:03:10 +00:00
Craig Topper 31db3a2efc Make F16C feature imply AVX. Matches GCC behavior.
llvm-svn: 190776
2013-09-16 04:54:13 +00:00
Craig Topper a6d204ec68 Make F16C feature flag imply AVX rather than just checking both at the patterns.
llvm-svn: 190775
2013-09-16 04:29:58 +00:00
NAKAMURA Takumi c5d86153ed Prune "return" after llvm_unreachable(). It was redundant.
llvm-svn: 190774
2013-09-16 01:58:47 +00:00
Peter Collingbourne 3fa50f9b05 Implement function prefix data as an IR feature.
Previous discussion:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063909.html

Differential Revision: http://llvm-reviews.chandlerc.com/D1191

llvm-svn: 190773
2013-09-16 01:08:15 +00:00
Rui Ueyama 3ee2bf6a62 [PECOFF] Use a dummy file as an "input file" for Idata atoms.
llvm-svn: 190772
2013-09-15 22:33:15 +00:00
Hal Finkel 40c34781b5 PPC: Don't restrict lvsl generation to after type legalization
This is a re-commit of r190764, with an extra check to make sure that we're not
performing the transformation on illegal types (a small test case has been
added for this as well).

Original commit message:

The PPC backend uses a target-specific DAG combine to turn unaligned Altivec
loads into a permutation-based sequence when possible. Unfortunately, the
target-specific DAG combine is not always called on all loads of interest
(sometimes the routines in DAGCombine call CombineTo such that the new node and
users are not added to the worklist); allowing the combine to trigger early
(before type legalization) mitigates this problem. Because the autovectorizers
only create legal vector types, I don't expect a lot of cases where this
optimization is enabled by type legalization in practice.

llvm-svn: 190771
2013-09-15 22:09:58 +00:00
Benjamin Kramer 7d6052687e Replace some unnecessary vector copies with references.
llvm-svn: 190770
2013-09-15 22:04:42 +00:00
Benjamin Kramer ac511cac77 ELF: Add support for the exclude section bit for gas compat.
llvm-svn: 190769
2013-09-15 19:53:20 +00:00
David Majnemer a4b521b7fc MC: Add support for '?' flags in .section directives
Summary:
The '?' flag uses the last section group if the last had a section
group.  We treat combining an explicit section group and the '?' as a
hard error.

This fixes PR17198.

Reviewers: rafael, bkramer

Reviewed By: bkramer

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1686

llvm-svn: 190768
2013-09-15 19:24:16 +00:00
Kai Nacke 8539b4637b Fix alignment of unwind data.
For alignment purposes, the instruction array will always have an even
number of entries, with the final entry potentially unused (in which
case the array will be one longer than indicated by the count of unwind
codes field).

Reviewed by Anton Korobeynikov, Charles Davis and Nico Rieck.

llvm-svn: 190767
2013-09-15 18:01:09 +00:00
Kai Nacke 74adc8a457 Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEH
data structures.

The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB
instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding
the VK_COFF_IMGREL32 modifier to the symbol reference.
Change also references to start and end of the SEH range of a function
as offsets to start of the function.

Reviewed by Jim Grosbach, Charles Davis and Nico Rieck.

llvm-svn: 190766
2013-09-15 17:46:46 +00:00
Hal Finkel 31025a6325 Revert r190764: PPC: Don't restrict lvsl generation to after type legalization
This is causing test-suite failures.

Original commit message:

The PPC backend uses a target-specific DAG combine to turn unaligned Altivec
loads into a permutation-based sequence when possible. Unfortunately, the
target-specific DAG combine is not always called on all loads of interest
(sometimes the routines in DAGCombine call CombineTo such that the new node and
users are not added to the worklist); allowing the combine to trigger early
(before type legalization) mitigates this problem. Because the autovectorizers
only create legal vector types, I don't expect a lot of cases where this
optimization is enabled by type legalization in practice.

llvm-svn: 190765
2013-09-15 15:41:11 +00:00
Hal Finkel 2945d4e916 PPC: Don't restrict lvsl generation to after type legalization
The PPC backend uses a target-specific DAG combine to turn unaligned Altivec
loads into a permutation-based sequence when possible. Unfortunately, the
target-specific DAG combine is not always called on all loads of interest
(sometimes the routines in DAGCombine call CombineTo such that the new node and
users are not added to the worklist); allowing the combine to trigger early
(before type legalization) mitigates this problem. Because the autovectorizers
only create legal vector types, I don't expect a lot of cases where this
optimization is enabled by type legalization in practice.

llvm-svn: 190764
2013-09-15 15:20:54 +00:00
Hal Finkel 31658834e6 Prevent assert in CombinerGlobalAA with null values
DAGCombiner::isAlias can be called with SrcValue1 or SrcValue2 null, and we
can't use AA in this case (if we try, then the casting code in AA will assert).

llvm-svn: 190763
2013-09-15 02:19:49 +00:00
Reed Kotler 655531521e Expand the mask capability for deciding which functions are mips16 and mips32
so it can be better used for general interoperability testing between mips32
and mips16.

llvm-svn: 190762
2013-09-15 02:09:08 +00:00
Benjamin Kramer 43cc98a78d Remove unused StringRef that no compiler warned about, I wonder why.
llvm-svn: 190759
2013-09-14 22:55:54 +00:00
Joerg Sonnenberger 97fc3834b8 Output soname.
llvm-svn: 190758
2013-09-14 19:53:51 +00:00
Michael Sartain 2225ac73cc Clean up RegisterContextPOSIX. Renamed to POSIXBreakpointProtocol.
Will clean up header files and m_register_infos shortly.

llvm-svn: 190757
2013-09-14 18:44:01 +00:00
Howard Hinnant 3b2d7ee18c Marshall Clow: LWG Issue 2056: future_errc enums start with value 0 (invalid value for broken_promise).
llvm-svn: 190756
2013-09-14 18:20:10 +00:00
Ed Schouten 401aebab93 Make __has_extension(c_thread_local) work.
Unlike C++11's "thread_local" keyword, C11's "_Thread_local" is in the
reserved namespace, meaning we provide it unconditionally; it is marked
as KEYALL in TokenKinds.def.

This means that like all the other C11 keywords, we can expose its
presence through __has_extension().

llvm-svn: 190755
2013-09-14 16:17:20 +00:00
Ben Langmuir 8eb45a4ef6 Add the remaining Intel SHA instructions
Also assembly/disassembly tests, and for sha256rnds2, aliases with an explicit
xmm0 dependency.

llvm-svn: 190754
2013-09-14 15:03:21 +00:00
Joerg Sonnenberger 9e5676c5c8 If .bss doesn't exist, set _end/end based on .data.
llvm-svn: 190753
2013-09-14 13:59:49 +00:00
Joerg Sonnenberger 4263d8b35d Add _end symbol for dynamic libraries. At least brk/sbrk in libc on
NetBSD need it.

llvm-svn: 190752
2013-09-14 13:45:29 +00:00
Serge Pavlov d5489074e6 Avoid getting an argument of allocation function if it does not exist.
This is a fix to PR12778: in erroneous code an allocation function
can be declared with no arguments, quering the first argument in this case
causes assertion violation.

llvm-svn: 190751
2013-09-14 12:00:01 +00:00
Robert Wilhelm 042f10ce41 Fix spelling.
llvm-svn: 190750
2013-09-14 09:34:59 +00:00
Robert Wilhelm 516be56fd9 Fix spelling.
llvm-svn: 190749
2013-09-14 09:34:24 +00:00