Rafael Espindola [Tue, 15 Nov 2016 22:13:16 +0000 (22:13 +0000)]
Use one task per iteration in parallel_for_loop.
This seems far more natural. A user can create larger chunks if the
overhead is too large.
With this linking xul with "--threads --build-id=sha1 goes from
13.
938177535 to 11.
035953538 seconds on linux.
llvm-svn: 287042
Justin Lebar [Tue, 15 Nov 2016 22:03:29 +0000 (22:03 +0000)]
[libcxx] Mark xonstexpr-fns.pass.cpp as XFAIL: gcc.
This fails with gcc because __builtin_isnan and friends, which
libcpp_isnan and friends call, are not themselves constexpr-evaluatable.
llvm-svn: 287041
Reid Kleckner [Tue, 15 Nov 2016 21:54:58 +0000 (21:54 +0000)]
Allow users to call ASan's deadly exception report mechanism
Users often have their own unhandled exception filters installed. ASan
already goes to great lengths to install its own filter, but our core
wars with Chrome crashpad have escalated to the point that its time to
declare a truce. By exposing this hook, they can call us directly when
they want ASan crash reporting without worrying about who initializes
when.
llvm-svn: 287040
Mehdi Amini [Tue, 15 Nov 2016 21:47:11 +0000 (21:47 +0000)]
Improve handling of __FUNCTION__ and other predefined expression for Objective-C Blocks
Instead of always displaying the mangled name, try to do better
and get something closer to regular functions.
Differential Revision: https://reviews.llvm.org/D26522
llvm-svn: 287039
Peter Collingbourne [Tue, 15 Nov 2016 21:36:35 +0000 (21:36 +0000)]
Object: replace backslashes with slashes in embedded relative thin archive paths on Windows.
This makes these thin archives portable between *nix and Windows.
Differential Revision: https://reviews.llvm.org/D26696
llvm-svn: 287038
Chad Rosier [Tue, 15 Nov 2016 21:34:31 +0000 (21:34 +0000)]
[AArch64] Add driver tests for Qualcomm's Falkor CPU.
Differential Revision: https://reviews.llvm.org/D26674
llvm-svn: 287037
Chad Rosier [Tue, 15 Nov 2016 21:34:12 +0000 (21:34 +0000)]
[AArch64] Add support for Qualcomm's Falkor CPU.
Differential Revision: https://reviews.llvm.org/D26673
llvm-svn: 287036
Tom Stellard [Tue, 15 Nov 2016 21:25:56 +0000 (21:25 +0000)]
AMDGPU/SI: Fix pattern for i16 = sign_extend i1
Reviewers: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye
Differential Revision: https://reviews.llvm.org/D26670
llvm-svn: 287035
Rui Ueyama [Tue, 15 Nov 2016 21:25:20 +0000 (21:25 +0000)]
[COFF] Fix manifest resource file creation on Windows.
createManifestRes was generating a MemoryBuffer from a TemporaryFile,
keeping the data but removing the file, before passing the file path
to CVTRES.exe, leading to the following error:
CVTRES : fatal error CVT1101: cannot open 'C:\Users\user\AppData\
Local\Temp\lld-output-resource-bfee19.res' for reading
With this, we instead create a new TemporaryFile before passing it to cvtres.
Patch from Rudy Pons!
llvm-svn: 287034
Sanjay Patel [Tue, 15 Nov 2016 21:19:28 +0000 (21:19 +0000)]
[x86] add tests for FP-logic equivalent instruction replacement
The ANDN test needs at least 3 different fixes.
llvm-svn: 287032
Chad Rosier [Tue, 15 Nov 2016 21:18:18 +0000 (21:18 +0000)]
[AArch64] Refactor test per Matthias' request.
llvm-svn: 287031
Kostya Serebryany [Tue, 15 Nov 2016 21:12:50 +0000 (21:12 +0000)]
[sanitizer-coverage] make sure asan does not instrument coverage guards (reported in https://github.com/google/oss-fuzz/issues/84)
llvm-svn: 287030
Kuba Brecka [Tue, 15 Nov 2016 21:08:51 +0000 (21:08 +0000)]
[asan] Re-enable the use-after-scope-types.cc test on Darwin, now that r287028 fixed the llvm-symbolizer issue that broke this test.
Differential Revision: https://reviews.llvm.org/D26537
llvm-svn: 287029
Kuba Brecka [Tue, 15 Nov 2016 21:07:03 +0000 (21:07 +0000)]
Fix llvm-symbolizer to correctly sort a symbol array and calculate symbol sizes
Sometimes, llvm-symbolizer gives wrong results due to incorrect sizes of some symbols. The reason for that was an incorrectly sorted array in computeSymbolSizes. The comparison function used subtraction of unsigned types, which is incorrect. Let's change this to return explicit -1 or 1.
Differential Revision: https://reviews.llvm.org/D26537
llvm-svn: 287028
Tim Northover [Tue, 15 Nov 2016 21:06:07 +0000 (21:06 +0000)]
GlobalISel: remove unused variable to silence warning.
llvm-svn: 287027
Kuba Brecka [Tue, 15 Nov 2016 21:00:55 +0000 (21:00 +0000)]
[tsan] Call pthread interceptors directly in TSan RTL unit tests
On Darwin, we're running the TSan unit tests without interceptors. To make sure TSan observes all the pthread events (thread creating, thread join, condvar signal, etc.) in tsan_posix.cc, we should call the pthread interceptors directly, as we already do in tsan_test_util_posix.cc. This fixes some flaky failures on Darwin bots.
Differential Revision: https://reviews.llvm.org/D26639
llvm-svn: 287026
Alexey Bataev [Tue, 15 Nov 2016 20:57:18 +0000 (20:57 +0000)]
[OPENMP] Fix stack use after delete, NFC.
Fixed possible use of stack variable after deletion.
llvm-svn: 287025
Argyrios Kyrtzidis [Tue, 15 Nov 2016 20:51:46 +0000 (20:51 +0000)]
[libclang] Generalize clang_getNumTemplateArguments and clang_getTemplateArgumentAsType to other kind of specializations.
Patch by Emilio Cobos Álvarez!
https://reviews.llvm.org/D26663
llvm-svn: 287024
Tim Northover [Tue, 15 Nov 2016 20:26:01 +0000 (20:26 +0000)]
llvm-objdump: deal with unexpected object files more gracefully.
Specifically, we don't want to segfault on release builds, so print the problem
instead.
llvm-svn: 287022
Matt Arsenault [Tue, 15 Nov 2016 20:22:55 +0000 (20:22 +0000)]
AMDGPU: Enable store clustering
Also respect the TII hook for these like the generic code does
in case we want a flag later to disable this.
llvm-svn: 287021
Eric Fiselier [Tue, 15 Nov 2016 20:21:30 +0000 (20:21 +0000)]
Add .clang-format to libc++
Adding a Clang Format file to libc++ and which style it should use has been
discussed a couple of times. This patch finally adds a .clang-format file
which specifies LLVM styles.
Personally I dislike how the LLVM style handles much of the meta-programming
in libc++. However the general consensus was that libc++ should prefer the
LLVM style and make adjustments where needed.
Note that using clang-format on changes is not required, especially for
changes within the headers. However formatting tests should be encouraged.
llvm-svn: 287020
Haicheng Wu [Tue, 15 Nov 2016 20:16:48 +0000 (20:16 +0000)]
[AArch64] Lower multiplication by a constant int to shl+add+shl
Lower a = b * C where C = (2^n + 1) * 2^m to
add w0, w0, w0, lsl n
lsl w0, w0, m
Differential Revision: https://reviews.llvm.org/D229245
llvm-svn: 287019
Matt Arsenault [Tue, 15 Nov 2016 20:14:27 +0000 (20:14 +0000)]
AMDGPU: Analyze mubuf with immediate soffset
Fixes giving up on clustering common addr64 accesses with
constant 0 soffset.
llvm-svn: 287018
Zachary Turner [Tue, 15 Nov 2016 20:13:14 +0000 (20:13 +0000)]
Make some code not manipulate the underlying string of a StreamString.
Differential Revision: https://reviews.llvm.org/D26618
llvm-svn: 287017
Zachary Turner [Tue, 15 Nov 2016 20:11:01 +0000 (20:11 +0000)]
One more fix for Printf. Apparently I fail at incremental builds.
llvm-svn: 287016
Matt Arsenault [Tue, 15 Nov 2016 19:58:54 +0000 (19:58 +0000)]
AMDGPU: Fix return after else
llvm-svn: 287015
Wei Mi [Tue, 15 Nov 2016 19:42:05 +0000 (19:42 +0000)]
Revert r286999 which caused buildbot test failures. Some testcases need to be made target specific.
llvm-svn: 287014
Matt Arsenault [Tue, 15 Nov 2016 19:34:37 +0000 (19:34 +0000)]
AMDGPU: Replace assert(false) with unreachable
llvm-svn: 287013
Justin Lebar [Tue, 15 Nov 2016 19:15:57 +0000 (19:15 +0000)]
[CUDA] Mark __libcpp_{isnan,isinf,isfinite} as constexpr.
Summary:
This makes these functions available on host and device, which is
necessary to compile <complex> for the device.
Reviewers: hfinkel, EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25403
llvm-svn: 287012
Davide Italiano [Tue, 15 Nov 2016 19:15:18 +0000 (19:15 +0000)]
[ELF] Rewrite isMips64EL() using isMipsELF64(). NFCI.
llvm-svn: 287011
Rui Ueyama [Tue, 15 Nov 2016 19:09:13 +0000 (19:09 +0000)]
Partially revert r287009: Remove trailing whitespace.
This reverts part of r287009 because I accidentally changed binary files.
llvm-svn: 287010
Rui Ueyama [Tue, 15 Nov 2016 19:07:17 +0000 (19:07 +0000)]
Remove trailing whitespace.
llvm-svn: 287009
Eric Liu [Tue, 15 Nov 2016 19:05:40 +0000 (19:05 +0000)]
Add comments on how to print error retuned by tooling::Replacements::add().
llvm-svn: 287008
Stanislav Mekhanoshin [Tue, 15 Nov 2016 19:00:15 +0000 (19:00 +0000)]
[AMDGPU] Add wave barrier builtin
The wave barrier represents the discardable barrier. Its main purpose is to
carry convergent attribute, thus preventing illegal CFG optimizations. All lanes
in a wave come to convergence point simultaneously with SIMT, thus no special
instruction is needed in the ISA. The barrier is discarded during code generation.
Differential Revision: https://reviews.llvm.org/D26585
llvm-svn: 287007
Stanislav Mekhanoshin [Tue, 15 Nov 2016 18:58:03 +0000 (18:58 +0000)]
[AMDGPU] Add wave barrier builtin
The wave barrier represents the discardable barrier. Its main purpose is to
carry convergent attribute, thus preventing illegal CFG optimizations. All lanes
in a wave come to convergence point simultaneously with SIMT, thus no special
instruction is needed in the ISA. The barrier is discarded during code generation.
Differential Revision: https://reviews.llvm.org/D26584
llvm-svn: 287006
Benjamin Kramer [Tue, 15 Nov 2016 18:56:39 +0000 (18:56 +0000)]
[Modules] Replace arrays with init lists.
Thi way the compiler can pick the optimal storage duration. It's also
more readable. No functional change intended.
llvm-svn: 287005
Vedant Kumar [Tue, 15 Nov 2016 18:48:36 +0000 (18:48 +0000)]
Revert "P0503R0, adopted in Issaquah, rewords some requirements on nullptr_t and istream_iterator. No code changes were needed, but I updated a few tests. Also resolved P0509 and P0521, which required no changes to the library or tests."
This reverts commit r286884, because it breaks the Xcode 7 builders:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/1583
Here is a PR that tracks the issue:
https://llvm.org/bugs/show_bug.cgi?id=31016
llvm-svn: 287004
Sanjay Patel [Tue, 15 Nov 2016 18:44:53 +0000 (18:44 +0000)]
[x86] auto-generate checks; NFC
Also, fix the test params to use an attribute rather than a CPU model
and remove the AVX run because that does nothing but check for a 'v'
prefix in all of these tests.
llvm-svn: 287003
Rui Ueyama [Tue, 15 Nov 2016 18:41:52 +0000 (18:41 +0000)]
Refactor symbol version assignmnt code.
The code to handle symbol versions is getting tricky and hard to
understand, so it is probably time to simplify it. This patch does
the following.
- Add `DemangledSyms` variable to SymbolTable so that we don't
need to pass it around to findDemangled.
- Define `initDemangledSyms` to initialize the variable lazily.
- hasExternCpp is removed because we no longer have to initialize
the map eagerly.
- scanScriptVersion is split.
- Comments are updated.
llvm-svn: 287002
Devin Coughlin [Tue, 15 Nov 2016 18:40:46 +0000 (18:40 +0000)]
[analyzer] Add check for when block is called with too few arguments.
The CallAndMessageChecker has an existing check for when a function pointer
is called with too few arguments. Extend this logic to handle the block
case, as well. While we're at it, do a drive-by grammar correction
("less" --> "fewer") on the diagnostic text.
llvm-svn: 287001
Reid Kleckner [Tue, 15 Nov 2016 18:38:41 +0000 (18:38 +0000)]
[asan] Reduce prototype duplication with decltype
NFC
llvm-svn: 287000
Wei Mi [Tue, 15 Nov 2016 18:35:53 +0000 (18:35 +0000)]
[LSR] Allow formula containing Reg for SCEVAddRecExpr related with outerloop.
In RateRegister of existing LSR, if a formula contains a Reg which is a SCEVAddRecExpr,
and this SCEVAddRecExpr's loop is an outerloop, the formula will be marked as Loser
and dropped.
Suppose we have an IR that %for.body is outerloop and %for.body2 is innerloop. LSR only
handle inner loop now so only %for.body2 will be handled.
Using the logic above, formula like
reg(%array) + reg({1,+, %size}<%for.body>) + 1*reg({0,+,1}<%for.body2>) will be dropped
no matter what because reg({1,+, %size}<%for.body>) is a SCEVAddRecExpr type reg related
with outerloop. Only formula like
reg(%array) + 1*reg({{1,+, %size}<%for.body>,+,1}<nuw><nsw><%for.body2>) will be kept
because the SCEVAddRecExpr related with outerloop is folded into the initial value of the
SCEVAddRecExpr related with current loop.
But in some cases, we do need to share the basic induction variable
reg{0 ,+, 1}<%for.body2> among LSR Uses to reduce the final total number of induction
variables used by LSR, so we don't want to drop the formula like
reg(%array) + reg({1,+, %size}<%for.body>) + 1*reg({0,+,1}<%for.body2>) unconditionally.
From the existing comment, it tries to avoid considering multiple level loops at the same time.
However, existing LSR only handles innermost loop, so for any SCEVAddRecExpr with a loop other
than current loop, it is an invariant and will be simple to handle, and the formula doesn't have
to be dropped.
Differential Revision: https://reviews.llvm.org/D26429
llvm-svn: 286999
Pawel Bylica [Tue, 15 Nov 2016 18:29:24 +0000 (18:29 +0000)]
Integer legalization: fix MUL expansion
Summary:
This fixes the runtime results produces by the fallback multiplication expansion introduced in r270720.
For tests I created a fuzz tester that compares the results with Boost.Multiprecision.
Reviewers: hfinkel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26628
llvm-svn: 286998
Reid Kleckner [Tue, 15 Nov 2016 18:29:17 +0000 (18:29 +0000)]
[asan] Don't assert that a target is within 2GB on 32-bit Windows
Summary:
In a 32-bit address space, PC-relative jump targets are wrapped, so a
direct branch at 0x90000001 can reach address 0x10000000 with a
displacement of 0x7FFFFFFFF. This can happen in applications, such as
Chrome, that are linked with /LARGEADDRESSAWARE.
Reviewers: etienneb
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D26650
llvm-svn: 286997
Simon Pilgrim [Tue, 15 Nov 2016 18:28:07 +0000 (18:28 +0000)]
Fixed spelling in comments. NFCI.
llvm-svn: 286996
Zaara Syeda [Tue, 15 Nov 2016 18:04:13 +0000 (18:04 +0000)]
vector load store with length (left justified) clang portion
llvm-svn: 286994
Zaara Syeda [Tue, 15 Nov 2016 17:54:19 +0000 (17:54 +0000)]
vector load store with length (left justified) llvm portion
llvm-svn: 286993
Rui Ueyama [Tue, 15 Nov 2016 17:51:09 +0000 (17:51 +0000)]
Rename variables of type SymbolVersion.
In this file, `sym` was used for both SymbolBody and SymbolVersion
although the two are completely different.
llvm-svn: 286992
Rui Ueyama [Tue, 15 Nov 2016 17:51:07 +0000 (17:51 +0000)]
Rename function to avoid function overloading.
We had two functions with the same name to read completely different
things. That was confusing.
llvm-svn: 286991
Malcolm Parsons [Tue, 15 Nov 2016 17:49:00 +0000 (17:49 +0000)]
[clang-tidy] Change readability-redundant-member-init to get base type from constructor
Summary: Fixes PR30835
Reviewers: alexfh, hokein, aaron.ballman
Subscribers: Prazek, cfe-commits
Differential Revision: https://reviews.llvm.org/D26118
llvm-svn: 286990
Sanjay Patel [Tue, 15 Nov 2016 17:47:13 +0000 (17:47 +0000)]
fix formatting; NFC
llvm-svn: 286989
Wei Mi [Tue, 15 Nov 2016 17:34:52 +0000 (17:34 +0000)]
[IndVars] Change the order to compute WidenAddRec in widenIVUse.
When both WidenIV::getWideRecurrence and WidenIV::getExtendedOperandRecurrence
return non-null but different WideAddRec, if getWideRecurrence is called
before getExtendedOperandRecurrence, we won't bother to call
getExtendedOperandRecurrence again. But As we know it is possible that after
SCEV folding, we cannot prove the legality using the SCEVAddRecExpr returned
by getWideRecurrence. Meanwhile if getExtendedOperandRecurrence returns non-null
WideAddRec, we know for sure that it is legal to do widening for current instruction.
So it is better to put getExtendedOperandRecurrence before getWideRecurrence, which
will increase the chance of successful widening.
Differential Revision: https://reviews.llvm.org/D26059
llvm-svn: 286987
Stephan T. Lavavej [Tue, 15 Nov 2016 17:00:38 +0000 (17:00 +0000)]
[libcxx] [test] D26627: Fix ordering assumptions in unordered container tests.
llvm-svn: 286984
Stephan T. Lavavej [Tue, 15 Nov 2016 17:00:32 +0000 (17:00 +0000)]
[libcxx] [test] D26625: future_error::what() is implementation-defined.
llvm-svn: 286983
Stephan T. Lavavej [Tue, 15 Nov 2016 17:00:24 +0000 (17:00 +0000)]
[libcxx] [test] D26624: Fix bucket_count() assumptions.
With a max_load_factor of 1.0, the only guarantee is that
bucket_count() >= size(). (Note: setting max_load_factor without
rehashing isn't supposed to affect this, because setting
max_load_factor is currently specified to be constant time.)
llvm-svn: 286982
Diana Picus [Tue, 15 Nov 2016 16:42:10 +0000 (16:42 +0000)]
[ARM] GlobalISel: Remove unused members. NFCI
This silences some warnings that I didn't see with my host compiler.
llvm-svn: 286981
Craig Topper [Tue, 15 Nov 2016 16:27:33 +0000 (16:27 +0000)]
[AVX-512] Add AVX-512 vector shift intrinsics to memory santitizer.
Just needed to add the intrinsics to the exist switch. The code is generic enough to support the wider vectors with no changes.
llvm-svn: 286980
Simon Pilgrim [Tue, 15 Nov 2016 16:24:40 +0000 (16:24 +0000)]
[X86][SSE] Improve SINT_TO_FP of boolean vector results (signum)
This patch helps avoids poor legalization of boolean vector results (e.g. 8f32 -> 8i1 -> 8i16) that feed into SINT_TO_FP by inserting an early SIGN_EXTEND and so help improve the truncation logic.
This is not necessary for AVX512 targets where boolean vectors are legal - AVX512 manages to lower ( sint_to_fp vXi1 ) into some form of ( select mask, 1.0f , 0.0f ) in most cases.
Fix for PR13248
Differential Revision: https://reviews.llvm.org/D26583
llvm-svn: 286979
Sanjay Patel [Tue, 15 Nov 2016 16:01:16 +0000 (16:01 +0000)]
[InstCombine] add tests for bitcasted selects; NFC
llvm-svn: 286978
Zaara Syeda [Tue, 15 Nov 2016 15:57:33 +0000 (15:57 +0000)]
test commmit
llvm-svn: 286977
Pablo Barrio [Tue, 15 Nov 2016 15:42:23 +0000 (15:42 +0000)]
Revert "[JumpThreading] Unfold selects that depend on the same condition"
This reverts commit
ac54d0066c478a09c7cd28d15d0f9ff8af984afc.
llvm-svn: 286976
Pablo Barrio [Tue, 15 Nov 2016 15:42:17 +0000 (15:42 +0000)]
Revert "[JumpThreading] Prevent non-deterministic use lists"
This reverts commit
f2c2f5354070469dac253373c66527ca971ddc66.
llvm-svn: 286975
Diana Picus [Tue, 15 Nov 2016 15:38:15 +0000 (15:38 +0000)]
[ARM] Make sure GlobalISel is only initialized once. NFCI
Move some code inside the proper 'if' block to make sure it is only run once,
when the subtarget is first created. Things can still break if we use different
ARM target machines or if we have functions with different 'target-cpu' or
'target-features', we should fix that too in the future.
llvm-svn: 286974
Cameron Desrochers [Tue, 15 Nov 2016 15:07:07 +0000 (15:07 +0000)]
[clang-format] Fixed line merging of more than two lines
Differential Revision: https://reviews.llvm.org/D19063
llvm-svn: 286973
Tony Jiang [Tue, 15 Nov 2016 14:30:56 +0000 (14:30 +0000)]
[PowerPC] Implement BE VSX load/store builtins - clang portion.
This patch implements all the overloads for vec_xl_be and vec_xst_be. On BE,
they behaves exactly the same with vec_xl and vec_xst, therefore they are
simply implemented by defining a matching macro. On LE, they are implemented
by defining new builtins and intrinsics. For int/float/long long/double, it
is just a load (lxvw4x/lxvd2x) or store(stxvw4x/stxvd2x). For char/char/short,
we also need some extra shuffling before or after call the builtins to get the
desired BE order. For int128, simply call vec_xl or vec_xst.
llvm-svn: 286971
Robert Lougher [Tue, 15 Nov 2016 14:27:33 +0000 (14:27 +0000)]
[LoopVectorizer] When estimating reg usage, unused insts may "end" another use
The register usage algorithm incorrectly treats instructions whose value is
not used within the loop (e.g. those that do not produce a value).
The algorithm first calculates the usages within the loop. It iterates over
the instructions in order, and records at which instruction index each use
ends (in fact, they're actually recorded against the next index, as this is
when we want to delete them from the open intervals).
The algorithm then iterates over the instructions again, adding each
instruction in turn to a list of open intervals. Instructions are then
removed from the list of open intervals when they occur in the list of uses
ended at the current index.
The problem is, instructions which are not used in the loop are skipped.
However, although they aren't used, the last use of a value may have been
recorded against that instruction index. In this case, the use is not deleted
from the open intervals, which may then bump up the estimated register usage.
This patch fixes the issue by simply moving the "is used" check after the loop
which erases the uses at the current index.
Differential Revision: https://reviews.llvm.org/D26554
llvm-svn: 286969
Tony Jiang [Tue, 15 Nov 2016 14:25:56 +0000 (14:25 +0000)]
[PowerPC] Implement BE VSX load/store builtins - llvm portion.
This patch implements all the overloads for vec_xl_be and vec_xst_be. On BE,
they behaves exactly the same with vec_xl and vec_xst, therefore they are
simply implemented by defining a matching macro. On LE, they are implemented
by defining new builtins and intrinsics. For int/float/long long/double, it
is just a load (lxvw4x/lxvd2x) or store(stxvw4x/stxvd2x). For char/char/short,
we also need some extra shuffling before or after call the builtins to get the
desired BE order. For int128, simply call vec_xl or vec_xst.
llvm-svn: 286967
Diana Picus [Tue, 15 Nov 2016 14:11:11 +0000 (14:11 +0000)]
Get GlobalISel to build on Linux after r286407
r286407 has introduced calls to llvm::AddLandingPadInfo, which lives in the
SelectionDAG component. Add it to LLVMBuild to avoid linker failures on Linux.
llvm-svn: 286962
Zvi Rackover [Tue, 15 Nov 2016 13:50:35 +0000 (13:50 +0000)]
[X86][FastISel] Assert that we are dealing with arithmetic with overflow intrinsics. NFC
llvm-svn: 286961
Sam Kolton [Tue, 15 Nov 2016 13:39:07 +0000 (13:39 +0000)]
[AMDGPU] TableGen: change individual instruction flags to bit type from bits<1>
Summary: This is needed to be able to use this flags in InstrMappings.
Reviewers: tstellarAMD, vpykhtin
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye
Differential Revision: https://reviews.llvm.org/D26666
llvm-svn: 286960
Zvi Rackover [Tue, 15 Nov 2016 13:29:23 +0000 (13:29 +0000)]
[X86][FastISel] Fix lowering of overflow result on AVX512 targets
Summary:
Fix a case where the overflow value of type i1, which is legal on AVX512, was assigned to a VK1 register class.
We always want this value to be assigned to a GPR since the overflow return value is lowered to a SETO instruction.
Fixes pr30981.
Reviewers: mkuper, igorb, craig.topper, guyblank, qcolombet
Subscribers: qcolombet, llvm-commits
Differential Revision: https://reviews.llvm.org/D26620
llvm-svn: 286958
Florian Hahn [Tue, 15 Nov 2016 13:28:42 +0000 (13:28 +0000)]
Test commit, remove trailing space.
This commit is used to test commit access.
llvm-svn: 286957
Rafael Espindola [Tue, 15 Nov 2016 13:21:32 +0000 (13:21 +0000)]
clang format include/llvm/Support/ELF.h. NFC.
llvm-svn: 286956
Eugene Leviant [Tue, 15 Nov 2016 13:19:21 +0000 (13:19 +0000)]
[ELF] Don't check Out<ELFT>::RelaPlt as it's always non-zero. NFC
llvm-svn: 286955
NAKAMURA Takumi [Tue, 15 Nov 2016 13:16:50 +0000 (13:16 +0000)]
DWARFAbbreviationDeclaration.h: Fix a typo in r286924. [-Wdocumentation]
llvm-svn: 286954
Alexey Bataev [Tue, 15 Nov 2016 13:15:20 +0000 (13:15 +0000)]
[OPENMP] Fix for PR30632: Name mangling issue.
Reworked fix after comments from Richard Smith. We must skip all
CapturedDecl-based contexts when trying to get correct mangling number
context.
llvm-svn: 286953
Michal Gorny [Tue, 15 Nov 2016 12:54:10 +0000 (12:54 +0000)]
[test] Correctly include build llvm_shlib_dir in stand-alone builds
Add the build llvm_shlib_dir into LD_LIBRARY_PATH before the directory
specified as llvm_libs_dir, in order to fix stand-alone builds
attempting to use installed clang libraries.
In case of stand-alone builds llvm_libs_dir specifies the location of
installed LLVM libraries which can also contain an older version
(previous build) of clang libraries. Therefore, ensure to specify
llvm_shlib_dir (which is always the build tree path) before
the potentially-system llvm_libs_dir.
Differential Revision: https://reviews.llvm.org/D26115
llvm-svn: 286952
Joerg Sonnenberger [Tue, 15 Nov 2016 12:39:46 +0000 (12:39 +0000)]
Introduce TLI predicative for base-relative Jump Tables.
For 64bit ABIs it is common practice to use relative Jump Tables with
potentially different relocation bases. As the logic for the jump table
itself doesn't depend on the relocation base, make it easier for targets
to use the generic logic. Start by dropping the now redundant MIPS logic.
Differential Revision: https://reviews.llvm.org/D26578
llvm-svn: 286951
Eugene Leviant [Tue, 15 Nov 2016 12:26:55 +0000 (12:26 +0000)]
[ELF] Convert DynamicSection to input section.
This patch introduces the following changes:
- DynamicSection now inherits InputSection<ELFT> and was moved
to SyntheticSections.h/.cpp.
- Link and Entsize fields of DynamicSection are propagated to
its output section
- In<ELFT>::SyntheticSections was removed.
- Finalization of synthetic sections was removed from
OutputSection<ELFT>::finalize. Now finalizeSyntheticSections is
used instead.
Differential revision: https://reviews.llvm.org/D26603
llvm-svn: 286950
Javed Absar [Tue, 15 Nov 2016 11:34:54 +0000 (11:34 +0000)]
[ARM] Add machine scheduler for Cortex-R52
This patch adds the Sched Machine Model for Cortex-R52.
Details of the pipeline and descriptions are in comments
in file ARMScheduleR52.td included in this patch.
Reviewers: rengolin, jmolloy
Differential Revision: https://reviews.llvm.org/D26500
llvm-svn: 286949
Sam McCall [Tue, 15 Nov 2016 10:58:16 +0000 (10:58 +0000)]
Fix uninitialized members.
Summary: Fix uninitialized members.
Reviewers: jingham
Subscribers: jingham, lldb-commits
Differential Revision: https://reviews.llvm.org/D26528
llvm-svn: 286947
Daniel Sanders [Tue, 15 Nov 2016 10:13:09 +0000 (10:13 +0000)]
Fix -Wunused introduced in r286945 for release builds.
llvm-svn: 286946
Daniel Sanders [Tue, 15 Nov 2016 09:51:02 +0000 (09:51 +0000)]
[tablegen] Extract portions of AsmMatcherEmitter for re-use by another generator. NFC.
Summary:
This change is preparation for a change that will allow targets to verify that the instructions
they emit meet the predicates they specify. This is useful to ensure that C++
legalization/lowering/instruction-selection doesn't incorrectly select code for a different
subtarget than intended. Such cases are not caught by the integrated assembler when emitting
instructions directly to an object file.
Reviewers: qcolombet
Subscribers: qcolombet, beanz, mgorny, llvm-commits, modocache
Differential Revision: https://reviews.llvm.org/D25614
llvm-svn: 286945
Alexey Bataev [Tue, 15 Nov 2016 09:11:50 +0000 (09:11 +0000)]
[OPENMP] Fixed codegen for 'omp cancel' construct.
If 'omp cancel' construct is used in a worksharing construct it may cause
hanging of the software in case if reduction clause is used. Patch fixes
this problem by avoiding extra reduction processing for branches that
were canceled.
llvm-svn: 286944
Haojian Wu [Tue, 15 Nov 2016 09:06:59 +0000 (09:06 +0000)]
[clang-move] Make the output code look more pretty.
Summary:
Add decent blank lines between declarations:
* Add extra blank line after #define or #includes.
* Add extra blank line between declarations.
* Add extra blank line in front of #endif.
Previously, the new generated code is quite tight:
```
#ifndef FOO_H
#define FOO_H
namespace a {
class A { public: int f(); };
int A::f() { return 0; }
} // namespace a
#endif // FOO_H
```
After this patch, the code looks like:
```
#ifndef FOO_H
#define FOO_H
namespace a {
class A { public: int f(); };
int A::f() { return 0; }
} // namespace a
#endif // FOO_H
```
Reviewers: ioeric
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26493
llvm-svn: 286943
Adam Nemet [Tue, 15 Nov 2016 08:40:51 +0000 (08:40 +0000)]
[opt-viewer] Add support for libYAML for faster parsing
This results in a speed-up of over 6x on sqlite3.
Before:
$ time -p /org/llvm/utils/opt-viewer/opt-viewer.py ./MultiSource/Applications/sqlite3/CMakeFiles/sqlite3.dir/sqlite3.c.opt.yaml html
real 415.07
user 410.00
sys 4.66
After with libYAML:
$ time -p /org/llvm/utils/opt-viewer/opt-viewer.py ./MultiSource/Applications/sqlite3/CMakeFiles/sqlite3.dir/sqlite3.c.opt.yaml html
real 63.96
user 60.03
sys 3.67
I followed these steps to get libYAML working with PyYAML: http://rmcgibbo.github.io/blog/2013/05/23/faster-yaml-parsing-with-libyaml/
llvm-svn: 286942
George Rimar [Tue, 15 Nov 2016 08:19:02 +0000 (08:19 +0000)]
[ELF] - Do not create reserved symbols in case of relocatable output.
This patch stops creating symbols like __ehdr_start,
_end/_etext_edata,__tls_get_addr when using -r.
This fixes PR30984.
Differential revision: https://reviews.llvm.org/D26600
llvm-svn: 286941
George Rimar [Tue, 15 Nov 2016 08:07:14 +0000 (08:07 +0000)]
[ELF] - Better diagnostic for relative relocation to an absolute value error.
Patch adds a filename to that error message.
I faced next error when debugged one of FreeBSD port:
error: relocation R_X86_64_PLT32 cannot refer to absolute symbol __tls_get_addr
error message was poor and this patch improves it to show the locations
of symbol declaration and using.
Differential revision: https://reviews.llvm.org/D26508
llvm-svn: 286940
George Rimar [Tue, 15 Nov 2016 07:56:28 +0000 (07:56 +0000)]
[ELF] - Allow symbols of STT_NOTYPE to be associated with SHT_SYMTAB sections.
Found this when tried to link lang/ccl FreeBSD port.
Issue is very close to D23201.
This is the reason of lang/ccl port link fail.
GNU assembler 2.17.50 [FreeBSD] 2007-07-03 could generate broken objects,
where notype symbols are associated with symtab:
...
[ 9] .symtab SYMTAB
0000000000000000 00003c78
0000000000006858 0000000000000018 10 803 8
...
192:
000000000000000d 0 NOTYPE LOCAL DEFAULT 9 _cons_org
Patch allows to handle such objects.
Differential revision: https://reviews.llvm.org/D26613
llvm-svn: 286939
Asaf Badouh [Tue, 15 Nov 2016 07:55:22 +0000 (07:55 +0000)]
DAGCombiner: fix combine of trunc and select
bugzilla:
https://llvm.org/bugs/show_bug.cgi?id=29002
pr29002
Differential Revision: https://reviews.llvm.org/D26449
llvm-svn: 286938
Vitaly Buka [Tue, 15 Nov 2016 07:32:51 +0000 (07:32 +0000)]
Avoid creating reference from nullptr.
Summary:
getFile() can return nullptr. This usually happens when Rels is empty so
the reference is never used. Still UBSAN complains.
Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26662
llvm-svn: 286937
Matt Arsenault [Tue, 15 Nov 2016 06:49:28 +0000 (06:49 +0000)]
TableGen: Add operator !or
llvm-svn: 286936
Zvi Rackover [Tue, 15 Nov 2016 06:34:33 +0000 (06:34 +0000)]
[X86][GlobalISel] Add minimal call lowering support to the IRTranslator
Summary:
Add basic functionality to support call lowering for X86.
Currently only supports functions which return void and take zero arguments.
Inspired by commit 286573.
Reviewers: ab, qcolombet, t.p.northover
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26593
llvm-svn: 286935
Craig Topper [Tue, 15 Nov 2016 05:21:55 +0000 (05:21 +0000)]
[AVX-512] Add an example test case for PR31018.
llvm-svn: 286934
Craig Topper [Tue, 15 Nov 2016 05:04:51 +0000 (05:04 +0000)]
[X86] Add LLVM version number for each intrinsic handled by auto upgrade for age tracking.
One day we'd like to remove some of this autoupgrade support and it will be easier if we know how long some of it has been around.
Differential Revision: https://reviews.llvm.org/D26321
llvm-svn: 286933
Marshall Clow [Tue, 15 Nov 2016 05:03:22 +0000 (05:03 +0000)]
Missed one of the try blocks the first time :-(. Thanks to Renato for the heads up.
llvm-svn: 286932
Matt Arsenault [Tue, 15 Nov 2016 02:25:28 +0000 (02:25 +0000)]
AMDGPU: Fix f16 fabs/fneg
llvm-svn: 286931
Lang Hames [Tue, 15 Nov 2016 02:14:57 +0000 (02:14 +0000)]
[ORC] Work around an apparent modules/linkage issue.
<rdar://problem/
29247092>
llvm-svn: 286930
Anna Zaks [Tue, 15 Nov 2016 01:57:29 +0000 (01:57 +0000)]
[asan] Fixup to r286608 that makes the test pass on iOS.
TARGET_OS_IPHONE is defined in TargetConditionals.h. Without the include the
iOS path is never triggered.
llvm-svn: 286929
Rui Ueyama [Tue, 15 Nov 2016 01:57:05 +0000 (01:57 +0000)]
Simplify identify_magic.
This patch defines a memcmp-ish helper function to simplify identify_magic.
llvm-svn: 286928