Eugene Leviant [Sun, 23 Sep 2018 13:27:47 +0000 (13:27 +0000)]
[WholeProgramDevirt] Don't process declarations when building type id map
Differential revision: https://reviews.llvm.org/D52175
llvm-svn: 342836
Simon Pilgrim [Sun, 23 Sep 2018 11:28:47 +0000 (11:28 +0000)]
Build PassBuilder.cpp with /bigobj to try and appease MSVC EXPENSIVE_CHECKS buildbot
llvm-svn: 342835
Kristof Umann [Sun, 23 Sep 2018 09:16:27 +0000 (09:16 +0000)]
[analyzer][UninitializedObjectChecker] Using the new const methods of ImmutableList
Differential Revision: https://reviews.llvm.org/D51886
llvm-svn: 342834
Petr Hosek [Sun, 23 Sep 2018 08:46:31 +0000 (08:46 +0000)]
[CMake] Use internal_linkage rather than always_inline for libc++
This is a workaround for PR39053 which was uncovered by D50652 when
the default attribute has been changed from internal_linkage to
always_inline.
Differential Revision: https://reviews.llvm.org/D52402
llvm-svn: 342833
David Carlier [Sun, 23 Sep 2018 08:30:17 +0000 (08:30 +0000)]
[CStringSyntaxChecker] Check strlcat sizeof check
Assuming strlcat is used with strlcpy we check as we can if the last argument does not equal os not larger than the buffer.
Advising the proper usual pattern.
Reviewers: george.karpenkov, NoQ, MaskRay
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D49722
llvm-svn: 342832
Fangrui Song [Sun, 23 Sep 2018 08:23:48 +0000 (08:23 +0000)]
[Index] Report specialization bases as references when IndexImplicitInstantiation is true
Summary:
template <typename T> struct B {};
template <typename T> struct D : B<T> {}; // `B` was not reported as a reference
This patch fixes this.
Reviewers: akyrtzi, arphaman, devnexen
Reviewed By: devnexen
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D52331
llvm-svn: 342831
Craig Topper [Sun, 23 Sep 2018 06:49:48 +0000 (06:49 +0000)]
[X86] Add isel pattern for (v8i16 (sext (v8i1))) with DQI and no BWI.
Our lowering that tries to avoid this sign extend can be defeated by the DAG combine folding it with a truncate.
The pattern needs to extend to an v8i32 then truncate back down to v8i16.
llvm-svn: 342830
Craig Topper [Sun, 23 Sep 2018 06:49:47 +0000 (06:49 +0000)]
[X86] Fix a few typos in comments.
llvm-svn: 342829
Lang Hames [Sun, 23 Sep 2018 02:09:18 +0000 (02:09 +0000)]
[ORC] Update ORC C bindings to use the new llvm::Error C API.
This replaces instances of the LLVMOrcErrorCode type with LLVMErrorRef,
simplifying the implementation of the OrcCBindingsStack class and ORC
C API bindings and making it possible to return arbitrary (wrapped)
llvm::Errors.
llvm-svn: 342828
Eric Fiselier [Sun, 23 Sep 2018 00:48:05 +0000 (00:48 +0000)]
Fix modules build with shared library.
r341994 caused clangAnalysis to pull all of the AST matchers
library into clang. Due to inline key functions in the headers,
importing the AST matchers library gives a link dependency on the
AST matchers (and thus the AST), which clang should not
have.
This patch works around the issues by excluding the offending
libclangAnalysis header in the modulemap.
llvm-svn: 342827
Craig Topper [Sat, 22 Sep 2018 23:12:34 +0000 (23:12 +0000)]
[DAGCombiner] Simplify some code in visitBITCAST. NFCI
llvm-svn: 342826
Fangrui Song [Sat, 22 Sep 2018 22:49:38 +0000 (22:49 +0000)]
[Index] Fix header guard naming
llvm-svn: 342825
Tri Vo [Sat, 22 Sep 2018 22:17:50 +0000 (22:17 +0000)]
[AArch64] Support adding X[8-15,18] registers as CSRs.
Summary:
Specifying X[8-15,18] registers as callee-saved is used to support
CONFIG_ARM64_LSE_ATOMICS in Linux kernel. As part of this patch we:
- use custom CSR list/mask when user specifies custom CSRs
- update Machine Register Info's list of CSRs with additional custom CSRs in
LowerCall and LowerFormalArguments.
Reviewers: srhines, nickdesaulniers, efriedma, javed.absar
Reviewed By: nickdesaulniers
Subscribers: kristof.beyls, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D52216
llvm-svn: 342824
Aaron Puchert [Sat, 22 Sep 2018 21:56:16 +0000 (21:56 +0000)]
Eliminate some unneeded signed/unsigned conversions
No functional change is intended, but generally this should be a bit
more safe.
llvm-svn: 342823
Louis Dionne [Sat, 22 Sep 2018 21:30:12 +0000 (21:30 +0000)]
[NFC][libc++] Fix typo in the description of LIBCXX_INCLUDE_BENCHMARKS
llvm-svn: 342822
Eric Fiselier [Sat, 22 Sep 2018 21:01:07 +0000 (21:01 +0000)]
Mark [[nodiscard]] tests unsupported on GCC prior to 7.0
llvm-svn: 342821
Eric Fiselier [Sat, 22 Sep 2018 20:09:02 +0000 (20:09 +0000)]
Fix UB in SIMD tests.
One of the SIMD tests attempted to left shift a value by 42, which
is UB when the left hand side is a 32 bit integer type.
This patch adjusts the test to use the value 4 instead of 42.
llvm-svn: 342820
Roman Lebedev [Sat, 22 Sep 2018 20:07:02 +0000 (20:07 +0000)]
[libcxx] Readjust nodiscard_extensions.pass.cpp test - just disable for ASAN
In rL342814, i have committed a blind fix to unbreak the asan buildbot,
but as it was later discussed, the leak is intentional,
so we can not fix the failure that way.
So this reverts the leak 'fix',
and simply disables the test in the presence of ASAN.
llvm-svn: 342819
Eric Fiselier [Sat, 22 Sep 2018 20:03:47 +0000 (20:03 +0000)]
Mark test as flaky
llvm-svn: 342818
Eric Fiselier [Sat, 22 Sep 2018 19:52:12 +0000 (19:52 +0000)]
Update docs to reference new libc++ mailing lists.
llvm-svn: 342817
Eric Fiselier [Sat, 22 Sep 2018 19:49:29 +0000 (19:49 +0000)]
Correct docs to reference the new libc++ lists.
We recently added libcxx-dev and libcxx-commits mailing lists.
This patch updates the libc++ documentation to correctly reference
the libc++ lists instead of the old Clang ones.
llvm-svn: 342816
Eric Fiselier [Sat, 22 Sep 2018 19:22:36 +0000 (19:22 +0000)]
Fix incorrectly aligned exceptions in 32 bit builds.
This patch fixes a bug where exceptions in 32 bit builds
would be incorrectly aligned because malloc only provides 8 byte aligned
memory where 16 byte alignment is needed.
This patch makes libc++abi correctly use posix_memalign when it's
available. This requires defining _LIBCPP_BUILDING_LIBRARY so that
libc++ only defines _LIBCPP_HAS_NO_ALIGNED_ALLOCATION when libc doesn't
support it and not when aligned new/delete are disable for other
reasons.
This bug somehow made it into the 7.0 release, making it a regression.
Therefore this patch should be included in the next dot release.
llvm-svn: 342815
Roman Lebedev [Sat, 22 Sep 2018 19:09:57 +0000 (19:09 +0000)]
[libcxx] Blind attempt to fix harmless leak in nodiscard_extensions.pass.cpp test
libcxx-libcxxabi-x86_64-linux-ubuntu-asan complains about a leak here.
llvm-svn: 342814
Louis Dionne [Sat, 22 Sep 2018 18:39:38 +0000 (18:39 +0000)]
[libcxx] Fix the definition of the check-cxx-abilist target on Darwin
Summary:
r342805 added support for the check-cxx-abilist target on FreeBSD, but broke
the target on macOS in doing so. The problem is that the GENERIC_TARGET_TRIPLE
gets overwritten after replacing the FreeBSD regular expression, which
nullifies the replacement done with the darwin regular expression.
Reviewers: dim, EricWF
Subscribers: emaste, mgorny, krytarowski, christof, dexonsmith, cfe-commits, libcxx-commits
Differential Revision: https://reviews.llvm.org/D52394
llvm-svn: 342813
Caroline Tice [Sat, 22 Sep 2018 18:25:58 +0000 (18:25 +0000)]
Fix codemodels.c test case (only test mcmodel=medium on X86).
aarch64 testing is broken because "medium" is not a valid
code-model on aarch64, and codemodels.c tests that. This fixes
that problem by adding "-triple x86_64-unknown-linux-gnu" to the
test with "-mcode-model moedium".
llvm-svn: 342812
Louis Dionne [Sat, 22 Sep 2018 18:18:34 +0000 (18:18 +0000)]
[libunwind][NFC] Suppress unused parameter warnings
Reviewers: EricWF
Subscribers: christof, chrib, dexonsmith, cfe-commits
Differential Revision: https://reviews.llvm.org/D52393
llvm-svn: 342811
Zhihao Yuan [Sat, 22 Sep 2018 18:05:28 +0000 (18:05 +0000)]
Document new symbols for __u64toa and __u32toa
Summary:
They are introduced in r338479; their Linux ABI changes are recorded in r338486.
TODO: Record the Mac OS X ABI changes.
Reviewers: EricWF
Reviewed By: EricWF
Subscribers: christof, ldionne, libcxx-commits, cfe-commits
Differential Revision: https://reviews.llvm.org/D52391
llvm-svn: 342810
Craig Topper [Sat, 22 Sep 2018 18:03:14 +0000 (18:03 +0000)]
[DAGCombiner] Rewrite r331896 in a different way to address a FIXME. NFCI
llvm-svn: 342809
Roman Lebedev [Sat, 22 Sep 2018 17:54:48 +0000 (17:54 +0000)]
[libc++] Add _LIBCPP_ENABLE_NODISCARD and _LIBCPP_NODISCARD_EXT to allow pre-C++2a [[nodiscard]]
Summary:
The `[[nodiscard]]` attribute is intended to help users find bugs where
function return values are ignored when they shouldn't be. After C++17 the
C++ standard has started to declared such library functions as `[[nodiscard]]`.
However, this application is limited and applies only to dialects after C++17.
Users who want help diagnosing misuses of STL functions may desire a more
liberal application of `[[nodiscard]]`.
For this reason libc++ provides an extension that does just that! The
extension must be enabled by defining `_LIBCPP_ENABLE_NODISCARD`. The extended
applications of `[[nodiscard]]` takes two forms:
1. Backporting `[[nodiscard]]` to entities declared as such by the
standard in newer dialects, but not in the present one.
2. Extended applications of `[[nodiscard]]`, at the libraries discretion,
applied to entities never declared as such by the standard.
Users may also opt-out of additional applications `[[nodiscard]]` using
additional macros.
Applications of the first form, which backport `[[nodiscard]]` from a newer
dialect may be disabled using macros specific to the dialect it was added. For
example `_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17`.
Applications of the second form, which are pure extensions, may be disabled
by defining `_LIBCPP_DISABLE_NODISCARD_EXT`.
This patch was originally written by me (Roman Lebedev),
then but then reworked by Eric Fiselier.
Reviewers: mclow.lists, thakis, EricWF
Reviewed By: thakis, EricWF
Subscribers: llvm-commits, mclow.lists, lebedev.ri, EricWF, rjmccall, Quuxplusone, cfe-commits, christof
Differential Revision: https://reviews.llvm.org/D45179
llvm-svn: 342808
Yonghong Song [Sat, 22 Sep 2018 17:31:01 +0000 (17:31 +0000)]
[bpf] Test case for symbol information in object file
This patch tests the change introduced in r342556.
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
llvm-svn: 342807
Sanjay Patel [Sat, 22 Sep 2018 14:43:55 +0000 (14:43 +0000)]
[InstCombine][x86] try even harder to convert blendv intrinsic to generic IR (PR38814)
Follow-up to rL342324 (D52059):
Missing optimizations with blendv are shown in:
https://bugs.llvm.org/show_bug.cgi?id=38814
This is an easier and more powerful solution than adding pattern matching for a few
special cases in the backend. The potential danger with this transform in IR is that
the condition value can get separated from the select, and the backend might not be
able to make a blendv out of it again.
llvm-svn: 342806
Dimitry Andric [Sat, 22 Sep 2018 14:37:49 +0000 (14:37 +0000)]
Similar to the handling of darwin target triples, strip the version
numbers off of freebsd target triples, when generating the name of the
ABI list file for check-cxx-abilist target.
Also remove unnecessary parentheses in the regex for darwin, and
slightly reword the comment.
llvm-svn: 342805
Raphael Isemann [Sat, 22 Sep 2018 13:33:08 +0000 (13:33 +0000)]
Change type of m_user_expression_start_pos to size_t
AbsPosToLineColumnPos is the only reader of m_user_expression_start_pos
and actually treats it like a size_t. Also the value we store in
m_user_expression_start_pos is originally a size_t, so it makes sense
to change the type of this variable to size_t.
llvm-svn: 342804
Dimitry Andric [Sat, 22 Sep 2018 13:32:37 +0000 (13:32 +0000)]
Remove a bunch of empty subdirectories. NFCI.
llvm-svn: 342803
Sylvestre Ledru [Sat, 22 Sep 2018 07:41:09 +0000 (07:41 +0000)]
use the current url for bugzilla
llvm-svn: 342802
Sylvestre Ledru [Sat, 22 Sep 2018 07:39:44 +0000 (07:39 +0000)]
update the links to use https
llvm-svn: 342801
George Rimar [Sat, 22 Sep 2018 07:36:20 +0000 (07:36 +0000)]
[lib/MC] - Set SHF_EXCLUDE flag for .dwo sections.
DWARF5 spec says about single file split case:
"The sections that do not require relocation, however, can be written
to the relocatable object (.o) file but ignored by the
the linker or they can be written to a separate DWARF object (.dwo) file
that need not be accessed by the linker."
Nice way to make linker to ignore them is to set SHF_EXCLUDE flag.
It seems to be not harmful to always set it for .dwo sections.
That is what this patch does.
Differential revision: https://reviews.llvm.org/D52303
llvm-svn: 342800
Simon Atanasyan [Sat, 22 Sep 2018 06:04:32 +0000 (06:04 +0000)]
[mips] Provide more detailed description for MIPS targets. NFC
llvm-svn: 342799
Simon Atanasyan [Sat, 22 Sep 2018 06:04:26 +0000 (06:04 +0000)]
[mips] Remove obsoleted "experimental" tag from MIPS 64-bit targets. NFC
llvm-svn: 342798
Craig Topper [Sat, 22 Sep 2018 05:53:27 +0000 (05:53 +0000)]
[InstCombine] Fold (min/max ~X, Y) -> ~(max/min X, ~Y) when Y is freely invertible
Summary: This restores the combine that was reverted in r341883. The infinite loop from the failing test no longer occurs due to changes from r342163.
Reviewers: spatel, dmgreen
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52070
llvm-svn: 342797
Craig Topper [Sat, 22 Sep 2018 05:16:35 +0000 (05:16 +0000)]
[X86] Fix inline expansion for memset in x32
Summary: Similar to D51893 which was for memcpy
Reviewers: efriedma
Reviewed By: efriedma
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52063
llvm-svn: 342796
Craig Topper [Sat, 22 Sep 2018 05:08:38 +0000 (05:08 +0000)]
[X86] Fold (movmsk (setne (and X, (1 << C)), 0)) -> (movmsk (X << C)) for vXi8 vectors.
We don't have a vXi8 shift left so we need to bitcast to a vXi16 vector to perform the shift. If we let lowering legalize the vXi8 shift we get an extra and that we don't need and fail to remove.
llvm-svn: 342795
Richard Trieu [Sat, 22 Sep 2018 01:50:52 +0000 (01:50 +0000)]
Update smart pointer detection for thread safety analysis.
Objects are determined to be smart pointers if they have both a star and arrow
operator. Some implementations of smart pointers have these overloaded
operators in a base class, while the check only searched the derived class.
This fix will also look for the operators in the base class.
llvm-svn: 342794
Leonard Chan [Sat, 22 Sep 2018 01:03:16 +0000 (01:03 +0000)]
[Lexer] Add udefined_behavior_sanitizer feature
This can be used to detect whether the code is being built with UBSan using
the __has_feature(undefined_behavior_sanitizer) predicate.
Differential Revision: https://reviews.llvm.org/D52386
llvm-svn: 342793
Vyacheslav Zakharin [Sat, 22 Sep 2018 01:01:03 +0000 (01:01 +0000)]
Test commit.
llvm-svn: 342792
Jordan Rupprecht [Fri, 21 Sep 2018 23:48:12 +0000 (23:48 +0000)]
[llvm-size] Berkeley formatting: use tabs instead of spaces as field delimeters.
This matches GNU behavior for size and allows use of cut to parse the output of llvm-size.
llvm-svn: 342791
Aaron Puchert [Fri, 21 Sep 2018 23:46:35 +0000 (23:46 +0000)]
Thread safety analysis: Make printSCFG compile again [NFC]
Not used productively, so no observable functional change.
Note that printSCFG doesn't yet work reliably, it seems to crash
sometimes.
llvm-svn: 342790
Caroline Tice [Fri, 21 Sep 2018 23:19:49 +0000 (23:19 +0000)]
Fix codemodels.c test case (only test mcmodel-kernel on x86)
A recent commit I made broke aarch64 testing, because "kernel"
apparently is not a valid code-model on aarch64, and one of my tests
tested that. This fixes the problem (hopefully) by adding "-triple
x86_64-unknown-linux-gnu" to the test build with "-mcodel-model
kernel".
Differential Revision: https://reviews.llvm.org/D52383
llvm-svn: 342789
Craig Topper [Fri, 21 Sep 2018 23:14:05 +0000 (23:14 +0000)]
[X86] Teach fast isel to use MOV32ri64 for loading an unsigned 32 immediate into a 64-bit register.
Previously we used SUBREG_TO_REG+MOV32ri. But regular isel was changed recently to use the MOV32ri64 pseudo. Fast isel now does the same.
llvm-svn: 342788
Aaron Puchert [Fri, 21 Sep 2018 23:08:30 +0000 (23:08 +0000)]
Thread safety analysis: Make sure FactEntrys stored in FactManager are immutable [NFC]
Since FactEntrys are stored in the FactManager, we can't manipulate them
anymore when they are stored there.
llvm-svn: 342787
Warren Ristow [Fri, 21 Sep 2018 23:03:50 +0000 (23:03 +0000)]
[Loop Vectorizer] Abandon vectorization when no integer IV found
Support for vectorizing loops with secondary floating-point induction
variables was added in r276554. A primary integer IV is still required
for vectorization to be done. If an FP IV was found, but no integer IV
was found at all (primary or secondary), the attempt to vectorize still
went forward, causing a compiler-crash. This change abandons that
attempt when no integer IV is found. (Vectorizing FP-only cases like
this, rather than bailing out, is discussed as possible future work
in D52327.)
See PR38800 for more information.
Differential Revision: https://reviews.llvm.org/D52327
llvm-svn: 342786
Aaron Ballman [Fri, 21 Sep 2018 23:01:32 +0000 (23:01 +0000)]
Move individual benchmark targets into the Utils folder in IDEs.
llvm-svn: 342785
Zachary Turner [Fri, 21 Sep 2018 23:00:37 +0000 (23:00 +0000)]
Try moving this function to another file.
I can't reproduce this compilation failure so I can't really
test this fix.
llvm-svn: 342784
Lang Hames [Fri, 21 Sep 2018 22:59:48 +0000 (22:59 +0000)]
[ORC] In RTDyldObjectLinkingLayer, only call NotifyFreed if the object file
has been finalized.
This prevents crashes on unfinalized objects for clients using
JITEventListeners.
Patch by Geoff Levner. Thanks Geoff!
llvm-svn: 342783
Aaron Ballman [Fri, 21 Sep 2018 22:55:57 +0000 (22:55 +0000)]
Add benchmark and benchmark_main to the Utils folder in IDEs.
llvm-svn: 342782
Zachary Turner [Fri, 21 Sep 2018 22:44:31 +0000 (22:44 +0000)]
Add missing include.
llvm-svn: 342781
Zachary Turner [Fri, 21 Sep 2018 22:36:28 +0000 (22:36 +0000)]
[NativePDB] Add support for reading function signatures.
This adds support for parsing function signature records and returning
them through the native DIA interface.
llvm-svn: 342780
Zachary Turner [Fri, 21 Sep 2018 22:36:04 +0000 (22:36 +0000)]
[PDB] Add native reading support for UDT / class types.
This allows the native reader to find records of class/struct/
union type and dump them. This behavior is tested by using the
diadump subcommand against golden output produced by actual DIA
SDK on the same PDB file, and again using pretty -native to
confirm that we actually dump the classes. We don't find class
members or anything like that yet, for now it's just the class
itself.
llvm-svn: 342779
Fedor Sergeev [Fri, 21 Sep 2018 22:10:17 +0000 (22:10 +0000)]
[New PM][PassInstrumentation] Adding PassInstrumentation to the AnalysisManager runs
As a prerequisite to time-passes implementation which needs to time both passes
and analyses, adding instrumentation points to the Analysis Manager.
The are two functional differences between Pass and Analysis instrumentation:
- the latter does not increment pass execution counter
- it does not provide ability to skip execution of the corresponding analysis
Reviewers: chandlerc, philip.pfaffe
Differential Revision: https://reviews.llvm.org/D51275
llvm-svn: 342778
Martin Storsjo [Fri, 21 Sep 2018 22:01:06 +0000 (22:01 +0000)]
[COFF] Support linking to import libraries from GNU binutils
GNU binutils import libraries aren't the same kind of short import
libraries as link.exe and LLD produce, but are a plain static library
containing .idata section chunks. MSVC link.exe can successfully link
to them.
In order for imports from GNU import libraries to mix properly with the
normal import chunks, the chunks from the existing mechanism needs to
be added into named sections like .idata$2.
These GNU import libraries consist of one header object, a number of
object files, one for each imported function/variable, and one trailer.
Within the import libraries, the object files are ordered alphabetically
in this order. The chunks stemming from these libraries have to be
grouped by what library they originate from and sorted, to make sure
the section chunks for headers and trailers for the lists are ordered
as intended. This is done on all sections named .idata$*, before adding
the synthesized chunks to them.
Differential Revision: https://reviews.llvm.org/D38513
llvm-svn: 342777
Adrian Prantl [Fri, 21 Sep 2018 21:59:34 +0000 (21:59 +0000)]
llvm-dwarfdump --statistics: Unique abstract origins across multiple CUs.
Instead of indexing local variables by DIE offset, use the variable
name + the path through the lexical block tree. This makes the lookup
key consistent across duplicate abstract origins in different CUs.
llvm-svn: 342776
Sanjay Patel [Fri, 21 Sep 2018 21:25:16 +0000 (21:25 +0000)]
[x86] add more tests for poetntial andnp splitting with AVX1; NFC
llvm-svn: 342775
Richard Trieu [Fri, 21 Sep 2018 21:20:33 +0000 (21:20 +0000)]
Make compare function in r342648 have strict weak ordering.
Comparison functions used in sorting algorithms need to have strict weak
ordering. Remove the assert and allow comparisons on all lists.
llvm-svn: 342774
Simon Pilgrim [Fri, 21 Sep 2018 21:08:26 +0000 (21:08 +0000)]
[X86] Add AVX512 target to load scalar to vector tests
To investigate broadcast instruction codegen for D51553
llvm-svn: 342773
Wouter van Oortmerssen [Fri, 21 Sep 2018 20:53:55 +0000 (20:53 +0000)]
[WebAssembly] Simplified selecting asmmatcher stack instructions.
Summary:
By using the existing isCodeGenOnly bit in the tablegen defs, as
suggested by tlively in https://reviews.llvm.org/D51662
Tested: llvm-lit -v `find test -name WebAssembly`
Reviewers: tlively
Subscribers: dschuff, sbc100, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52373
llvm-svn: 342772
Jorge Gorbe Moya [Fri, 21 Sep 2018 20:45:08 +0000 (20:45 +0000)]
Test commit. Removed a blank line.
llvm-svn: 342771
George Karpenkov [Fri, 21 Sep 2018 20:37:20 +0000 (20:37 +0000)]
[analyzer] Process state in checkEndFunction in RetainCountChecker
Modify the RetainCountChecker to perform state "adjustments" in
checkEndFunction, as performing work in PreStmt<ReturnStmt> does not
work with destructors.
The previous version made an implicit assumption that no code runs
after the return statement is executed.
rdar://
43945028
Differential Revision: https://reviews.llvm.org/D52338
llvm-svn: 342770
George Karpenkov [Fri, 21 Sep 2018 20:37:01 +0000 (20:37 +0000)]
[analyzer] Highlight sink nodes in red
Differential Revision: https://reviews.llvm.org/D52337
llvm-svn: 342769
George Karpenkov [Fri, 21 Sep 2018 20:36:41 +0000 (20:36 +0000)]
[analyzer] Associate diagnostics created in checkEndFunction with a return statement, if possible
If not possible, use the last line of the declaration, as before.
Differential Revision: https://reviews.llvm.org/D52326
llvm-svn: 342768
George Karpenkov [Fri, 21 Sep 2018 20:36:21 +0000 (20:36 +0000)]
[analyzer] [NFC] Prefer make_unique over "new"
Differential Revision: https://reviews.llvm.org/D52336
llvm-svn: 342767
George Karpenkov [Fri, 21 Sep 2018 20:36:01 +0000 (20:36 +0000)]
[analyzer] Fix bug in isInevitablySinking
If the non-sink report is generated at the exit node, it will be
suppressed by the current functionality in isInevitablySinking, as it
only checks the successors of the block, but not the block itself.
The bug shows up in RetainCountChecker checks.
Differential Revision: https://reviews.llvm.org/D52284
llvm-svn: 342766
George Karpenkov [Fri, 21 Sep 2018 20:35:39 +0000 (20:35 +0000)]
[analyzer] [NFC] Dead code removal
Differential Revision: https://reviews.llvm.org/D52269
llvm-svn: 342765
Pirama Arumuga Nainar [Fri, 21 Sep 2018 20:01:22 +0000 (20:01 +0000)]
[libc++abi] is_strcmp parameter to is_equal is unused for WIN32
Summary: Mark it as unused to avoid -Wunused-parameter.
Reviewers: EricWF, srhines, mstorsjo
Subscribers: christof, ldionne, libcxx-commits, cfe-commits
Differential Revision: https://reviews.llvm.org/D52368
llvm-svn: 342764
Vlad Tsyrklevich [Fri, 21 Sep 2018 19:02:32 +0000 (19:02 +0000)]
SafeStack: Fix flaky test (PR39001)
Summary:
pthread_join() can return before a thread finishes exit()ing in the
kernel and a subsequent tgkill() can report the thread still alive.
Update the pthread-cleanup.c test to sleep and retry if it hits this
possible flake.
Thanks to Jeremy Morse for reporting.
Reviewers: jmorse, eugenis, vitalybuka
Reviewed By: jmorse, vitalybuka
Subscribers: delcypher, jfb, llvm-commits, #sanitizers, kcc
Differential Revision: https://reviews.llvm.org/D52330
llvm-svn: 342763
Tatyana Krasnukha [Fri, 21 Sep 2018 18:56:44 +0000 (18:56 +0000)]
Move architecture-specific address adjustment to architecture plugins
Differential Revision: https://reviews.llvm.org/D48623
llvm-svn: 342762
Thomas Lively [Fri, 21 Sep 2018 18:46:39 +0000 (18:46 +0000)]
[WebAssembly][NFC] Rename simd-conversions test to simd-bitcasts
Summary:
This name is more accurate and I want to reuse the simd-conversions
name for testing the actual conversion ops.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52333
llvm-svn: 342761
Caroline Tice [Fri, 21 Sep 2018 18:41:31 +0000 (18:41 +0000)]
Pass code-model through Module IR to LTO which will use it.
Currently the code-model does not get saved in the module IR,
so if a code model is specified when compiling with LTO,
it gets lost and is not propagated properly to LTO. This patch,
along with one for the front end, fixes that.
Differential Revision: https://reviews.llvm.org/D52322
llvm-svn: 342760
JF Bastien [Fri, 21 Sep 2018 18:35:32 +0000 (18:35 +0000)]
[NFC] use bit_cast in PointerSumType
The code was already using union and memcpy to do this. Remove the memcpy. We can't just change the union because a reference to its member is returned.
llvm-svn: 342759
Caroline Tice [Fri, 21 Sep 2018 18:34:59 +0000 (18:34 +0000)]
Add necessary support for storing code-model to module IR.
Currently the code-model does not get saved in the module IR, so if a
code model is specified when compiling with LTO, it gets lost and is
not propagated properly to LTO. This patch does what is necessary in
the front end to pass the code-model to the module, so that the back
end can store it in the Module .
Differential Revision: https://reviews.llvm.org/D52323
llvm-svn: 342758
Tatyana Krasnukha [Fri, 21 Sep 2018 18:34:41 +0000 (18:34 +0000)]
build: add libedit to include paths
Differential Revision: https://reviews.llvm.org/D51999
llvm-svn: 342757
Sanjay Patel [Fri, 21 Sep 2018 18:24:53 +0000 (18:24 +0000)]
[x86] add (negative) andnp test for D52318; NFC
llvm-svn: 342756
Sanjay Patel [Fri, 21 Sep 2018 18:03:49 +0000 (18:03 +0000)]
[x86] add test with optsize attribute for scalar->vector transform; NFC
llvm-svn: 342755
Rui Ueyama [Fri, 21 Sep 2018 17:48:45 +0000 (17:48 +0000)]
Update release notes.
llvm-svn: 342754
Wouter van Oortmerssen [Fri, 21 Sep 2018 17:47:58 +0000 (17:47 +0000)]
[WebAssembly] Made assembler only use stack instruction tablegen defs
Summary:
This ensures we have the non-register version of the instruction.
The stack version of call_indirect now wants a type index argument,
so that has been added in the existing tests.
Tested:
llvm-lit -v `find test -name WebAssembly`
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D51662
llvm-svn: 342753
Artem Belevich [Fri, 21 Sep 2018 17:46:28 +0000 (17:46 +0000)]
[CUDA] Fixed parsing of optional template-argument-list.
We need to consider all tokens that start with '>' when
we're checking for the end of an empty template argument list.
Differential Revision: https://reviews.llvm.org/D52321
llvm-svn: 342752
Krzysztof Parzyszek [Fri, 21 Sep 2018 17:40:35 +0000 (17:40 +0000)]
[Hexagon] Avoid functions with exception handling in HexagonConstExtenders
The constant-extender optimization does a form of code motion, which is
complicated in the presence of exception handling.
llvm-svn: 342751
JF Bastien [Fri, 21 Sep 2018 17:38:41 +0000 (17:38 +0000)]
[NFC] remove unused variable
It was causing a warning.
llvm-svn: 342750
Artem Belevich [Fri, 21 Sep 2018 17:29:33 +0000 (17:29 +0000)]
[CUDA] Ignore uncallable functions when we check for usual deallocators.
Previously clang considered function variants from both sides of
compilation and that resulted in picking up wrong deallocation function.
Differential Revision: https://reviews.llvm.org/D51808
llvm-svn: 342749
Rui Ueyama [Fri, 21 Sep 2018 17:13:55 +0000 (17:13 +0000)]
Update release notes.
llvm-svn: 342748
Kostya Kortchinsky [Fri, 21 Sep 2018 17:05:56 +0000 (17:05 +0000)]
[sanitizer] Move __sanitizer_set_death_callback to a more appropriate file
Summary:
`__sanitizer_set_death_callback` is a public interface function wrapping
`SetUserDieCallback`. Said function is defined in `sanitizer_termination.cc`,
which is not included in all the RT. Moving the interface function to that
file allows to not have a spurious public fuinction in RT that don't use it.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D52363
llvm-svn: 342747
Dimitry Andric [Fri, 21 Sep 2018 16:58:13 +0000 (16:58 +0000)]
Align AArch64 and i386 image base to superpage
Summary:
As for x86_64, the default image base for AArch64 and i386 should be
aligned to a superpage appropriate for the architecture.
On AArch64, this is 2 MiB, on i386 it is 4 MiB.
Reviewers: emaste, grimar, javed.absar, espindola, ruiu, peter.smith, srhines, rprichard
Reviewed By: ruiu, peter.smith
Subscribers: jfb, markj, arichardson, krytarowski, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D50297
llvm-svn: 342746
Dean Michael Berris [Fri, 21 Sep 2018 16:34:42 +0000 (16:34 +0000)]
[XRay][compiler-rt] Update use of internal_mmap
Summary:
The implementation of `internal_mmap(...)` deviates from the contract of
`mmap(...)` -- i.e. error returns are actually the equivalent of `errno`
results. We update how XRay uses `internal_mmap(...)` to better handle
these error conditions.
In the process, we change the default pointers we're using from `char*`
to `uint8_t*` to prevent potential usage of the pointers in the string
library functions that expect to operate on `char*`.
We also take the chance to "promote" sizes of individual `internal_mmap`
requests to at least page size bytes, consistent with the expectations
of calls to `mmap`.
Reviewers: cryptoad, mboerger
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52361
llvm-svn: 342745
Daniel Sanders [Fri, 21 Sep 2018 16:32:49 +0000 (16:32 +0000)]
[tblgen] Fix undefined behaviour when assigning integers to large bits<n>'s
This code:
bits<96> X = 0;
was triggering undefined behaviour since it iterates over bits 0..95 and tests
them against the IntInit using 1LL << I.
This patch resolves the undefined behaviour by continuing to treat the IntInit
as a 64-bit value and simply causing all bit tests in excess of 64-bits to report
false. As a result,
bits<96> X = -1;
will be equivalent to:
bits<96> X;
let X{0-63} = -1;
let X{64-95} = 0;
llvm-svn: 342744
Sameer Sahasrabuddhe [Fri, 21 Sep 2018 16:31:51 +0000 (16:31 +0000)]
revert changes from r342722
"[AMDGPU] lower-switch in preISel as a workaround for legacy DA"
This broke regression tests. The first breakage was noticed here:
http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/23549
llvm-svn: 342743
Matthias Braun [Fri, 21 Sep 2018 15:47:41 +0000 (15:47 +0000)]
AArch64FastISel: Abort if we failed to select operand of intrinsic
rdar://
44642447
Differential Revision: https://reviews.llvm.org/D52335
llvm-svn: 342742
Alexey Bataev [Fri, 21 Sep 2018 14:55:26 +0000 (14:55 +0000)]
[OPENMP] Disable emission of the class with vptr if they are not used in
target constructs.
Prevent compilation of the classes with the virtual tables when
compiling for the device.
llvm-svn: 342741
Sanjay Patel [Fri, 21 Sep 2018 14:43:49 +0000 (14:43 +0000)]
[InstCombine] add tests for extractelement; NFC
There are folds under visitExtractElementInst() that don't appear
to have any test coverage, so adding a few basic cases here.
llvm-svn: 342740
JF Bastien [Fri, 21 Sep 2018 14:31:25 +0000 (14:31 +0000)]
[ADT] restrict bit_cast to trivially-constructible To
Summary: As discussed in r341853 by blaikie, the reinterpret_cast was technically an aliasing violation. Restrict our bit_cast implementation to To which are trivially-constructible (and note the existing restriction to constexpr). Once we move to C++17 we can use a version of bit_cast without these restrictions, or if we care we can SFINAE a different implementation when To isn't trivially-constructible.
Originally landed in r342710 and reverted in r342711 because is_trivially_copyable is only in GCC 5.1 and later.
Reviewers: dblaikie, rsmith
Subscribers: dexonsmith, kristina, llvm-commits
Differential Revision: https://reviews.llvm.org/D52332
llvm-svn: 342739
Alexey Bataev [Fri, 21 Sep 2018 14:22:53 +0000 (14:22 +0000)]
[OPENMP][NVPTX] Enable support for lastprivates in SPMD constructs.
Previously we could not use lastprivates in SPMD constructs, patch
allows supporting lastprivates in SPMD with uninitialized runtime.
llvm-svn: 342738
Alexey Bataev [Fri, 21 Sep 2018 14:11:41 +0000 (14:11 +0000)]
[OPENMP][NVPTX] Add support for lastprivates/reductions handling in SPMD constructs with lightweight runtime.
Summary:
We need the support for per-team shared variables to support codegen for
lastprivates/reductions. Patch adds this support by using shared memory
if the total size of the reductions/lastprivates is <= 128 bytes,
then pre-allocated buffer in global memory if size is <= 4K bytes,or
uses malloc/free, otherwise.
Reviewers: gtbercea, kkwli0, grokos
Subscribers: guansong, openmp-commits
Differential Revision: https://reviews.llvm.org/D51875
llvm-svn: 342737