Commit Graph

292932 Commits

Author SHA1 Message Date
John Brawn aa8a88af05 [PhiValues] Adjust unit test to invalidate instructions before deleting them
This should fix a sanitizer buildbot failure.

llvm-svn: 335862
2018-06-28 15:17:07 +00:00
Alexey Bataev 5f6e51d54c [DEBUG_INFO, NVPTX] Add test for .debug_loc section, NFC.
llvm-svn: 335861
2018-06-28 15:14:58 +00:00
Jonas Devlieghere 35bb57b202 [dsymutil] Use UnitListTy consistently (NFC)
Use the UnitListTy typedef consistently throughout the Dwarf linker and
pass it by const reference where possible.

llvm-svn: 335860
2018-06-28 15:01:42 +00:00
Pavel Labath abc0c6ad09 Skip core file tests on build configurations lacking necessary components
Summary:
To successfully open a core file, we need to have LLVM built with
support for the relevant target. Right now, if one does not have the
appropriate targets configured, the tests will fail.

This patch uses the GetBuildConfiguration SB API to inform the test (and
anyone else who cares) about the list of supported LLVM targets. The
test then uses this information to approriately skip the tests.

Reviewers: clayborg, jingham

Subscribers: martong, lldb-commits

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

llvm-svn: 335859
2018-06-28 14:23:04 +00:00
Filipe Cabecinhas 3c7b58d6b1 Fix test that was failing on Windows due to too many backslashes
llvm-svn: 335858
2018-06-28 14:16:13 +00:00
John Brawn bdbbd8381f Add a PhiValuesAnalysis pass to calculate the underlying values of phis
This pass is being added in order to make the information available to BasicAA,
which can't do caching of this information itself, but possibly this information
may be useful for other passes.

Incorporates code based on Daniel Berlin's implementation of Tarjan's algorithm.

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

llvm-svn: 335857
2018-06-28 14:13:06 +00:00
David Carlier 11f1d7e9e4 OpenBSD driver needs ld.lld in sanitizer context
Base GNU ld is pretty ancient and does not support --dynamic-list flag.
For conveniency, we can it automatically when compile with ubsan sanitizer flag.

Reviewers: dberris

Reviewed by: dberris

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

llvm-svn: 335856
2018-06-28 13:49:41 +00:00
George Rimar e666545a71 [ELF] - EhFrame.cpp: add test case to check "CIE is too small" error message.
The following line of code was untested:
https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L94

Patch adds a test case.

llvm-svn: 335855
2018-06-28 13:46:49 +00:00
Benjamin Kramer 456ee30036 Fix unittest build with GCC older than 5.
Old GCCs have an annoying bug where RVO disables the automatic
conversion to base for unique_ptr. Add a pessimizing std::move as a
workaround.

llvm-svn: 335854
2018-06-28 13:31:36 +00:00
Vassil Vassilev 61914d38dd [ODRHash] Do not rely on Type* when computing the hash.
ODRHash aims to provide Cross-TU stable hashing. Making clang::Type pointer
part of the hash connects (remotely) the ODRHash with the TU-specific
::Profile hasher.

r332281 exposed the issue by changing the way the ASTContext different
elaborated types if there is an owning tag. In that case, ODRHash stores two
 different types in its TypeMap which yields false ODR violation in modules.

The current state of implementation shouldn't need the TypeMap concept
anymore. Rip it out.

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

llvm-svn: 335853
2018-06-28 13:28:44 +00:00
George Rimar 63feb16627 [ELF] - EhFrame.cpp: add test case to cover "corrupted CIE" error message.
This is to test the following line that was uncovered by LLD test cases yet:
https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L149

llvm-svn: 335852
2018-06-28 13:24:39 +00:00
Benjamin Kramer 269eb21e1c Revert "Add support for generating a call graph profile from Branch Frequency Info."
This reverts commits r335794 and r335797. Breaks ThinLTO+FDO selfhost.

llvm-svn: 335851
2018-06-28 13:15:03 +00:00
Sjoerd Meijer c89ca5582a [ARM] Parallel DSP Pass
Armv6 introduced instructions to perform 32-bit SIMD operations. The purpose of
this pass is to do some straightforward IR pattern matching to create ACLE DSP
intrinsics, which map on these 32-bit SIMD operations.

Currently, only the SMLAD instruction gets recognised. This instruction
performs two multiplications with 16-bit operands, and stores the result in an
accumulator. We will follow this up with patches to recognise SMLAD in more
cases, and also to generate other DSP instructions (like e.g. SADD16).

Patch by: Sam Parker and Sjoerd Meijer

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

llvm-svn: 335850
2018-06-28 12:55:29 +00:00
George Rimar 805583e6a6 [ELF] - EhFrame.cpp: add test case to cover "DW_EH_PE_aligned encoding is not supported" error.
It is https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L144,
and we had no test case to cover it.

llvm-svn: 335849
2018-06-28 12:46:56 +00:00
Filipe Cabecinhas 02c70438f8 Fix warning on MSVC by using size_t arithmetic instead of casting after the fact. NFC
llvm-svn: 335848
2018-06-28 12:38:43 +00:00
George Rimar db139b725b [ELF] - EhFrame.cpp: add test case to check "unknown FDE encoding".
It's https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L147 line,
which was untested before this patch.

llvm-svn: 335847
2018-06-28 12:20:04 +00:00
Alexander Kornienko 82a69b80c2 Remove explicit type from an initializer list. NFC.
llvm-svn: 335846
2018-06-28 12:18:42 +00:00
Alexander Kornienko 91c9fab10f Fix formatting. NFC.
llvm-svn: 335845
2018-06-28 12:15:17 +00:00
Pavel Labath 850bfde4ab Revert "ADT: Move ArrayRef comparison operators into the class"
This reverts commit r335839, because it breaks the MSVC build.

llvm-svn: 335844
2018-06-28 12:10:21 +00:00
Aaron Ballman 0050466976 The :option: syntax was generating Sphinx build warnings; switched to double backticks to silence the warning; NFC.
llvm-svn: 335843
2018-06-28 12:05:40 +00:00
Aaron Ballman 37485fdc45 Correct the code highlighting marker to be Objective-C rather than C++ which fixes a Sphinx build warning; NFC.
llvm-svn: 335842
2018-06-28 12:02:38 +00:00
Aaron Ballman 723209d013 Fix the indentation in this documentation to remove a Sphinx warning; NFC.
llvm-svn: 335841
2018-06-28 12:00:16 +00:00
George Rimar 5e0dfe62b6 [ELF] - EhFrame: add test case to cover uncovered branch of the code.
This test case adds test for the line that was uncovered previously:
https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L175

it errors out, but we now can test that we have expected flow,
which is different for CIE of version 1 and CIE of version 3.

llvm-svn: 335840
2018-06-28 11:58:31 +00:00
Pavel Labath 33aa5c546e ADT: Move ArrayRef comparison operators into the class
Summary:
This allows the implicit ArrayRef conversions to kick in when e.g.
comparing ArrayRef to a SmallVector.

Reviewers: zturner, dblaikie

Subscribers: llvm-commits

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

llvm-svn: 335839
2018-06-28 11:45:28 +00:00
George Rimar 057ce39ea0 [ELF] - Cover "unknown .eh_frame augmentation string" error.
It was https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L195
and we did not cover it with test.

Patch fixes it.

llvm-svn: 335838
2018-06-28 11:35:10 +00:00
Andrea Di Biagio 35abd3e39e [llvm-mca] Refactor method RegisterFile::collectWrites(). NFCI
Rather than calling std::find in a loop, just sort the vector and remove
duplicate entries at the end of the function.

Also, move the debug print at the end of the function, and query the
MCRegisterInfo to print register names rather than physreg IDs.

No functional change intended.

llvm-svn: 335837
2018-06-28 11:20:14 +00:00
Ilya Biryukov ba7b824939 [clangd] Fix a data race in TUScheduler
By recomputing CompilerInvocation instead of copying it.
The problem was caused by the fact that copies of CompilerInvocation
store references to the shared state (DiagnosticOptions) when copied,
causing data races when two different copies are destroyed from
different threads.

llvm-svn: 335836
2018-06-28 11:04:45 +00:00
Adam Balogh b03ed5e414 [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks
Add handling of the begin() funcion of containers to the iterator checkers,
together with the pre- and postfix ++ and -- operators of the iterators. This
makes possible the checking of iterators dereferenced ahead of the begin of the
container.

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

llvm-svn: 335835
2018-06-28 10:58:53 +00:00
Jonas Devlieghere 9ef4965a0d [DebugInfo] Follow-up commit to improve consistency. NFC
Follow-up commit for r335757 to address some inconsistencies.

llvm-svn: 335834
2018-06-28 10:56:40 +00:00
George Rimar 0331427895 [ELF] - Add test case to cover "corrupted CIE (failed to read LEB128)" error.
It is the following line:
https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L120

We did not cover it yet.

llvm-svn: 335833
2018-06-28 10:55:52 +00:00
Jesper Antonsson 514b6b5796 Comment change to verify commit rights. NFC.
Summary: Just a silly one-character correction.

Subscribers: llvm-commits

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

llvm-svn: 335832
2018-06-28 10:55:04 +00:00
Hans Wennborg a257376003 s/TablesChecked/TableChecked/ after r335823
llvm-svn: 335831
2018-06-28 10:24:38 +00:00
Matt Arsenault 75e7192ba3 AMDGPU: Remove MFI::ABIArgOffset
We have too many mechanisms for tracking the various offsets
used for kernel arguments, so remove one. There's still a lot of
confusion with these because there are two different "implicit"
argument areas located at the beginning and end of the kernarg
segment.

Additionally, the offset was determined based on the memory
size of the split element types. This would break in a future
commit where v3i32 is decomposed into separate i32 pieces.

llvm-svn: 335830
2018-06-28 10:18:55 +00:00
Matt Arsenault 1fb9013368 AMDGPU: Error on calls from graphics shaders
In principle nothing should stop these from working, but
work is necessary to create an ABI for dealing with the stack
related registers.

llvm-svn: 335829
2018-06-28 10:18:36 +00:00
Matt Arsenault 12269dda5c AMDGPU: Fix AMDGPUCodeGenPrepare using uninitialized AMDGPUAS struct
Not sure how this wasn't noticed before.

llvm-svn: 335828
2018-06-28 10:18:23 +00:00
Matt Arsenault 513e0c0ea4 AMDGPU: Fix assert on aggregate type kernel arguments
Just fix the crash for now by not doing the optimization since
figuring out how to properly convert the bits for an arbitrary
struct is a pain.

Also fix a crash when there is only an empty struct argument.

llvm-svn: 335827
2018-06-28 10:18:11 +00:00
George Rimar 99e6bad8d0 [ELF] - Removed trailing whitespace. NFC.
llvm-svn: 335826
2018-06-28 10:12:59 +00:00
George Rimar a3be535e6e [ELF] - Add test case to cover "corrupted CIE (failed to read string)"
It was uncovered by our test cases.

llvm-svn: 335824
2018-06-28 10:10:02 +00:00
Benjamin Kramer f9613b2995 Unify sorted asserts to use the existing atomic pattern
These are all benign races and only visible in !NDEBUG. tsan complains
about it, but a simple atomic bool is sufficient to make it happy.

llvm-svn: 335823
2018-06-28 10:03:45 +00:00
Pavel Labath 9ea80d259f Retrieve a function PDB symbol correctly from nested blocks
Summary:
This patch fixes a problem with retrieving a function symbol by an
address in a nested block. In the current implementation of
ResolveSymbolContext function it retrieves a symbol with
PDB_SymType::None and then checks if found symbol's tag equals to
PDB_SymType::Function. So, if nested block's symbol was found,
ResolveSymbolContext does not resolve a function.

Reviewers: asmith, labath, zturner

Reviewed By: asmith, labath

Differential Revision: https://reviews.llvm.org/D47939
Patch by Aleksandr Urakov <aleksandr.urakov@jetbrains.com>

llvm-svn: 335822
2018-06-28 10:03:42 +00:00
Simon Pilgrim abebe4c746 [DAGCombiner] Ensure we use the correct CC result type in visitSDIV
We could get away with it for constant folded cases, but not for rL335719.

Thanks to Krzysztof Parzyszek for noticing.

llvm-svn: 335821
2018-06-28 09:54:28 +00:00
Florian Hahn 388af14f85 [SCCP] Mark CFG as preserved.
SCCP does not change the CFG, so we can mark it as preserved.

Reviewers: dberlin, efriedma, davide

Reviewed By: davide

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

llvm-svn: 335820
2018-06-28 09:53:38 +00:00
George Rimar 488a894bde [ELF] - Add test case to cover "unexpected end of CIE" error.
It was uncovered by our test cases.

llvm-svn: 335819
2018-06-28 09:34:59 +00:00
George Rimar fecd315ff9 [ELF] - Get rid of precompiled elf object in test case.
We has precompiled object with unsupported FDE version (=2).
It is possible to use llvm-mc instead for this test.

Patch do this change.

llvm-svn: 335818
2018-06-28 09:29:49 +00:00
Simon Pilgrim 49cb65bb7b [DAGCombiner] Remove unused variable. NFCI.
Noticed in D45806 review.

llvm-svn: 335817
2018-06-28 09:29:08 +00:00
Max Kazantsev f5ba37182e [IndVarSimplify] Ignore unreachable users of truncs
If a trunc has a user in a block which is not reachable from entry,
we can safely perform trunc elimination as if this user didn't exist.

llvm-svn: 335816
2018-06-28 08:20:03 +00:00
Clement Courbet 717c9768d3 [llvm-exegesis] Add partial X87 support.
Summary:
This enables the X86-specific X86FloatingPointStackifierPass, and allow
llvm-exegesis to generate and measure X87 latency/uops for some FP ops.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

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

llvm-svn: 335815
2018-06-28 07:41:16 +00:00
Adam Balogh 77660ee89a [Analyzer] Constraint Manager Negates Difference
If range [m .. n] is stored for symbolic expression A - B, then we can deduce the range for B - A which is [-n .. -m]. This is only true for signed types, unless the range is [0 .. 0].

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

llvm-svn: 335814
2018-06-28 07:35:23 +00:00
Tobias Grosser 17a098dedf test: use regex matchers to make test-case robust against register renumberings
Suggested-by: Michael Kruse
llvm-svn: 335813
2018-06-28 07:11:48 +00:00
Petr Hosek 2423c16935 [CMake] Use explicit targets for building Linux runtimes
Previously we were using default logic when building Linux runtimes
in Fuchsia toolchain, but that leads to various issues due to how
the CMake logic in compiler-rt for determining the platform support
is implemented. With this change, we will use explicit target for
every provided Linux sysroot.

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

llvm-svn: 335812
2018-06-28 05:15:46 +00:00