Commit Graph

280857 Commits

Author SHA1 Message Date
Pavel Labath 717937d586 Fix TestTargetSymbolsAddCommand [getBuildArtifact refactor]
llvm-svn: 323086
2018-01-22 09:55:30 +00:00
Raphael Isemann 8f52340766 Fix memory leaks in MinidumpParserTest
Summary: We never delete the allocated RegisterContext objects, causing those tests to fail with enabled memory sanitizer.

Reviewers: dvlahovski, zturner

Reviewed By: zturner

Subscribers: zturner, lldb-commits

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

llvm-svn: 323085
2018-01-22 09:48:40 +00:00
Pavel Labath 44197df7a3 [BinaryFormat] Add .debug_names support
Summary:
This adds a definition of the .debug_names section and the new constants
(DW_IDX_???) which are used in it.

Reviewers: JDevlieghere, aprantl

Subscribers: llvm-commits

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

llvm-svn: 323084
2018-01-22 09:41:36 +00:00
Maxim Ostapenko b0d49a604b [lsan] Respect log_path option in standalone LSan
Differential Revision: https://reviews.llvm.org/D42303

llvm-svn: 323083
2018-01-22 09:30:27 +00:00
Raphael Isemann 1784388567 Fix use after free in DiskFilesOrDirectories
Summary:
We copy the local variable `Resolved` into `Storage` to keep it around. However, we then still let the `SearchDir` ref point to `Resolved` which then is used to access the already freed memory later on. With this patch we point to `Storage` which doesn't get deleted after the current scope exits.

Discovered by memory sanitizer in the CompletionTest.DirCompletionUsername test.

Reviewers: zturner

Subscribers: lldb-commits

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

llvm-svn: 323082
2018-01-22 09:17:16 +00:00
Raphael Isemann 0b16ef7814 Fix unrepresentable float value in ScalarTest
Summary: float can't represent the given value in the literal, so we get this UB error: `runtime error: 1.23457e+48 is outside the range of representable values of type 'float'`. The test seems to not rely on this specific value, so let's just choose a smaller one that can be represented.

Reviewers: uweigand

Subscribers: lldb-commits

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

llvm-svn: 323081
2018-01-22 08:11:29 +00:00
Hiroshi Inoue 93eaad7dac [NFC] fix trivial typos in comments
"the the" -> "the"

llvm-svn: 323080
2018-01-22 07:51:37 +00:00
Serguei Katkov f38041dc3e Revert [SCEV] Fix isLoopEntryGuardedByCond usage
It causes buildbot failures. New added assert is fired.
It seems not all usages of isLoopEntryGuardedByCond are fixed.

llvm-svn: 323079
2018-01-22 07:47:02 +00:00
Hiroshi Inoue 56939f7e75 [NFC] fix trivial typos in comments
"the the" -> "the"

llvm-svn: 323078
2018-01-22 07:44:38 +00:00
Serguei Katkov 50714a1cbc [SCEV] Fix isLoopEntryGuardedByCond usage
ScalarEvolution::isKnownPredicate invokes isLoopEntryGuardedByCond without check
that SCEV is available at entry point of the loop. It is incorrect and fixed by patch.

Reviewers: sanjoy, mkazantsev, anna, dorit
Reviewed By: mkazantsev
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D42165

llvm-svn: 323077
2018-01-22 07:31:41 +00:00
Raphael Isemann bb3c570633 Fix memory leaks in TestArm64InstEmulation
Summary: We never delete the created instances, so those test fail with the memory sanitizer.

Reviewers: jasonmolenda

Reviewed By: jasonmolenda

Subscribers: aemerson, javed.absar, kristof.beyls, lldb-commits

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

llvm-svn: 323076
2018-01-22 07:22:13 +00:00
Raphael Isemann fbdf0b9315 Make loop counter unsigned in SymbolFilePDB::GetCompileUnitIndex
Summary: This fixes a clang warning.

Reviewers: zturner

Reviewed By: zturner

Subscribers: zturner, lldb-commits

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

llvm-svn: 323075
2018-01-22 06:56:09 +00:00
Hiroshi Inoue 290adb3184 [NFC] fix trivial typos in comments
"the the" -> "the"

llvm-svn: 323074
2018-01-22 05:54:46 +00:00
Lang Hames 635fd9092b [ORC] Add orc::SymbolResolver, a Orc/Legacy API interop header, and an
orc::SymbolResolver to JITSymbolResolver adapter.

The new orc::SymbolResolver interface uses asynchronous queries for better
performance. (Asynchronous queries with bulk lookup minimize RPC/IPC overhead,
support parallel incoming queries, and expose more available work for
distribution). Existing ORC layers will soon be updated to use the
orc::SymbolResolver API rather than the legacy llvm::JITSymbolResolver API.

Because RuntimeDyld still uses JITSymbolResolver, this patch also includes an
adapter that wraps an orc::SymbolResolver with a JITSymbolResolver API.

llvm-svn: 323073
2018-01-22 03:00:31 +00:00
Marshall Clow ac471d6db2 Really comment out the constexpr tests.
llvm-svn: 323072
2018-01-22 01:51:49 +00:00
Marshall Clow 785ae3e8c0 Change a static_assert to check for is_trivial instead of is_pod, as is mandated by P0767.
llvm-svn: 323071
2018-01-22 00:17:48 +00:00
Marshall Clow 85642c2bea implement (but leave commented out) the constexpr tests from P0202 for std::merge. merge requires std::copy, which isn't constexpr yet.
llvm-svn: 323070
2018-01-22 00:11:44 +00:00
Jan Kratochvil 79834a1fce Clean up #include "DWARFCompileUnit.h"
Clean up needless+missing #include "DWARFCompileUnit.h" for split of
DWARFCompileUnit to DWARFUnit as discussed in D40466.

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

llvm-svn: 323069
2018-01-21 18:03:17 +00:00
Sanjay Patel 9530f18864 [InstCombine] (X << Y) / X -> 1 << Y
...when the shift is known to not overflow with the matching
signed-ness of the division.

This closes an optimization gap caused by canonicalizing mul
by power-of-2 to shl as shown in PR35709:
https://bugs.llvm.org/show_bug.cgi?id=35709

Patch by Anton Bikineev!

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

llvm-svn: 323068
2018-01-21 16:14:51 +00:00
Sanjay Patel 7a44e4d594 [InstSimplify] add baseline tests for (X << Y) % X -> 0; NFC
This is the 'rem' counterpart to D42032 and would be folded by
D42341.

Patch by Anton Bikineev.

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

llvm-svn: 323067
2018-01-21 15:36:15 +00:00
Eugene Leviant 72b9bdb71a Temporarily revert r323062 to investigate buildbot failures
llvm-svn: 323065
2018-01-21 10:22:19 +00:00
Raphael Isemann e07688898b [modules] Fix missing includes/typo in LLDB's includes. [NFC]
Summary:
This patch adds missing includes to the LLDB headers inside `include/` as a first step of building LLDB's source with C++ modules. It also fixes this single `stds::` typo.

Some quick map why some non-obvious includes were necessary:
* lldb/lldb-defines.h for LLDB_INVALID_ADDRESS
* lldb/lldb-types.h for addr_t
* lldb/lldb-defines.h for DISALLOW_COPY_AND_ASSIG
* lldb/DataFormatters/TypeSynthetic.h for SyntheticChildrenFrontEnd

Reviewers: aprantl

Reviewed By: aprantl

Subscribers: zturner, lldb-commits

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

llvm-svn: 323064
2018-01-21 09:54:19 +00:00
Eugene Leviant 5ad9a94ad9 An attempt to fix buildbot after rL323062
llvm-svn: 323063
2018-01-21 08:49:07 +00:00
Eugene Leviant 453c976a63 [ThinLTO] Implement summary visualizer
Differential revision: https://reviews.llvm.org/D41297

llvm-svn: 323062
2018-01-21 07:27:32 +00:00
Petr Hosek 4dd524ed6a [sanitizer] Pass the CMake compiler to custom libc++ build
This addresses the error introduced in r323054 on some bots.

llvm-svn: 323061
2018-01-21 03:22:22 +00:00
Lang Hames 5ff5a30bee [ORC] Add a lookupFlags method to VSO.
lookupFlags returns a SymbolFlagsMap for the requested symbols, along with a
set containing the SymbolStringPtr for any symbol not found in the VSO.

The JITSymbolFlags for each symbol will have been stripped of its transient
JIT-state flags (i.e. NotMaterialized, Materializing).

Calling lookupFlags does not trigger symbol materialization.

llvm-svn: 323060
2018-01-21 03:20:39 +00:00
Lang Hames 86edf53664 [ORC] More cleanup. NFC.
llvm-svn: 323059
2018-01-21 03:20:36 +00:00
Jakub Kuderski a08d4d081c [Dominators] Remove misleading double-deletion test
Summary:
It's generally not safe to perform multiple DomTree updates without using the incremental API.

Although it is supposed to work in this particular case, the testcase is misleading/confusing, and it's better to remove it.

Reviewers: dberlin, brzycki, davide, grosser

Reviewed By: davide

Subscribers: llvm-commits

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

llvm-svn: 323058
2018-01-21 03:07:16 +00:00
Lang Hames 0d7d442699 [ORC] Cleanup. NFC.
llvm-svn: 323057
2018-01-21 02:24:45 +00:00
Philip Reames f57714c3c7 [DSE] Factor out common code [NFC]
We already had the pointer being stored to in the MemLoc, reuse that code.  In merging cases, it turned out the interface of the getLocForWrite had become inconsitent with other related utilities.  Fix that by making sure the input passes hasAnalyzableWrite as well.

llvm-svn: 323056
2018-01-21 02:10:54 +00:00
Philip Reames 424e7a1174 [DSE] Minor rename for clarity sake [NFC]
llvm-svn: 323055
2018-01-21 01:44:33 +00:00
Petr Hosek 066e4bf888 Reland "[Fuzzer] Parametrize add_custom_libcxx"
add_custom_libcxx uses the just built compiler and installs the
built libc++, e.g. for testing, neither of which is desirable in
case of Fuzzer where the libc++ should be built using the host
compiler and it's only linked into the libFuzzer and should never
be installed. This change introduces additional arguments to
add_custom_libcxx to allow parametrizing its behavior.

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

llvm-svn: 323054
2018-01-21 01:01:53 +00:00
Don Hinton 3c59aec591 [cmake] Don't build Native llvm-config when cross compiling if passed by user.
Summary:
Rename LLVM_CONFIG_EXE to LLVM_CONFIG_PATH, and avoid building it if
passed in by user.  This is the same way CLANG_TABLEGEN and
LLVM_TABLEGEN are handled, e.g., when -DLLVM_OPTIMIZED_TABLEGEN=ON is
passed.

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

llvm-svn: 323053
2018-01-21 00:29:00 +00:00
Devin Coughlin 2ff57bcd18 [analyzer] Provide a check name when MallocChecker enables CStringChecker
Fix an assertion failure caused by a missing CheckName. The malloc checker
enables "basic" support in the CStringChecker, which causes some CString
bounds checks to be enabled. In this case, make sure that we have a
valid CheckName for the BugType.

llvm-svn: 323052
2018-01-20 23:11:17 +00:00
Vassil Vassilev 5829d8f1f7 [cmake] Use CLANG_BINARY_DIR to determine the build directory.
The patch puts the ClangConfig.cmake in the expected location  when clang is
embedded into a framework.

llvm-svn: 323051
2018-01-20 21:43:35 +00:00
Marshall Clow 4bfb9313c1 More P0202 constexpr work. This commit adds fill/fill_n/generate/generate_n/unique/unique_copy. I removed a specialization of fill_n that recognized when we were dealing with raw pointers and 1 byte trivially-assignable types and did a memset, because the compiler will do that optimization for us.
llvm-svn: 323050
2018-01-20 20:14:32 +00:00
Florian Hahn 52fa0e9300 [ValueLattice] Use union to shave off ptr size bytes from elements.
By using a union for Constant* and ConstantRange we can shave off ptr
size bytes off lattice elements. On 64 bit systems, it brings down the
size to 40 bytes from 48 bytes.

Initialization of Range happens on-demand using placement new, if the
state changes to constantrange from non-constantrange. Similarly, the
Range object is destroyed if the state changes from constantrange to
non-constantrange.

Reviewers: reames, anna, davide

Reviewed By: reames, davide

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

llvm-svn: 323049
2018-01-20 19:52:16 +00:00
Craig Topper 7fddf2bfef [X86] Add an override of targetShrinkDemandedConstant to limit the damage that shrinkdemandedbits can do to zext_in_reg operations
Summary:
This patch adds an implementation of targetShrinkDemandedConstant that tries to keep shrinkdemandedbits from removing bits that would otherwise have been recognized as a movzx.

We still need a follow patch to stop moving ands across srl if the and could be represented as a movzx before the shift but not after. I think this should help with some of the cases that D42088 ended up removing during isel.

Reviewers: spatel, RKSimon

Reviewed By: spatel

Subscribers: llvm-commits

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

llvm-svn: 323048
2018-01-20 18:50:09 +00:00
Craig Topper 8cdb94901d [X86] Add rdpid command line option and intrinsics.
Summary: This patch adds -mrdpid/-mno-rdpid and the rdpid intrinsic. The corresponding LLVM commit has already been made.

Reviewers: RKSimon, spatel, zvi, AndreiGrischenko

Reviewed By: RKSimon

Subscribers: cfe-commits

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

llvm-svn: 323047
2018-01-20 18:36:52 +00:00
Craig Topper 035bf77426 [X86] Put the code that defines __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 for the preprocessor with the other __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* defines. NFC
llvm-svn: 323046
2018-01-20 18:36:06 +00:00
Simon Pilgrim 89540d9665 [X86][SSE] Check for out of bounds PEXTR/PINSR indices during faux shuffle combining.
llvm-svn: 323045
2018-01-20 17:16:01 +00:00
Jonas Paulsson 9cee52732f Move new test from Generic to SystemZ.
A few build bots failed with r323042 because they are not configured to
build the SystemZ target.

llvm-svn: 323044
2018-01-20 16:57:06 +00:00
Sanjay Patel 439132185d [InstCombine] add baseline tests for (X << Y) / X -> 1 << Y; NFC
This fold is proposed in D42032.

llvm-svn: 323043
2018-01-20 16:13:40 +00:00
Jonas Paulsson 7ad28863fb [SelectionDAG] Fix codegen of vector stores with non byte-sized elements.
This was completely broken, but hopefully fixed by this patch.

In cases where it is needed, a vector with non byte-sized elements is stored
by extracting, zero-extending, shift:ing and or:ing the elements into an
integer of the same width as the vector, which is then stored.

Review: Eli Friedman, Ulrich Weigand
https://reviews.llvm.org/D42100#inline-369520
https://bugs.llvm.org/show_bug.cgi?id=35520

llvm-svn: 323042
2018-01-20 16:05:10 +00:00
Dimitry Andric e6de5a100d Assume the shared library path variable is LD_LIBRARY_PATH on systems
except Darwin and Windows.  This prevents inserting an environment
variable with an empty name (which is illegal and leads to a Python
exception) on any of the BSDs.

llvm-svn: 323041
2018-01-20 14:35:05 +00:00
Dimitry Andric 1dbf609634 Assume the shared library path variable is LD_LIBRARY_PATH on systems
except Darwin and Windows.  This prevents inserting an environment
variable with an empty name (which is illegal and leads to a Python
exception) on any of the BSDs.

llvm-svn: 323040
2018-01-20 14:34:33 +00:00
Kamil Rytarowski f086a5ab03 [compiler-rt] Implement __clear_cache() on OpenBSD/mips64
Summary:
Make __clear_cache() invoke the platform's cache flush function
on OpenBSD/mips64.

Reviewers: krytarowski

Reviewed By: krytarowski

Subscribers: sdardis, dberris, arichardson, krytarowski, llvm-commits, #sanitizers

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

llvm-svn: 323039
2018-01-20 14:16:16 +00:00
Martin Storsjo 3b611fa93f [COFF] Keep the underscore on exported decorated stdcall functions in MSVC mode
This fixes PR35733.

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

llvm-svn: 323036
2018-01-20 11:44:42 +00:00
Martin Storsjo f641d0d4f2 [COFF] Keep the underscore on exported decorated stdcall functions in MSVC mode
This (together with the corresponding LLD commit, that contains the
testcase updates) fixes PR35733.

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

llvm-svn: 323035
2018-01-20 11:44:32 +00:00
David Green 990eb1fc94 [Dominators] Fix some edge cases for PostDomTree updating
These fix some odd cfg cases where batch-updating the post
dom tree fails. Usually around infinite loops and roots
ending up being different.

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

llvm-svn: 323034
2018-01-20 10:29:37 +00:00