Commit Graph

246609 Commits

Author SHA1 Message Date
Simon Pilgrim bdb3c38157 [X86][SSE] Regenerate test (just adds missing header)
llvm-svn: 286241
2016-11-08 15:42:49 +00:00
George Rimar 9602637030 [ELF] - Fix mistype. NFC.
Thanks to Malcolm Parsons who pointed on that.

llvm-svn: 286239
2016-11-08 15:26:21 +00:00
Simon Pilgrim 778596bf59 [TargetLowering] Fix undef vector element issue with true/false result handling
Fixed an issue with vector usage of TargetLowering::isConstTrueVal / TargetLowering::isConstFalseVal boolean result matching.

The comment said we shouldn't handle constant splat vectors with undef elements. But the the actual code was returning false if the build vector contained no undef elements....

This patch now ignores the number of undefs (getConstantSplatNode will return null if the build vector is all undefs).

The change has also unearthed a couple of missed opportunities in AVX512 comparison code that will need to be addressed.

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

llvm-svn: 286238
2016-11-08 15:07:01 +00:00
Rafael Espindola c0e47fbfb2 Delete the InterpSection class.
We can just use a regular InputSection.

llvm-svn: 286237
2016-11-08 14:56:27 +00:00
Pablo Barrio 9f45254138 [JumpThreading] Unfold selects that depend on the same condition
Summary:
These are good candidates for jump threading. This enables later opts
(such as InstCombine) to combine instructions from the selects with
instructions out of the selects. SimplifyCFG will fold the select
again if unfolding wasn't worth it.

Patch by James Molloy and Pablo Barrio.

Reviewers: rengolin, haicheng, sebpop

Subscribers: jojo, jmolloy, llvm-commits

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

llvm-svn: 286236
2016-11-08 14:53:30 +00:00
Rafael Espindola 1a5411238e Revert "[ELF] Make InputSection<ELFT>::writeTo virtual"
This reverts commit r286100.

This saves 8 bytes of every InputSection.

llvm-svn: 286235
2016-11-08 14:47:16 +00:00
Rafael Espindola 682a5bc2c1 Delete the CommonSection class.
With the current infrastructure it can be just an ordinary
InputSection like the real .bss sections.

llvm-svn: 286234
2016-11-08 14:42:34 +00:00
Simon Pilgrim d02c55204b [VectorLegalizer] Expansion of CTLZ using CTPOP when possible
This patch avoids scalarization of CTLZ by instead expanding to use CTPOP (ref: "Hacker's Delight") when the necessary operations are available.

This also adds the necessary cost models for X86 SSE2 targets (the main beneficiary) to ensure vectorization only happens when its useful.

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

llvm-svn: 286233
2016-11-08 14:10:28 +00:00
Rafael Espindola 89fd151ee0 cleanup hashSysV a bit.
Don't pass a reference to a StringRef and use a range loop.

llvm-svn: 286232
2016-11-08 14:04:16 +00:00
Roger Ferrer Ibanez 80c0f33c29 [AArch64] Fix incorrect CSEL node created
Under -enable-unsafe-fp-math, SELECT_CC lowering in AArch64
transforms floating point comparisons of the form "a == 0.0 ? 0.0 : x" to
"a == 0.0 ? a : x". But it incorrectly assumes that 'x' and 'a' have
the same type which can lead to a wrong CSEL node that crashes later
due to nonsensical copies.

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

llvm-svn: 286231
2016-11-08 13:34:41 +00:00
Simon Dardis e7cc54058d [mips] Renable small data section test.
llvm-svn: 286230
2016-11-08 13:03:45 +00:00
Ayman Musa e60a41ca28 [X86][AVX512][Clang] Add support for mask_{move|store|load}_s{s/d} and int2mask/mask2int intrinsics.
Differential Revision: https://reviews.llvm.org/D26021

llvm-svn: 286229
2016-11-08 12:00:30 +00:00
Kirill Bobyrev b0cf6a3840 [clang-tidy] Improve rename_check.py.
-Start using argparse instead of mimicking CLI parsing.
-PEPify the code.
-Decrease the number of imports by slightly cleaning up the script.

Reviewers: alexfh

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

llvm-svn: 286228
2016-11-08 11:43:50 +00:00
Amara Emerson 0b40201e13 Adds the loop end location to the loop metadata.
This additional information can be used to improve the locations when generating remarks for loops.

Patch by Florian Hahn.

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

llvm-svn: 286227
2016-11-08 11:18:59 +00:00
Eugene Leviant c5079dc3cc [ELF] Test case update (orphan.s)
llvm-svn: 286226
2016-11-08 11:11:23 +00:00
Eugene Leviant bae1c656bb [ELF] Heuristic for placing orphan section
Differential revision: https://reviews.llvm.org/D25325

llvm-svn: 286225
2016-11-08 10:44:48 +00:00
Vladimir Yakovlev 9e83e22ddf Test commit of vbyakovl.
llvm-svn: 286224
2016-11-08 10:32:10 +00:00
Sylvestre Ledru 3ce346d4ca Fix memory leaks (coverity issues 1365586 & 1365591)
Reviewers: hfinkel

Subscribers: george.burgess.iv, malcolm.parsons, boris.ulasevich, llvm-commits

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

llvm-svn: 286223
2016-11-08 10:00:45 +00:00
Alexander Kornienko 7783ea6a61 [clang-tidy] clang-analyzer-alpha* checks are not registered, so there's no need to disable them
llvm-svn: 286222
2016-11-08 08:28:19 +00:00
Mandeep Singh Grang 7c7ea7d0ae [clang-tools-extra] Format sources with clang-format. NFC.
Summary:
Ran clang-format on all .c/.cpp/.h files in clang-tools-extra.
Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories.

Reviewers: klimek, alexfh

Subscribers: nemanjai

Tags: #clang-tools-extra

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

llvm-svn: 286221
2016-11-08 07:50:19 +00:00
George Rimar d700c357d4 [ELF] - Fixed mistype. NFC.
llvm-svn: 286220
2016-11-08 07:46:52 +00:00
Alexander Kornienko 179e89f188 Use AnalyzerOptions::getRegisteredCheckers() instead of clang/StaticAnalyzer/Checkers/Checkers.inc
Summary: Depends on D26310.

Reviewers: zaks.anna, hokein

Subscribers: cfe-commits

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

llvm-svn: 286219
2016-11-08 07:43:42 +00:00
Alexander Kornienko 8df2a62ae6 Add a method to get the list of registered static analyzer checkers.
Summary:
This provides a better interface for clang-tidy and encapsulates the knowledge
about experimental checkers instead of leaving this to the clients.

Reviewers: zaks.anna

Subscribers: a.sidorin, NoQ, dcoughlin, cfe-commits

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

llvm-svn: 286218
2016-11-08 07:23:32 +00:00
Tobias Grosser a8ca3ed06a SCEVValidator: reduce indentation to increase readability [NFC]
llvm-svn: 286217
2016-11-08 07:17:48 +00:00
Craig Topper c6a0339fb0 [AVX-512] Add an avx512f without avx512vl command line to vec_fp_to_int.ll and regenerate. This will make a change in a future patch easier to see. NFC
llvm-svn: 286216
2016-11-08 06:58:53 +00:00
Vedant Kumar 5ea41f30fd [lldb] Don't build unit tests for unsupported targets
Differential Revision: https://reviews.llvm.org/D26338

llvm-svn: 286215
2016-11-08 06:49:59 +00:00
Peter Collingbourne e2dcf7c3a1 IR, Bitcode: Change bitcode reader to no longer own its memory buffer.
Unique ownership is just one possible ownership pattern for the memory buffer
underlying the bitcode reader. In practice, as this patch shows, ownership can
often reside at a higher level. With the upcoming change to allow multiple
modules in a single bitcode file, it will no longer be appropriate for
modules to generally have unique ownership of their memory buffer.

The C API exposes the ownership relation via the LLVMGetBitcodeModuleInContext
and LLVMGetBitcodeModuleInContext2 functions, so we still need some way for
the module to own the memory buffer. This patch does so by adding an owned
memory buffer field to Module, and using it in a few other places where it
is convenient.

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

llvm-svn: 286214
2016-11-08 06:03:43 +00:00
Alexander Kornienko 76e4315a0e [clang-tidy] Simplify matchers
llvm-svn: 286213
2016-11-08 05:58:07 +00:00
Stephen Hines 171244fb7a clang-format: Use git-ls-tree to get file mode in diff mode
Summary:
If a file has been renamed/deleted from the filesystem and --diff mode
with two commits is active, attempting to get the file's mode will fail.
This change uses git-ls-tree instead to get the correct permissions for
the given revision.

Patch by Luis Hector Chavez!

Reviewers: djasper, lodato

Subscribers: srhines, cfe-commits

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

llvm-svn: 286212
2016-11-08 05:50:14 +00:00
Dmitry Vyukov 62f99cc486 tsan: more precise handling of atomic stores
Atomic stores terminate release sequences on the atomic variable,
and must use ReleaseStore primitive instead of Release.
This was broken in r192355 during a refactoring.
Restore correct behavior and add a test.

llvm-svn: 286211
2016-11-08 05:34:50 +00:00
Justin Bogner 5ca4d5f5fe cmake: Don't try to install exports if there aren't any
When using LLVM_DISTRIBUTION_COMPONENTS, it's possible for clang's
export list to be empty. If this happens the install(EXPORTS) command
will fail, but since there isn't anything to install anyway we really
just want to skip it.

llvm-svn: 286210
2016-11-08 05:02:33 +00:00
Justin Bogner 80bee97477 cmake: Don't try to install exports if there aren't any
When using LLVM_DISTRIBUTION_COMPONENTS, it's possible for LLVM's
export list to be empty. If this happens the install(EXPORTS) command
will fail, but since there isn't anything to install anyway we really
just want to skip it.

llvm-svn: 286209
2016-11-08 05:02:18 +00:00
Zachary Turner c5d7df9035 Convert some Expression parser functions to StringRef.
llvm-svn: 286208
2016-11-08 04:52:16 +00:00
Peter Collingbourne 77c89b6958 Bitcode: Decouple block info block state from reader.
As proposed on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/106630.html

Move block info block state to a new class, BitstreamBlockInfo.
Clients may set the block info for a particular cursor with the
BitstreamCursor::setBlockInfo() method.

At this point BitstreamReader is not much more than a container for an
ArrayRef<uint8_t>, so remove it and replace all uses with direct uses
of memory buffers.

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

llvm-svn: 286207
2016-11-08 04:17:11 +00:00
Peter Collingbourne 939c7d916e Bitcode: Split out block info reading into a separate function.
We're about to make this more complicated.

llvm-svn: 286206
2016-11-08 04:16:57 +00:00
Tony Jiang c6ddd7221c [PowerPC] Implement remaining vector comparison builtins.
vector bool char vec_cmpeq (vector bool char, vector bool char);
vector bool int vec_cmpeq (vector bool int, vector bool int);
vector bool long long vec_cmpeq (vector bool long long, vector bool long lon
vector bool short vec_cmpeq (vector bool short, vector bool short);

llvm-svn: 286205
2016-11-08 04:15:45 +00:00
Zachary Turner 0ac5f9846b Rewrite OutputFormattedHelpText in terms of StringRef.
This makes the logic easier to follow and also propagates
StringRef up to the API boundary, which is necessary for
making higher up StringRef API changes.

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

llvm-svn: 286204
2016-11-08 04:12:42 +00:00
George Burgess IV 63b06e185c Add a missing break statement. NFC.
llvm-svn: 286203
2016-11-08 04:01:50 +00:00
Shoaib Meenai 76728d88ec [libc++] Remove unnecessary MSVCRT exclusions
Visual Studio 2013 and up have these functions, and we don't need to
support older versions.

There are some remaining _LIBCPP_MSVCRT exclusions which are present on
Visual Studio 2015 but not 2013. Those will be addressed in a follow-up.

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

llvm-svn: 286202
2016-11-08 03:31:42 +00:00
George Burgess IV b9bd6fad10 Make a const variable static. NFC.
llvm-svn: 286201
2016-11-08 03:30:49 +00:00
Davide Italiano ba8761bc7f [LTO] Don't leak BitcodeFiles. Found by the asan bot.
llvm-svn: 286194
2016-11-08 01:46:02 +00:00
Davide Italiano 089f0e7488 [ELF] Don't leak the ".data" section. Fixes an asan failure.
llvm-svn: 286193
2016-11-08 01:42:38 +00:00
Evgeniy Stepanov f95e706371 [asan] Add missing header in a test.
llvm-svn: 286191
2016-11-08 01:17:58 +00:00
Tim Northover 60f2349b50 GlobalISel: improve error diagnostics when IRTranslation fails.
llvm-svn: 286190
2016-11-08 01:12:17 +00:00
Richard Smith 5e05298549 Correctly ignore unnamed bit-fields when checking whether a union has fields.
llvm-svn: 286189
2016-11-08 01:07:26 +00:00
Evgeniy Stepanov 11d3b27959 [asan] Fix asan-rt bitness issues in asan_device_setup on Android.
asan_device_setup script is using LD_PRELOAD to inject the ASan
runtime library into the Zygote process. This breaks when the Zygote
or any of its descendants spawn a process with different bitness due
to the fact that the ASan-RT library name includes the target
architecture.

The fix is to preload the library through a symlink which has the
same name in lib and lib64.

llvm-svn: 286188
2016-11-08 00:59:58 +00:00
Evgeniy Stepanov 4fcbb24deb [asan] Fix one test on Android N.
A fake strtol interceptor should at least make forward progress.

llvm-svn: 286187
2016-11-08 00:59:54 +00:00
Haojian Wu 06e39a3aed [clang-tidy] Don't warn implicit variables in peformance-unnecessary-copy-initialization.
Summary:

This will prevent the check warning the variables which have been
implicitly added by compiler, like the following case (in for-range loop):

  the variable '__end' is copy-constructed from a const reference...

Reviewers: alexfh

Subscribers: cfe-commits

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

llvm-svn: 286186
2016-11-08 00:45:34 +00:00
Tim Northover 9ac0eba672 GlobalISel: support selecting G_SELECT on AArch64.
llvm-svn: 286185
2016-11-08 00:45:29 +00:00
Mandeep Singh Grang 96999de55d [CMake] Fix llvm_setup_rpath function
Summary:
Set _install_rpath to CMAKE_INSTALL_RPATH if it is defined, so that eventually
INSTALL_RPATH is set to CMAKE_INSTALL_RPATH.
The "if(NOT DEFINED CMAKE_INSTALL_RPATH)" was missing a corresponding else
clause.
This also cleans up the fix made in r285908.

Patch by Azharuddin Mohammed

Reviewers: john.brawn, sgundapa, beanz

Subscribers: chapuni, mgorny, llvm-commits

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

llvm-svn: 286184
2016-11-08 00:45:05 +00:00