Commit Graph

309409 Commits

Author SHA1 Message Date
George Rimar 55f7c72bea [LLD][ELF] - Set DF_STATIC_TLS flag for X64 target
This is the same as D57749, but for x64 target.

"ELF Handling For Thread-Local Storage" p41 says (https://www.akkadia.org/drepper/tls.pdf):
R_X86_64_GOTTPOFF relocation is used for IE TLS models.
Hence if linker sees this relocation we should add DF_STATIC_TLS flag.

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

llvm-svn: 353378
2019-02-07 07:59:43 +00:00
Vitaly Buka c41835230a [sanitizer] Fix Android tests
On Android some fields can be null

llvm-svn: 353377
2019-02-07 07:40:33 +00:00
Petr Hosek 55a2fbe234 [CMake] Mark runtime library link libraries as private
There's no need to expose these dependencies to consumers. This
matches the change made to other runtimes in D57456.

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

llvm-svn: 353376
2019-02-07 06:32:09 +00:00
Craig Topper 428c14d1db [BranchFolding] Remove dead code for handling EHPad blocks
Summary: This code tries to handle the case where IBB is an EHPad, but there's an earlier check that uses PBB->hasEHPadSuccessor(). Where PBB is a predecessor of IBB. The hasEHPadSuccessor function would have visited IBB and seen that it was an EHPad and returned false. This would prevent us from reaching this code with IBB as an EHPad.

Looks like this code was originally added in rL37427 (ancient) and made dead in rL143001.

Reviewers: rnk, void, efriedma

Reviewed By: rnk

Subscribers: llvm-commits

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

llvm-svn: 353375
2019-02-07 06:21:28 +00:00
JF Bastien 388cefa78d Bump minimum toolchain version
Summary:
The RFC on moving past C++11 got good traction:
  http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

This patch therefore bumps the toolchain versions according to our policy:
  llvm.org/docs/DeveloperPolicy.html#toolchain

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

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

llvm-svn: 353374
2019-02-07 05:20:00 +00:00
Mikhail R. Gadelha eac500f0c3 Move the SMT API to LLVM
Moved everything SMT-related to LLVM and updated the cmake scripts.

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

llvm-svn: 353373
2019-02-07 03:19:45 +00:00
Mikhail R. Gadelha 5f16ad9a1b Moved the whole SMT API to a single file. NFC.
There is no advantage in having them in separate files, I doubt some will ever use them separately.

This also makes it easier to move the API to LLVM.

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

llvm-svn: 353372
2019-02-07 03:18:21 +00:00
Mikhail R. Gadelha c1f8cad191 Got rid of the `Z3ConstraintManager` class
Now, instead of passing the reference to a shared_ptr, we pass the shared_ptr instead.

I've also removed the check if Z3 is present in CreateZ3ConstraintManager as this function already calls CreateZ3Solver that performs the exactly same check.

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

llvm-svn: 353371
2019-02-07 03:18:10 +00:00
Mikhail R. Gadelha c9cd507263 Generalised the SMT state constraints
This patch moves the ConstraintSMT definition to the SMTConstraintManager header to make it easier to move the Z3 backend around.

We achieve this by not using shared_ptr  anymore, as llvm::ImmutableSet doesn't seem to like it.

The solver specific exprs and sorts are cached in the Z3Solver object now and we move pointers to those objects around.

As a nice side-effect, SMTConstraintManager doesn't have to be a template anymore. Yay!

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

llvm-svn: 353370
2019-02-07 03:17:36 +00:00
Peter Collingbourne c449409533 gn build: Merge the test part of r353237.
llvm-svn: 353369
2019-02-07 02:40:49 +00:00
Sam Clegg 847b92947e [WebAssembly] Update test output after rL353357. NFC.
llvm-svn: 353368
2019-02-07 02:35:22 +00:00
Brad Smith 01227fea9e Add OpenBSD support to be able to get the thread name
llvm-svn: 353367
2019-02-07 02:06:58 +00:00
Vitaly Buka 2b93ef7ef6 [sanitizer] Re-enabled getpw_getgr.cc on Android
Reviewers: eugenis

Subscribers: srhines, kubamracek, #sanitizers

Tags: #sanitizers

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

llvm-svn: 353366
2019-02-07 01:55:07 +00:00
Vitaly Buka 1665ea19e9 [sanitizer] Remove unneeded pointer check
Summary: unpoison_passwd and unpoison_group support nullptrs

Reviewers: eugenis

Subscribers: kubamracek, #sanitizers

Tags: #sanitizers

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

llvm-svn: 353365
2019-02-07 01:54:59 +00:00
Sam Clegg af3b9d0570 [WebAssembly] Honor WASM_SYMBOL_EXPORT symbol flag
This flag means that symbol should be exported in the final binary.

The reason for this change is to allow source level annotations to
trigger a given symbol to be exported:
https://github.com/emscripten-core/emscripten/issues/7702

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

llvm-svn: 353364
2019-02-07 01:53:50 +00:00
Kuba Mracek 92369dcffd [lldb] Make frame recognizers vend synthesized eValueTypeVariableArgument values
llvm-svn: 353363
2019-02-07 01:49:10 +00:00
Jonas Devlieghere 9a7356a60f [Driver] Don't try to replay reproducer in the driver.
Because the macros for the SBReproducers have not been committed yet,
the driver should not attempt to replay a reproducer this way.

llvm-svn: 353362
2019-02-07 01:49:07 +00:00
Jonas Devlieghere 9c18978825 Fix my mistake adding SBReproducer the Xcode project
llvm-svn: 353361
2019-02-07 01:42:47 +00:00
Sam Clegg d6ef8da317 [WebAssembly] Add symbol flag to the binary format llvm.used
Summary:
Rather than add a new attribute
See https://github.com/WebAssembly/tool-conventions/issues/64

Subscribers: dschuff, jgravelle-google, aheejin, sunfish, rupprecht, llvm-commits

Tags: #llvm

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

llvm-svn: 353360
2019-02-07 01:24:44 +00:00
Eric Christopher 40b1c07462 Fix a minor grammar thinko.
llvm-svn: 353359
2019-02-07 01:22:07 +00:00
Sam Clegg 34583e5f55 [WebAssembly] Update test expectations to match llvm-readobj change. NFC.
Differential Revision: https://reviews.llvm.org/D57868

llvm-svn: 353358
2019-02-07 01:21:58 +00:00
Sam Clegg e450bd7a9d [WebAssembly] Expand symbol flags shown by llvm-objdump --symbols
Differential Revision: https://reviews.llvm.org/D57861

llvm-svn: 353357
2019-02-07 01:17:34 +00:00
James Y Knight cfe8cd7e06 [opaque pointer types] Make EmitCall pass Function Types to
CreateCall/Invoke.

Also, remove the getFunctionType() function from CGCallee, since it
accesses the pointee type of the value. The only use was in EmitCall,
so just inline it into the debug assertion.

This is the last of the changes for Call and Invoke in clang.

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

llvm-svn: 353356
2019-02-07 01:15:41 +00:00
James Y Knight f7321540d5 [opaque pointer types] Pass through function types for TLS
initialization and global destructor calls.

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

llvm-svn: 353355
2019-02-07 01:14:17 +00:00
Shoaib Meenai 18f0bd78e2 [cmake] Drop clang-tools-extra from LLVM_ALL_PROJECTS
We iterate over the list and only enable projects from that list that
are present in LLVM_ENABLE_PROJECTS and disable all other projects. Most
users will only specify clang in LLVM_ENABLE_PROJECTS and expect
clang-tools-extra to be implicitly enabled, so remove clang-tools-extra
from LLVM_ALL_PROJECTS so that it doesn't get disabled instead.

llvm-svn: 353354
2019-02-07 01:12:56 +00:00
Artem Dergachev 161e4753b9 [analyzer] Canonicalize declarations within variable regions.
Memory region that correspond to a variable is identified by the variable's
declaration and, in case of local variables, the stack frame it belongs to.

The declaration needs to be canonical, otherwise we'd have two different
memory regions that correspond to the same variable.

Fix such bug for global variables with forward declarations and assert
that no other problems of this kind happen.

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

llvm-svn: 353353
2019-02-07 00:30:20 +00:00
Sam Clegg 1e71b04af6 Remove reference to non-existent function. NFC.
This comment is old. The code in question was removed in rL203174

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

llvm-svn: 353352
2019-02-07 00:11:43 +00:00
Vitaly Buka eb7031ecf6 [sanitizer] Don't unpoison buffer in getpw/getgr functions
Summary:
Buffer should be referenced by results so used parts will be unpoisoned with unpoison_group and unpoison_passwd.

This fixes TSAN performance issue made us to disable this interceptors.

Reviewers: eugenis, dvyukov

Subscribers: srhines, kubamracek, krytarowski, #sanitizers

Tags: #sanitizers

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

llvm-svn: 353351
2019-02-07 00:08:14 +00:00
Artem Dergachev b7e33f6404 Revert "[analyzer] Remove the "postponed" hack, deal with derived symbols..."
This reverts commit r341722.

The "postponed" mechanism turns out to be necessary in order to handle
situations when a symbolic region is only kept alive by implicit bindings
in the Store. Otherwise the region is never scanned by the Store's worklist
and the binding gets dropped despite being live, as demonstrated
by the newly added tests.

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

llvm-svn: 353350
2019-02-06 23:56:43 +00:00
Jordan Rupprecht db5036504e [llvm-ar] Remove leading slash when printing thin archive members
Reviewers: ruiu

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 353347
2019-02-06 21:50:45 +00:00
Shoaib Meenai 351314a14f [cmake] Add all subprojects to LLVM_ALL_PROJECTS
Make LLVM_ALL_PROJECTS reflect all top-level directories in the monorepo
rather than an arbitrary subset. clang-tools-extra is technically
unnecessary since it gets enabled by clang, but having it there for
consistency shouldn't hurt either.

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

llvm-svn: 353346
2019-02-06 21:49:47 +00:00
Davide Italiano 6c27a06302 [testsuite] Convert a pexpect test to lit.
Summary:

Reviewers: JDevlieghere, friss, zturner, labath, jingham, serge-sans-paille

Subscribers: llvm-commits, lldb-commits

Tags: #llvm

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

llvm-svn: 353345
2019-02-06 21:48:01 +00:00
Roland Froese 42f58498c5 [PowerPC] Add vector truncate test to prep for D56507 NFC
llvm-svn: 353344
2019-02-06 21:34:44 +00:00
Shoaib Meenai af8eadd94e [cmake] Add openmp to LLVM_ALL_PROJECTS
It'll get ignored in LLVM_ENABLE_PROJECTS after r353148 otherwise.

llvm-svn: 353343
2019-02-06 21:08:17 +00:00
Martin Storsjo dfb2fcd224 [MinGW] Add --insert-timestamp as complement to the --no-insert-timestamp option
Differential Revision: https://reviews.llvm.org/D57808

llvm-svn: 353342
2019-02-06 21:05:29 +00:00
Jordan Rupprecht d3a7e9d153 [libObject][NFC] Include filename in error message
llvm-svn: 353341
2019-02-06 20:51:04 +00:00
Ed Maste e9932c103b Correct "varaible" typo in comment
llvm-svn: 353340
2019-02-06 20:36:02 +00:00
Alina Sbirlea 6cba96ed52 [LICM/MSSA] Add promotion to scalars by building an AliasSetTracker with MemorySSA.
Summary:
Experimentally we found that promotion to scalars carries less benefits
than sinking and hoisting in LICM. When using MemorySSA, we build an
AliasSetTracker on demand in order to reuse the current infrastructure.
We only build it if less than AccessCapForMSSAPromotion exist in the
loop, a cap that is by default set to 250. This value ensures there are
no runtime regressions, and there are small compile time gains for
pathological cases. A much lower value (20) was found to yield a single
regression in the llvm-test-suite and much higher benefits for compile
times. Conservatively we set the current cap to a high value, but we will
explore lowering it when MemorySSA is enabled by default.

Reviewers: sanjoy, chandlerc

Subscribers: nemanjai, jlebar, Prazek, george.burgess.iv, jfb, jsji, llvm-commits

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

llvm-svn: 353339
2019-02-06 20:25:17 +00:00
Nirav Dave b3506bf985 [DAG] Immediately cleanup unused nodes from extend-based combines.
llvm-svn: 353338
2019-02-06 20:12:03 +00:00
Tom Tan dcb9e08fae [COFF, ARM64] Add ARM64 support for MS intrinsic _fastfail
The MSDN document was also updated to reflect this, but it probably will take a few days to show in below link.

https://docs.microsoft.com/en-us/cpp/intrinsics/fastfail

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

llvm-svn: 353337
2019-02-06 20:08:26 +00:00
Michael Berg f0d81a31b6 Move IR flag handling directly into builder calls for cases translated from Instructions in GlobalIsel
Reviewers: aditya_nandakumar, volkan

Reviewed By: aditya_nandakumar

Subscribers: rovka, kristof.beyls, volkan, Petar.Avramovic

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

llvm-svn: 353336
2019-02-06 19:57:06 +00:00
Alina Sbirlea 910c6bef3e [AliasSetTracker] Pass MustAlias to addPointer more often.
Summary:
Pass the alias info to addPointer when available. Will save an alias()
call for must sets when adding a known Must or May alias.
[Part of a series of cleanup patches]

Reviewers: reames, mkazantsev

Subscribers: sanjoy, jlebar, llvm-commits

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

llvm-svn: 353335
2019-02-06 19:55:12 +00:00
Craig Topper 1c7ee20819 [X86] Change the CPU on the test case for pr40529.ll to really show the bug. NFC
llvm-svn: 353334
2019-02-06 19:50:59 +00:00
Nirav Dave c6bfa103a5 [X86][DAG] Avoid creating dangling bitcast.
combineExtractWithShuffle may leave a dangling bitcast which may
prevent further optimization in later passes. Avoid constructing it
unless it is used.

llvm-svn: 353333
2019-02-06 19:45:47 +00:00
Sanjay Patel 29a710be6a [x86] add tests for horizontal ops (PR38971, PR33758); NFC
llvm-svn: 353332
2019-02-06 19:40:11 +00:00
Rui Ueyama 1b11e9e8a4 Remove a small header that is used only by one file. NFC.
llvm-svn: 353331
2019-02-06 19:28:23 +00:00
Jonas Paulsson b21dde0530 [SystemZ] Improved handling of the @llvm.ctlz intrinsic.
Since SystemZ supports counting of leading zeros with the FLOGR instruction,
isCheapToSpeculateCtlz() should return true, which it now does.

ISD::CTLZ_ZERO_UNDEF i32 is now handled the same way as ISD::CTLZ is, which
is needed since promotion to i64 is required and CTLZ_ZERO_UNDEF is only
expanded to CTLZ if it is Legal or Custom.

Review: Ulrich Weigand
https://reviews.llvm.org/D57710

llvm-svn: 353330
2019-02-06 19:23:31 +00:00
Peter Collingbourne 02fc3c696c build: Remove the cmake check for malloc.h.
As far as I can tell, malloc.h is only being used here to provide
a definition of mallinfo (malloc itself is declared in stdlib.h via
cstdlib). We already have a macro for whether mallinfo is available,
so switch to using that instead.

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

llvm-svn: 353329
2019-02-06 19:20:47 +00:00
Roman Lebedev 058b628264 [clang-tidy] modernize-avoid-c-arrays: avoid main function (PR40604)
Summary:
The check should ignore the main function, the program entry point.
It is not possible to use `std::array<>` for the `argv`.
The alternative is to use `char** argv`.

Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=40604 | PR40604 ]]

Reviewers: JonasToth, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: xazax.hun, hans, cfe-commits

Tags: #clang-tools-extra, #clang

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

llvm-svn: 353327
2019-02-06 19:17:30 +00:00
Jonas Devlieghere e98f590c3e Add SBReproducer to Xcode project
llvm-svn: 353326
2019-02-06 19:05:43 +00:00