Commit Graph

248219 Commits

Author SHA1 Message Date
Haojian Wu b15c8da089 [clang-move] Enable dump all declarations in old header.
Summary:
* Add -dump_dels option to dump all declarations from old header. It
  will allow clang-move used as a frontend to get declarations from
  header. Further more, this will make debugging stuff easier. Currently only
  class/function types are supported.
* Refactoring code a little bit by creating a ClangMoveContext which
  holds all options for ClangMoveTool, which can simplify the code in
  some degree.

Reviewers: ioeric

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D27059

llvm-svn: 287863
2016-11-24 10:17:17 +00:00
Adrian Kuegel ecd760ca6e Remove \x13 (^S) character that was likely added by mistake.
r287386 added a \x13 character inside a string literal. Most likely this
was by mistake, so remove it.

Differential Revision: https://reviews.llvm.org/D26973

llvm-svn: 287862
2016-11-24 10:01:34 +00:00
Howard Hellyer f20b0a744f Patch for lldb bug 26322 “core load hangs”
Correct 0 byte core files uploaded by arc.

llvm-svn: 287861
2016-11-24 09:54:09 +00:00
George Rimar 066bf6e1b3 [ELF] - Removed unused method. NFC.
llvm-svn: 287860
2016-11-24 09:42:10 +00:00
Benjamin Kramer 60a53d5e16 [ASTDumper] Add some more character escapes for convenience.
llvm-svn: 287859
2016-11-24 09:41:33 +00:00
Howard Hellyer 1a2ac9bda5 Patch for lldb bug 26322 “core load hangs”
Summary:
This patch changes the way ProcessElfCore.cpp handles signal information.
The patch changes ProcessElfCore.cpp to use the signal from si_signo in SIGINFO notes in preference to the value of cursig in PRSTATUS notes. The value from SIGINFO seems to be more thread specific. The value from PRSTATUS is usually the same for all threads even if only one thread received a signal.
If it cannot find any SIGINFO blocks it reverts to the old behaviour and uses the value from cursig in PRSTATUS. If after that no thread appears to have been stopped it forces the status of the first thread to be SIGSTOP to prevent lldb hanging waiting for any thread from the core file to change state.

The order is:
- If one or more threads have a non-zero si_signo in SIGINFO that will be used.
- If no threads had a SIGINFO block with a non-zero si_signo set all threads signals to the value in cursig in their PRSTATUS notes.
- If no thread has a signal set to a non-zero value set the signal for only the first thread to SIGSTOP.


This resolves two issues. The first was identified in bug 26322, the second became apparent while investigating this problem and looking at the signal values reported for each thread via “thread list”.

Firstly lldb is able to load core dumps generated by gcore where each thread has a SIGINFO note containing a signal number but cursig in the PRSTATUS block for each thread is 0.

Secondly if a SIGINFO note was found the “thread list” command will no longer show the same signal number for all threads. At the moment if a process crashes, for example with SIGILL, all threads will show “stop reason = signal SIGILL”. With this patch only the thread that executed the illegal instruction shows that stop reason. The other threads show “stop reason = signal 0”.

Reviewers: jingham, clayborg

Subscribers: sas, labath, lldb-commits

Differential Revision: https://reviews.llvm.org/D26676

llvm-svn: 287858
2016-11-24 08:56:37 +00:00
Malcolm Parsons 1c7f07aa3e [CommandLine] Remove redundant initializers for StringRef members
Summary: The default constructor for a StringRef stores an empty string.

Reviewers: beanz, zturner

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D27067

llvm-svn: 287857
2016-11-24 08:54:05 +00:00
Jacob Baungard Hansen a8cbbdc9b6 TableGen: Allow signed immediates for instruction aliases
Patch by Daniel Cederman.

Reviewers: stoklund, arsenm

Subscribers: arsenm, llvm-commits

Differential Revision: https://reviews.llvm.org/D27046

llvm-svn: 287856
2016-11-24 08:53:28 +00:00
Craig Topper f23b995f78 [AVX-512] Fix some mask shuffle tests to actually test the case they were supposed to test.
llvm-svn: 287854
2016-11-24 05:36:50 +00:00
Craig Topper 993c7416d3 [AVX-512] Move a 16 x float shuffle test to the v16 test file and add an integer variant.
llvm-svn: 287853
2016-11-24 05:36:47 +00:00
Kelvin Li 2bfddcec19 Remove comments (NFC)
Differential Revision: https://reviews.llvm.org/D27006

llvm-svn: 287852
2016-11-24 03:18:07 +00:00
Douglas Yung 31ec97aaa1 Make these tests work more reliably with Release builds.
Differential Revision: https://reviews.llvm.org/D26827

llvm-svn: 287851
2016-11-24 01:53:38 +00:00
Rui Ueyama 3aaacb282f Update comment.
llvm-svn: 287850
2016-11-24 01:44:21 +00:00
Rui Ueyama f373dd76ce Remove HasError and use ErrorCount instead.
HasError was always true if ErrorCount > 0, so we can use ErrorCount instead.

llvm-svn: 287849
2016-11-24 01:43:21 +00:00
Taras Tsugrii 0ca1dde560 Fix a comparison of integers of different signs warning.
source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:403:21: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
  for (int i = 0; i < llvm::array_lengthof (magicks); i++)
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://reviews.llvm.org/D27081

llvm-svn: 287848
2016-11-24 01:34:43 +00:00
Joerg Sonnenberger 7ed9d1a0ce Spelling.
llvm-svn: 287847
2016-11-24 01:24:38 +00:00
Peter Collingbourne debb6f6cc1 Object: Add IRObjectFile::getTargetTriple().
This lets us remove a use of IRObjectFile::getModule() in llvm-nm.

Differential Revision: https://reviews.llvm.org/D27074

llvm-svn: 287846
2016-11-24 01:13:09 +00:00
Peter Collingbourne e32baa0c3e Object: Simplify the IRObjectFile symbol iterator implementation.
Change the IRObjectFile symbol iterator to be a pointer into a vector of
PointerUnions representing either IR symbols or asm symbols.

This change is in preparation for a future change for supporting multiple
modules in an IRObjectFile. Although it causes an increase in memory
consumption, we can deal with that issue separately by introducing a bitcode
symbol table.

Differential Revision: https://reviews.llvm.org/D26928

llvm-svn: 287845
2016-11-24 00:41:05 +00:00
Matt Arsenault 7b54dd039e AMDGPU: Preserve m0 value when spilling
llvm-svn: 287844
2016-11-24 00:26:50 +00:00
Matt Arsenault 94b32ffe8e TRI: Add hook to pass scavenger during frame elimination
The scavenger was not passed if requiresFrameIndexScavenging was
enabled. I need to be able to test for the availability of an
unallocatable register here, so I can't create a virtual register for
it.

It might be better to just always use the scavenger and stop
creating virtual registers.

llvm-svn: 287843
2016-11-24 00:26:47 +00:00
Matt Arsenault 5ee3325358 AMDGPU: Remove m0 spilling code
Since m0 isn't allocatable it should never be spilled anymore.

llvm-svn: 287842
2016-11-24 00:26:44 +00:00
Matt Arsenault 9e5c7b1031 AMDGPU: Make m0 unallocatable
m0 may need to be written for spill code, so
we don't want general code uses relying on the
value stored in it.

This introduces a few code quality regressions where copies
from m0 are not coalesced into copies of a copy of m0.

llvm-svn: 287841
2016-11-24 00:26:40 +00:00
Davide Italiano 8812f28f47 [lib/LTO] Rename few instances of Lto to LTO.
llvm-svn: 287840
2016-11-24 00:23:09 +00:00
Greg Clayton e65439797a Rely on a single DWARF version instead of having two copies
This patch makes AsmPrinter less reliant on DwarfDebug by relying on the DWARF version in the AsmPrinter's MCStreamer's MCContext. This allows us to remove the redundant DWARF version from DwarfDebug. It also lets us change code that used to access the AsmPrinter's DwarfDebug just to get to the DWARF version by changing the DWARF version accessor on AsmPrinter so that it grabs the version from its MCStreamer's MCContext.

Differential Revision: https://reviews.llvm.org/D27032

llvm-svn: 287839
2016-11-23 23:30:37 +00:00
Eugene Zelenko 570e39a25c [DebugInfo] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC).
Per Zachary Turner and Mehdi Amini suggestion to make only post-commit reviews.

llvm-svn: 287838
2016-11-23 23:16:32 +00:00
Rui Ueyama bf9523f549 [COFF] Add DebugInfoCodeView dependency
rL287555 introduces a link error when building with BUILD_SHARED_LIBS:

  undefined reference to llvm::codeview::CVSymbolDumper::dump(),
  and more...

The functions are available in libDebugInfoCodeView, from LLVM.

Patch by Visoiu Mistrih Francis!

llvm-svn: 287837
2016-11-23 22:58:25 +00:00
Rui Ueyama 2eda6d1633 Set default entry point to .text if no entry point is found.
Previously, if a symbol specified by -e or ENTRY() is not found,
we didn't set entry point address. That is incompatible with GNU
because GNU linkers set the first address of .text to entry.
This patch implement that behavior.

llvm-svn: 287836
2016-11-23 22:41:00 +00:00
Simon Pilgrim 3ce6a545c7 [X86][SSE] Add awareness of (v)cvtpd2dq and vcvtpd2udq implicit zeroing of upper 64-bits of xmm result
We've already added the equivalent for (v)cvttpd2dq (rL284459) and vcvttpd2udq

llvm-svn: 287835
2016-11-23 22:35:06 +00:00
Eugene Zelenko 1aa40f46ee [IR] Fix some Clang-tidy modernize-use-default, modernize-use-equal-delete and Include What You Use warnings; other minor fixes (NFC).
Per Zachary Turner and Mehdi Amini suggestion to make only post-commit reviews.

llvm-svn: 287834
2016-11-23 22:25:16 +00:00
Vedant Kumar 3ac1d4dc10 [test] Use a helper macro to refer to MAP_ANON (NFC)
Some of our internal bots use old SDK's which don't define MAP_ANON.
Use a helper macro to pass the right flag into mmap().

llvm-svn: 287833
2016-11-23 22:23:42 +00:00
Simon Atanasyan 8469b8841c [ELF][MIPS] Fix handling of _gp/_gp_disp/__gnu_local_gp symbols
Offset between beginning of a .got section and _gp symbols used in MIPS
GOT relocations calculations. Usually the expression looks like
VA + Offset - GP, where VA is the .got section address, Offset - offset
of the GOT entry, GP - offset between .got and _gp. Also there two "magic"
symbols _gp_disp and __gnu_local_gp which hold the offset mentioned above.
These symbols might be referenced by MIPS relocations.

Now the linker always defines _gp symbol and uses hardcoded value for
its initialization. So offset between .got and _gp is 0x7ff0. The _gp_disp
and __gnu_local_gp defined if required and initialized by 0x7ff0.
In fact that is not correct because _gp symbol might be defined by a linker
script and holds arbitrary value. In that case we need to use this value
in relocation calculation and initialize _gp_disp and __gnu_local_gp
properly.

The patch fixes the problem and completes fixing the bug #30311.
https://llvm.org/bugs/show_bug.cgi?id=30311

Differential revision: https://reviews.llvm.org/D27036

llvm-svn: 287832
2016-11-23 22:22:16 +00:00
Nicolai Haehnle 934470f536 [SelectionDAG] Early-out in TargetLowering::expandMUL (NFC)
Summary: Reduce indentation level; preparation for D24956.

Reviewers: efriedma

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D27063

llvm-svn: 287831
2016-11-23 22:14:20 +00:00
Rui Ueyama 835bd72322 Remove trailing whitespace.
llvm-svn: 287830
2016-11-23 22:10:46 +00:00
Stephan T. Lavavej d72ece6462 [libcxx] [test] D27027: Strip trailing whitespace.
llvm-svn: 287829
2016-11-23 22:03:28 +00:00
Stephan T. Lavavej 640660aa3f [libcxx] [test] D27026: Fix copy-paste silliness; ULL can't ever be 32-bit.
llvm-svn: 287828
2016-11-23 22:02:59 +00:00
Stephan T. Lavavej 8eb5ce8652 [libcxx] [test] D27020: Fix MSVC warning C4245 "conversion from 'X' to 'Y', signed/unsigned mismatch", part 7/12.
When initializing unsigned integers to their maximum values, change "const T M(~0);" to "const T M(static_cast<T>(-1));".

~0 and -1 are equivalent, but I consider the -1 form to be significantly clearer (and more consistent with other tests).

llvm-svn: 287827
2016-11-23 22:02:53 +00:00
Stephan T. Lavavej bbdf9b7d2b [libcxx] [test] D27019: Fix MSVC warning C4245 "conversion from 'X' to 'Y', signed/unsigned mismatch", part 6/12.
Add static_cast when initializing unsigned integers with negative numbers (in order to obtain big values).

llvm-svn: 287826
2016-11-23 22:02:44 +00:00
Stephan T. Lavavej 562f28a6ed [libcxx] [test] D27018: Fix MSVC warning C4018 "signed/unsigned mismatch", part 5/12.
Various changes:

test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp
Change M from unsigned to int. It's compared against "int x",
and we binary_search() for it within a vector<int>.

test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp
test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval_param.pass.cpp
Add static_cast<unsigned> when comparing int to unsigned.

test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
Change unsigned indices to int when we're being given int as a bound.

llvm-svn: 287825
2016-11-23 22:02:35 +00:00
Stephan T. Lavavej 73876facd5 [libcxx] [test] D27016: Fix MSVC warning C4018 "signed/unsigned mismatch", part 4/12.
Change "int j;" indices to "std::size_t j;".

Also, include <cstddef> when it wasn't already being included.

llvm-svn: 287824
2016-11-23 22:02:27 +00:00
Stephan T. Lavavej afe99ae092 [libcxx] [test] D27015: Fix MSVC warning C4018 "signed/unsigned mismatch", part 3/12.
Change unsigned to int in parameters.

llvm-svn: 287823
2016-11-23 22:02:16 +00:00
Stephan T. Lavavej a11d322f0d [libcxx] [test] D27014: Fix MSVC warning C4018 "signed/unsigned mismatch", part 2/12.
Add static_cast<std::size_t> when comparing int to std::size_t.

Also, include <cstddef> when it wasn't already being included.

llvm-svn: 287822
2016-11-23 22:01:58 +00:00
Simon Pilgrim eda1193456 [X86][AVX512VL] Add v2f64 -> v2i32/v2f32 + zero codegen tests
llvm-svn: 287821
2016-11-23 22:01:50 +00:00
Stephan T. Lavavej e898b484f6 [libcxx] [test] D27013: Fix MSVC warning C4018 "signed/unsigned mismatch", part 1/12.
Change loop indices from int to std::size_t.

Also, include <cstddef> when it wasn't already being included.

llvm-svn: 287820
2016-11-23 22:01:19 +00:00
Hongbin Zheng 4ff1c3983d Fix typo.
llvm-svn: 287819
2016-11-23 21:59:33 +00:00
Matt Arsenault a24d84beb9 AMDGPU: Cleanup immediate folding code
Move code down to use, reorder to avoid hard to follow
immediate folding logic.

llvm-svn: 287818
2016-11-23 21:51:07 +00:00
Matt Arsenault 391c3ea9bc AMDGPU: Fix debug printing
The uint8_t was printed as a char which didn't really work.

llvm-svn: 287817
2016-11-23 21:51:05 +00:00
Rui Ueyama d3a06ffb1c Use llvm::utohexstr instead of Twine::utohexstr.
They are essentially the same in this context, so I prefer the one
that doesn't need `Twine::`.

llvm-svn: 287814
2016-11-23 21:24:26 +00:00
Simon Pilgrim 9234ff26d9 [X86][SSE] Add v2i64 -> v2i32 + zero codegen test
llvm-svn: 287813
2016-11-23 21:19:57 +00:00
Matt Arsenault 997a9abf4c AMDGPU: Fix not setting kill flag on temp reg when spilling
llvm-svn: 287808
2016-11-23 21:00:12 +00:00
Matt Arsenault dd0cb2a3e5 AMDGPU: Fix adding extra implicit def of register
In the scalar case, there's no reason to add an additional
def of the same register.

llvm-svn: 287807
2016-11-23 21:00:10 +00:00