Commit Graph

232405 Commits

Author SHA1 Message Date
Benjamin Kramer 4ec6e9d50c [sparc] Remove some unused (and undefined) declarations.
No functionality change.

llvm-svn: 270981
2016-05-27 10:19:03 +00:00
Benjamin Kramer 922efd7a67 [hexagon] Move BlockRanges and RDF stuff into the llvm namespace.
No functional change intended.

llvm-svn: 270980
2016-05-27 10:06:40 +00:00
Benjamin Kramer 797fb96a9c [sparc] Move LEON passes into llvm namespace.
Also give them library visiblity while there.

llvm-svn: 270979
2016-05-27 10:06:27 +00:00
George Rimar e79fc3efca Revert r270977 ([llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.)
It broke buildbot:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/13585/steps/build/logs/stdio

Initial commit message:
[llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.

This patch is strongly based on previously reverted D20331.
(because of gnuutils < 2.26 does not support compressed debug sections in non zlib-gnu style)

Difference that this patch supports both zlib and zlib-gnu styles.

-compress-debug-sections option now supports next values:

-compress-debug-sections=zlib-gnu
-compress-debug-sections=zlib
-compress-debug-sections=none
Previously specifying -compress-debug-sections enabled zlib-gnu compression,
so anyone can put "-compress-debug-sections=zlib-gnu" to restore the behavior
that was before this patch for case when compression was enabled.

Differential revision: http://reviews.llvm.org/D20676

llvm-svn: 270978
2016-05-27 10:06:16 +00:00
George Rimar 48dcd2b806 [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.
This patch is strongly based on previously reverted D20331.
(because of gnuutils < 2.26 does not support compressed debug sections in non zlib-gnu style)

Difference that this patch supports both zlib and zlib-gnu styles.

-compress-debug-sections option now supports next values:

-compress-debug-sections=zlib-gnu
-compress-debug-sections=zlib
-compress-debug-sections=none
Previously specifying -compress-debug-sections enabled zlib-gnu compression,
so anyone can put "-compress-debug-sections=zlib-gnu" to restore the behavior
that was before this patch for case when compression was enabled.

Differential revision: http://reviews.llvm.org/D20676

llvm-svn: 270977
2016-05-27 09:58:08 +00:00
Simon Pilgrim 4642a57fbf Revert: r270973 - [X86][SSE] Replace (V)PMOVSX and (V)PMOVZX integer extension intrinsics with generic IR (llvm)
llvm-svn: 270976
2016-05-27 09:02:25 +00:00
Daniel Jasper 99302edd1c clang-format: Allow splitting the line after /**/-comments.
While it might change the meaning of the comment in rare circumstances,
it is better than violating the column limit.

llvm-svn: 270975
2016-05-27 08:59:34 +00:00
Dmitry Polukhin 5fa681ee78 [MSVC2015] Fix mangling for static variables initialization guards
It seems that suffix '@4HA' was omitted for unknown reason. It is
non-cont non-volatile 'int' type of normal variable TSS.

Differential revision: http://reviews.llvm.org/D20683

llvm-svn: 270974
2016-05-27 08:52:34 +00:00
Simon Pilgrim c013e5737b [X86][SSE] Replace (V)PMOVSX and (V)PMOVZX integer extension intrinsics with generic IR (llvm)
This patch removes the llvm intrinsics VPMOVSX and (V)PMOVZX sign/zero extension intrinsics and auto-upgrades to SEXT/ZEXT calls instead. We already did this for SSE41 PMOVSX sometime ago so much of that implementation can be reused.

A companion patch (D20684) removes/auto-upgrade the clang intrinsics.

Differential Revision: http://reviews.llvm.org/D20686

llvm-svn: 270973
2016-05-27 08:49:15 +00:00
Asiri Rathnayake 85624c5de3 [libunwind] Disable cross-unwinding by default.
Cross unwinding requires larger sizes for unw_context_t and unw_cursor_t
buffers (large enough to hold the VRS of any architecture). This is not
desirable for the most common situation where libunwind is used for native
unwinding only.

This patch makes native unwinding the default build configuration. This
will start testing the tigher (compile-time) bounds of unw_context_t
and unw_cursor_t buffers for each architecture.

Change-Id: Ic61c476a75603ca4812959c233cfe56f83dc0b00
llvm-svn: 270972
2016-05-27 08:29:27 +00:00
Eric Liu 1ef68456cf [clang-format] moved unit tests related to replacements cleaner from FormatTest.cpp to CleanUpTest.cpp.
llvm-svn: 270971
2016-05-27 08:20:02 +00:00
Craig Topper 32578b7dcf [AVX512][Builtin] Fix palignr intrinsic for avx512vlbw. The immediate should not be multiplied by 8.
The 512-bit version was fixed recently but this was missed.

llvm-svn: 270970
2016-05-27 06:59:39 +00:00
Sean Silva e5e819b7d7 [profile] Avoid unused variable warning.
llvm-svn: 270969
2016-05-27 06:15:13 +00:00
Peter Collingbourne 5079f3b727 Update LLD for D20550.
Differential Revision: http://reviews.llvm.org/D20704

llvm-svn: 270968
2016-05-27 05:21:45 +00:00
Peter Collingbourne 1eaa97f439 Linker: teach the IR mover to return llvm::Error.
This will be needed in order to consistently return an Error
to clients of the API being developed in D20268.

Differential Revision: http://reviews.llvm.org/D20550

llvm-svn: 270967
2016-05-27 05:21:35 +00:00
Sean Silva 8ef190c7b0 Make -L description a bit more precise.
llvm-svn: 270966
2016-05-27 04:48:26 +00:00
Sean Silva 3b536d0916 Explain a bit better what --start-lib and --end-lib do.
llvm-svn: 270965
2016-05-27 04:48:24 +00:00
Sean Silva 688fade4dd Add a help description for --threads to avoid confusion.
llvm-svn: 270964
2016-05-27 04:48:21 +00:00
Sean Silva 2c1a9da83f --threads is a flag, not a number
We would previously accept `--threads=4`, but this option just turns on
threading and does not specify a number of threads.

I ran into this by accident because I was passing `--threads=<n>` but
the number didn't seem to affect anything.

llvm-svn: 270963
2016-05-27 04:30:27 +00:00
Alexey Bataev 18c4852607 [OPENMP] Fixed processing of '-fopenmp-version=' option and test.
llvm-svn: 270962
2016-05-27 04:13:39 +00:00
Todd Fiala 873a2ab4be fix up lldb-server platform on Apple hosts
r259714 introduces the transport method into the
URL passed to the gdb-remote stub.  On debugserver,
this is not supported and prevented debugserver from
being launched by lldb-server in platform mode.

This change skips the transport method addition from
r259714 when on Apple hosts.

llvm-svn: 270961
2016-05-27 04:04:52 +00:00
Zachary Turner b393d95359 [codeview] Remove StreamReader copying method.
Since we want to move toward zero-copy access to stream data, we
want to remove all instances of copying operations.  So get rid
of some of those here.

Differential Revision: http://reviews.llvm.org/D20720
Reviewed By: ruiu

llvm-svn: 270960
2016-05-27 03:51:53 +00:00
Pete Cooper 18e9102a85 Don't allocate unnecessarily in APInt::operator[+-]. NFC.
APInt::operator+(uint64_t) just forwarded to operator+(const APInt&).

Constructing the APInt for the RHS takes an allocation which isn't
required.  Also, for APInt's in the slow path, operator+ would
call add() internally which iterates over both arrays of values.  Instead
we can use add_1 and sub_1 which only iterate while there is something to do.

Using the memory for 'opt -O2 verify-uselistorder.lto.opt.bc -o opt.bc'
(see r236629 for details), this reduces the number of allocations from
23.9M to 22.7M.

llvm-svn: 270959
2016-05-27 03:42:17 +00:00
Dan Liew 8c11fce707 [LibFuzzer] Refactor declaration of tests in CMake.
Add a new CMake function (``add_libfuzzer_test()``) to simplify
declaration of executables for testing LibFuzzer and use it to
reorganise how tests are declared.

Note that configuration of the lit configuration files has been moved
as late as possible because we are going to need to disable some tests
for some platforms and we will need to propagate this information into
the lit configuration.

Note the code for custom mains was removed because no tests are
currently written for this and Kostya seems happy to remove this.

Differential Revision: http://reviews.llvm.org/D20706

llvm-svn: 270958
2016-05-27 03:14:40 +00:00
Rui Ueyama 0d70ccd895 Remove use of is_trivially_constructible.
type_traits header in libstdc++ 4.8 does not define is_trivially_contructible
so the code doesn't compile with it.

In this file we are using the trait for assertion to provide a better
error message. Removing it doesn't change the meaning of the code.

Differential Revision: http://reviews.llvm.org/D20719

llvm-svn: 270957
2016-05-27 02:47:38 +00:00
Lang Hames 47bee32a57 [Support] Remove a stale comment.
This comment was included in Peter Collingbourne's original version of
StringError (see http://reviews.llvm.org/D20550), where it made sense. It was
accidentally copied over with the rest of the class, but no longer applies.

llvm-svn: 270956
2016-05-27 02:43:15 +00:00
Pete Cooper 1929b5539a Form objc_storeStrong in the presence of bitcasts.
objc_storeStrong can be formed from a sequence such as

  %0 = tail call i8* @objc_retain(i8* %p) nounwind
  %tmp = load i8*, i8** @x, align 8
  store i8* %0, i8** @x, align 8
  tail call void @objc_release(i8* %tmp) nounwind

The code was already looking through bitcasts for most of the values
involved, but had missed one case where the pointer operand for the
store was a bitcast.  Ultimately the pointer for the load and store
have to be the same value, after stripping casts.

llvm-svn: 270955
2016-05-27 02:13:53 +00:00
Zachary Turner b822424f47 [codeview] #include missing header breaking builds.
llvm-svn: 270954
2016-05-27 02:12:35 +00:00
David Majnemer e6abf3d29f [CodeGen] Don't crash when sizeof(long) != 4 for some intrins
_InterlockedIncrement and _InterlockedDecrement have 'long' in their
prototypes.  We assumed 'long' was the same size as an i32 which is
incorrect for other targets.

This fixes PR27892.

llvm-svn: 270953
2016-05-27 02:06:19 +00:00
David Majnemer b2c5720bfd [Intrin.h] Sort the __read[fg]s intrinsics
No functional change is intended.

llvm-svn: 270952
2016-05-27 02:06:14 +00:00
Zachary Turner 8dbe3629a0 [codeview,pdb] Try really hard to conserve memory when reading.
PDBs can be extremely large.  We're already mapping the entire
PDB into the process's address space, but to make matters worse
the blocks of the PDB are not arranged contiguously.  So, when
we have something like an array or a string embedded into the
stream, we have to make a copy.  Since it's convenient to use
traditional data structures to iterate and manipulate these
records, we need the memory to be contiguous.

As a result of this, we were using roughly twice as much memory
as the file size of the PDB, because every stream was copied
out and re-stitched together contiguously.

This patch addresses this by improving the MappedBlockStream
to allocate from a BumpPtrAllocator only when a read requires
a discontiguous read.  Furthermore, it introduces some data
structures backed by a stream which can iterate over both
fixed and variable length records of a PDB.  Since everything
is backed by a stream and not a buffer, we can read almost
everything from the PDB with zero copies.

Differential Revision: http://reviews.llvm.org/D20654
Reviewed By: ruiu

llvm-svn: 270951
2016-05-27 01:54:44 +00:00
Lang Hames bd8e954216 [Support] Rename unconvertibleErrorCode to inconvertibleErrorCode.
Based on a totally scientific, 30 second google search "in-" appears to be the
preferred prefix.

llvm-svn: 270950
2016-05-27 01:54:25 +00:00
Derek Bruening 850d47ce64 [esan] Fix workingset-memset test failure
Fixes an esan workingset-memset test failure by switching to malloc to
avoid a shadow mapping issue with mmap in certain situations that will be
fully fixed separately.

llvm-svn: 270949
2016-05-27 01:47:27 +00:00
Lang Hames c5e0bbd781 [Support] Add a StringError convenience class to Error.h
StringError can be used to represent Errors that aren't recoverable based on
the error type, but that have a useful error message that can be reported to
the user or logged.

llvm-svn: 270948
2016-05-27 01:37:32 +00:00
Kostya Serebryany 76dacb4ba9 [libFuzzer] make check-fuzzer a bit faster
llvm-svn: 270947
2016-05-27 01:12:21 +00:00
Michael Zolotukhin 15e745133e [LoopUnrollAnalyzer] Bail out instead of dying with assert when facing huge index.
This fixes PR27902.

llvm-svn: 270946
2016-05-27 00:55:16 +00:00
Kostya Serebryany 0edb563f27 [libFuzzer] make OOM-handling more portable. Instead of sending a signal to the main fuzzing thread, print the message in the getrusage thread and exit.
llvm-svn: 270945
2016-05-27 00:54:15 +00:00
Mehdi Amini 9ee054aea8 ValueMapper: fix typo in minor optimization on constant mapping (NFC)
If every operands of a constant are mapping to themselves, and the
type does not change, we have an early exit as acknowledged in the
comment:

  // Otherwise, we have some other constant to remap.  Start by checking to see
  // if all operands have an identity remapping.

However instead of checking for identity the code was checking if the
operands were mapped to the constant itself, which is rarely true.

As a consequence, the coverage report showed that the early exit was
never taken.

llvm-svn: 270944
2016-05-27 00:32:12 +00:00
Rui Ueyama 6816367a27 pdbdump: print out the name of the stream 0.
Differential Revision: http://reviews.llvm.org/D20712

llvm-svn: 270943
2016-05-27 00:32:07 +00:00
Kostya Serebryany 8fc3a27c5c [libFuzzer] more refactoring: make sure CurrentUnitData is awlays a valid pointer to read from
llvm-svn: 270942
2016-05-27 00:21:33 +00:00
Greg Clayton 4141c7af82 Add a new "lldb" log channel named "demangle". If we have crashes that are related to demangling, we now can enable this logging and we will be able to reproduce demangler crashes (usually due to overflowing the stack) without needing someone's project.
<rdar://problem/25221899>                                                                     

llvm-svn: 270941
2016-05-27 00:17:18 +00:00
NAKAMURA Takumi 2e20c81353 OpenMPClause.h: Fix r270882. [-Wdocumentation]
llvm-svn: 270940
2016-05-27 00:15:11 +00:00
Jim Ingham 1cf8f5937a Lock the access to the BreakpointLocationCollection.
I was investigating an odd crash in lldb when the breakpoint site
goes to bump the hit counts of the locations it implements.  I noticed
that the BreakpointLocationCollection wasn't locking itself for access and
modification.  I don't see how that can cause the crash I'm seeing, but still
this is the right thing to do...

<rdar://problem/25178205>

llvm-svn: 270939
2016-05-26 23:55:04 +00:00
Jim Ingham 13683c65cd Don't cache the stret/vrs. non-stret code pointer as static data in the runtime.
It belongs in the instance, since then when you change architectures it can be adjusted
appropriately.

<rdar://problem/26308079>

llvm-svn: 270938
2016-05-26 23:49:49 +00:00
Rui Ueyama 9dc034dba1 pdbdump: Add -raw-all to enable all -raw-* flags.
Differential Revision: http://reviews.llvm.org/D20707

llvm-svn: 270937
2016-05-26 23:26:55 +00:00
Hans Wennborg 27bf850a4e Sort my entry in CODE_OWNERS.TXT
llvm-svn: 270936
2016-05-26 23:10:37 +00:00
Mitch Bodart 05aeeb5cf1 [CodeGen] Fix problem with X86 byte registers in CriticalAntiDepBreaker
CriticalAntiDepBreaker was not correctly tracking defs of the high X86 byte
registers, leading to incorrect use of a busy register to break an
antidependence.

Fixes pr27681, and its duplicates pr27580, pr27804.

Differential Revision: http://reviews.llvm.org/D20456

llvm-svn: 270935
2016-05-26 23:08:52 +00:00
Rui Ueyama 18695f9708 Fix typo.
llvm-svn: 270934
2016-05-26 23:01:05 +00:00
Easwaran Raman 5fe04a1d8e Attach profile summary in IR based instrumentation pass.
Differential revision: http://reviews.llvm.org/D20655

llvm-svn: 270933
2016-05-26 22:57:11 +00:00
Greg Clayton ceeb521127 With -gmodules, we have been having a harder time always finding a type when we need one.
We have seen cases where we have been unable to find an argument type for a function, or we find one from another language, and then we try to create a function type by calling:

lldb_private::ClangASTContext::CreateFunctionType(clang::ASTContext*, lldb_private::CompilerType const&, lldb_private::CompilerType const*, unsigned int, bool, unsigned int)

This fix will ensure that all arguments to lldb_private::ClangASTContext::CreateFunctionType() are in order by checking:
- AST is valid
- if arguments are specified we have a valid argument array
- return type is valid
- return type is a clang type
- all argument types are valid
- all argument types are clang types

If any of these fail, we return an invalid CompilerType. If we don't return an invalid type, clang will crash anyway, and LLDB must not crash even in the presence of bad or missing debug info.

<rdar://problem/25172715>

llvm-svn: 270932
2016-05-26 22:33:25 +00:00