Stanislav Mekhanoshin [Mon, 13 May 2019 23:15:59 +0000 (23:15 +0000)]
[AMDGPU] gfx1010 clang target
Differential Revision: https://reviews.llvm.org/D61875
llvm-svn: 360634
Jonas Devlieghere [Mon, 13 May 2019 23:05:51 +0000 (23:05 +0000)]
[Docs] Fix code formattign in variable.rst
Fixes missing newline between :: and the actual code.
llvm-svn: 360632
Jonas Devlieghere [Mon, 13 May 2019 22:55:11 +0000 (22:55 +0000)]
[CMake] Reinstate LLDB_CAN_USE_LLDB_SERVER
We cannot manipulate the LLDB_TOOL_LLDB_SERVER_BUILD directly from
LLDBConfig.cmake because this would set the variable before the option
is defined in AddLLVM.cmake. Instead, we need to use the
LLDB_CAN_USE_LLDB_SERVER variable to conditionally add the lldb-server
subdirectory. This should ensure the variable doesn't get cleared.
llvm-svn: 360631
Volodymyr Sapsai [Mon, 13 May 2019 22:40:11 +0000 (22:40 +0000)]
[X86] Make `x86intrin.h`, `immintrin.h` includable with `-fno-gnu-inline-asm`.
Currently `immintrin.h` includes `pconfigintrin.h` and `sgxintrin.h`
which contain inline assembly. It causes failures when building with the
flag `-fno-gnu-inline-asm`.
Fix by excluding functions with inline assembly when this extension is
disabled. So far there was no need to support `_pconfig_u32`,
`_enclu_u32`, `_encls_u32`, `_enclv_u32` on platforms that require
`-fno-gnu-inline-asm`. But if developers start using these functions,
they'll have compile-time undeclared identifier errors which is
preferrable to runtime errors.
rdar://problem/
49540880
Reviewers: craig.topper, GBuella, rnk, echristo
Reviewed By: rnk
Subscribers: jkorous, dexonsmith, cfe-commits
Differential Revision: https://reviews.llvm.org/D61621
llvm-svn: 360630
Vitaly Buka [Mon, 13 May 2019 22:30:53 +0000 (22:30 +0000)]
[gn] Fix build
llvm-svn: 360629
Aaron Ballman [Mon, 13 May 2019 22:29:16 +0000 (22:29 +0000)]
Removing an unused member variable; NFC.
llvm-svn: 360628
Craig Topper [Mon, 13 May 2019 22:17:13 +0000 (22:17 +0000)]
[X86] Use ISD::MERGE_VALUES to return from lowerAtomicArith instead of calling ReplaceAllUsesOfValueWith and returning SDValue().
Returning SDValue() makes the caller think that nothing happened and it will
end up executing the Expand path. This generates extra nodes that will need to
be pruned as dead code.
Returning an ISD::MERGE_VALUES will tell the caller that we'd like to make a
change and it will take care of replacing uses. This will prevent falling into
the Expand path.
llvm-svn: 360627
Gheorghe-Teodor Bercea [Mon, 13 May 2019 22:11:44 +0000 (22:11 +0000)]
[OpenMP][Clang][BugFix] Split declares and math functions inclusion.
Summary: This patches fixes an issue in which the __clang_cuda_cmath.h header is being included even when cmath or math.h headers are not included.
Reviewers: jdoerfert, ABataev, hfinkel, caomhin, tra
Reviewed By: tra
Subscribers: tra, mgorny, guansong, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61765
llvm-svn: 360626
Volodymyr Sapsai [Mon, 13 May 2019 22:11:10 +0000 (22:11 +0000)]
Make language option `GNUAsm` discoverable with `__has_extension` macro.
This can be used for better support of `-fno-gnu-inline-asm` builds.
rdar://problem/
49540880
Reviewers: aaron.ballman, rsmith
Reviewed By: aaron.ballman
Subscribers: eraman, jkorous, dexonsmith, craig.topper, cfe-commits
Differential Revision: https://reviews.llvm.org/D61619
llvm-svn: 360625
Jonas Devlieghere [Mon, 13 May 2019 22:02:09 +0000 (22:02 +0000)]
Disable TestEnvironment on Windows
The input source file seems to be triggering an error in the Visual
Studio headers.
> xstddef:338:2: error: ''auto' return without trailing return type;
> deduced return types are a C++14 extension
I tried converting the test to use the %build stuff Zachary added, but
that seems to be missing some Darwin support. Disabling the test on
Windows in the meantime.
llvm-svn: 360624
Stanislav Mekhanoshin [Mon, 13 May 2019 21:59:03 +0000 (21:59 +0000)]
[AMDGPU] gfx1010 SearchableTableEmitter patch for NSA
This part was accidentally missing from NSA image support commit.
Differential Revision: https://reviews.llvm.org/D61868
llvm-svn: 360623
Aaron Ballman [Mon, 13 May 2019 21:39:55 +0000 (21:39 +0000)]
Introduce the ability to dump the AST to JSON.
This adds the -ast-dump=json cc1 flag (in addition to -ast-dump=default, which is the default if no dump format is specified), as well as some initial AST dumping functionality and tests.
llvm-svn: 360622
Jonas Devlieghere [Mon, 13 May 2019 21:25:02 +0000 (21:25 +0000)]
[CMake] Simplify lldb-server handling
We can piggyback off the existing add_lldb_tool_subdirectory to decide
whether or not lldb-server should be built.
Differential revision: https://reviews.llvm.org/D61872
llvm-svn: 360621
Nemanja Ivanovic [Mon, 13 May 2019 21:14:36 +0000 (21:14 +0000)]
[Pass Pipeline][NFC] Add a test prior to committing D61726
This patch just adds a test case to show the differences in code emitted
by opt before and after https://reviews.llvm.org/D61726.
Previous attempt to commit this did not include the registered target
requirement so it caused buildbot breaks.
llvm-svn: 360620
Craig Topper [Mon, 13 May 2019 21:01:24 +0000 (21:01 +0000)]
[X86] Various type corrections to the code that creates LOCK_OR32mi8/OR32mi8Locked to the stack for idempotent atomic rmw and atomic fence.
These are updates to match how isel table would emit a LOCK_OR32mi8 node.
-Use i32 for the immediate zero even though only 8 bits are encoded.
-Use i16 for segment register.
-Use LOCK_OR32mi8 for idempotent atomic operations in 32-bit mode to match
64-bit mode. I'm not sure why OR32mi8Locked and LOCK_OR32mi8 both exist. The
only difference seems to be that OR32mi8Locked is marked as UnmodeledSideEffects=1.
-Emit an extra i32 result for the flags output.
I don't know if the types here really matter just noticed it was inconsistent
with normal behavior.
llvm-svn: 360619
Lang Hames [Mon, 13 May 2019 20:52:30 +0000 (20:52 +0000)]
[JITLink][MachO] Honor the no-dead-strip flag on nlist entries.
llvm-svn: 360618
David L. Jones [Mon, 13 May 2019 20:32:53 +0000 (20:32 +0000)]
[Support] Ensure redirected outputs don't contain output from previous tests.
stdout may be buffered, and may not flush on every write. Explicitly flushing
before redirecting the output ensures that the captured output does not contain
output from other tests.
llvm-svn: 360617
Nikita Popov [Mon, 13 May 2019 19:40:18 +0000 (19:40 +0000)]
[WebAssembly] Don't assume that zext/sext result is i32/i64 in fast isel (PR41841)
Usually this will abort fast-isel at the instruction using the
non-legal result, but if the only use is in a different basic block,
we'll incorrectly assume that the zext/sext is to i32 (rather than
i128 in this case).
Differential Revision: https://reviews.llvm.org/D61823
llvm-svn: 360616
Stanislav Mekhanoshin [Mon, 13 May 2019 19:30:06 +0000 (19:30 +0000)]
[AMDGPU] gfx1010 tests. NFC.
llvm-svn: 360615
Marshall Clow [Mon, 13 May 2019 19:29:23 +0000 (19:29 +0000)]
Make more friendly with unions. Reviewed as https://reviews.llvm.org/D61858
llvm-svn: 360614
Matthias Gehre [Mon, 13 May 2019 19:21:57 +0000 (19:21 +0000)]
[clang-tidy] readability-redundant-declaration: fix false positive with C "extern inline"
Summary:
readability-redundant-declaration was diagnosing a redundant declaration
on "extern inline void f();", which is needed in C code to force an external definition
of the inline function f. (This is different to how inline behaves in C++).
Reviewers: alexfh, danielmarjamaki
Subscribers: xazax.hun, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61700
llvm-svn: 360613
Jonas Devlieghere [Mon, 13 May 2019 19:17:48 +0000 (19:17 +0000)]
Merge target and launch info environments
Before this change we were overriding the launch info environment with
the target environment. This meant that the environment variables passed
to `process launch --environment <>` were lost. Instead of replacing the
environment, we should merge them.
Differential revision: https://reviews.llvm.org/D61864
llvm-svn: 360612
Jonas Devlieghere [Mon, 13 May 2019 19:17:44 +0000 (19:17 +0000)]
Remove commented-out code
llvm-svn: 360611
Sterling Augustine [Mon, 13 May 2019 18:45:03 +0000 (18:45 +0000)]
Add a new LIBUNWIND_WEAK_PTHREAD Cmake option to force
calls into the pthread library use weak symbols.
This option allows libpthread to be a weak dependency rather
than a hard one.
Differential Revision: https://reviews.llvm.org/D60285
llvm-svn: 360610
Stanislav Mekhanoshin [Mon, 13 May 2019 18:05:10 +0000 (18:05 +0000)]
[AMDGPU] Reorder includes per coding standard. NFC.
llvm-svn: 360609
Stanislav Mekhanoshin [Mon, 13 May 2019 17:52:57 +0000 (17:52 +0000)]
[AMDGPU] Remove now unused V2FP16_ONE constant def. NFC.
llvm-svn: 360608
Jan Korous [Mon, 13 May 2019 17:52:09 +0000 (17:52 +0000)]
[clang][ASTContext] Call setAttached for comments attached to a declaration
This is a bug affecting performance when compiling with -Wdocumentation.
In Sema::ActOnDocumentable we're checking whether there are any comments unattached to declaration at the end of comment list whenever we encounter new documentable declaration.
Since this property of RawComment was never set we were trying to find comments every time and that involves at least a couple expensive SourceLocation decompositions.
Differential Revision: https://reviews.llvm.org/D61538
llvm-svn: 360607
Robert Lougher [Mon, 13 May 2019 17:36:46 +0000 (17:36 +0000)]
Revert [X86] Avoid SFB - Fix inconsistent codegen with/without debug info
Revert r360436 as it is causing clang-x64-windows-msvc buildbot to fail.
llvm-svn: 360606
Sanjay Patel [Mon, 13 May 2019 17:28:19 +0000 (17:28 +0000)]
[InstCombine] try harder to form rotate (funnel shift) (PR20750)
We have a similar match for patterns ending in a truncate. This
should be ok for all targets because the default expansion would
still likely be better from replacing 2 'and' ops with 1.
Attempt to show the logic equivalence in Alive (which doesn't
currently have funnel-shift in its vocabulary AFAICT):
%shamt = zext i8 %i to i32
%m = and i32 %shamt, 31
%neg = sub i32 0, %shamt
%and4 = and i32 %neg, 31
%shl = shl i32 %v, %m
%shr = lshr i32 %v, %and4
%or = or i32 %shr, %shl
=>
%a = and i8 %i, 31
%shamt2 = zext i8 %a to i32
%neg2 = sub i32 0, %shamt2
%and4 = and i32 %neg2, 31
%shl = shl i32 %v, %shamt2
%shr = lshr i32 %v, %and4
%or = or i32 %shr, %shl
https://rise4fun.com/Alive/V9r
llvm-svn: 360605
Nick Desaulniers [Mon, 13 May 2019 17:27:44 +0000 (17:27 +0000)]
[TargetLowering] Handle multi depth GEPs w/ inline asm constraints
Summary:
X86TargetLowering::LowerAsmOperandForConstraint had better support than
TargetLowering::LowerAsmOperandForConstraint for arbitrary depth
getelementpointers for "i", "n", and "s" extended inline assembly
constraints. Hoist its support from the derived class into the base
class.
Link: https://github.com/ClangBuiltLinux/linux/issues/469
Reviewers: echristo, t.p.northover
Reviewed By: t.p.northover
Subscribers: t.p.northover, E5ten, kees, jyknight, nemanjai, javed.absar, eraman, hiraditya, jsji, llvm-commits, void, craig.topper, nathanchance, srhines
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61560
llvm-svn: 360604
Paul Robinson [Mon, 13 May 2019 17:18:58 +0000 (17:18 +0000)]
Stop defining negative versions of some lit feature keywords:
zlib/nozlib, asan/not_asan, msan/not_msan, ubsan/not_ubsan.
We still have two other ways to express the absence of a feature.
First, we have the '!' operator to invert the sense of a keyword. For
example, given a feature that depends on zlib being unavailable, its
test can say:
REQUIRES: !zlib
Second, if a test doesn't play well with some features, such as
sanitizers, that test can say:
UNSUPPORTED: asan, msan
The different ways of writing these exclusions both have the same
technical effect, but have different implications to the reader.
llvm-svn: 360603
Andrey Churbanov [Mon, 13 May 2019 17:04:32 +0000 (17:04 +0000)]
fixed typo made by commit r360595
llvm-svn: 360602
Sanjay Patel [Mon, 13 May 2019 17:02:26 +0000 (17:02 +0000)]
[InstCombine] add tests for rotates with narrow shift amount (PR20750); NFC
llvm-svn: 360601
Nico Weber [Mon, 13 May 2019 16:59:43 +0000 (16:59 +0000)]
gn build: Fewer dependencies in llvm/lib/Target
The tablegen groups only need public_deps for inc files included
(possibly transitively) in other targets. Move inc files that are
internan to the MCTargetDesc libraries into regular deps.
Related to the changes that merged InstPrinter into MCTargetDesc
(360484, 360486 etc).
llvm-svn: 360600
Shafik Yaghmour [Mon, 13 May 2019 16:48:06 +0000 (16:48 +0000)]
[DataFormatters] FindLibCppStdFunctionCallableInfo() currently uses FindFunctions() in order to find a lambdas operator()() but using FindSymbolsMatchingRegExAndType() is cheaper and if we also anchor the regex using ^ this adds some additional performance gains.
Differential Revision: https://reviews.llvm.org/D61759
llvm-svn: 360599
Sam Clegg [Mon, 13 May 2019 16:42:52 +0000 (16:42 +0000)]
[WebAssembly] Refactor relocation processing. NFC.
This is the remaining NFC part of https://reviews.llvm.org/D61539 which
was reverted.
Differential Revision: https://reviews.llvm.org/D61800
llvm-svn: 360598
Nico Weber [Mon, 13 May 2019 16:15:40 +0000 (16:15 +0000)]
gn build: Merge r360572
llvm-svn: 360597
Simon Pilgrim [Mon, 13 May 2019 16:10:11 +0000 (16:10 +0000)]
[X86][SSE] LowerBuildVectorv4x32 - don't insert MOVQ for undef elts
Fixes the regression noted in D61782 where a VZEXT_MOVL was being inserted because we weren't discriminating between 'zeroable' and 'all undef' for the upper elts.
Differential Revision: https://reviews.llvm.org/D61782
llvm-svn: 360596
Andrey Churbanov [Mon, 13 May 2019 16:07:37 +0000 (16:07 +0000)]
Fixed creation of aliases in Windows build.
Changed file extension of the destination of the copy of libomp.lib
(it was mistakely .dll, now it is .lib) in installation on Windows.
Differential Revision: https://reviews.llvm.org/D61673
llvm-svn: 360595
Simon Pilgrim [Mon, 13 May 2019 16:02:45 +0000 (16:02 +0000)]
[X86][SSE] Relax use limits for lowerAddSubToHorizontalOp (PR32433)
Now that we can use HADD/SUB for scalar additions from any pair of extracted elements (D61263), we can relax the one use limit as we will be able to merge multiple uses into using the same HADD/SUB op.
This exposes a couple of missed opportunities in LowerBuildVectorv4x32 which will be committed separately.
Differential Revision: https://reviews.llvm.org/D61782
llvm-svn: 360594
Peter Smith [Mon, 13 May 2019 16:01:26 +0000 (16:01 +0000)]
[ELF] Full support for -n (--nmagic) and -N (--omagic) via common page
The -n (--nmagic) disables page alignment, and acts as a -Bstatic
The -N (--omagic) does what -n does but also marks the executable segment as
writeable. As page alignment is disabled headers are not allocated unless
explicit in the linker script.
To disable page alignment in LLD we choose to set the page sizes to 1 so
that any alignment based on the page size does nothing. To set the
Target->PageSize to 1 we implement -z common-page-size, which has the side
effect of allowing the user to set the value as well.
Setting the page alignments to 1 does mean that any use of
CONSTANT(MAXPAGESIZE) or CONSTANT(COMMONPAGESIZE) in a linker script will
return 1, unlike in ld.bfd. However given that -n and -N disable paging
these probably shouldn't be used in a linker script where -n or -N is in
use.
Differential Revision: https://reviews.llvm.org/D61688
llvm-svn: 360593
Simon Pilgrim [Mon, 13 May 2019 15:51:26 +0000 (15:51 +0000)]
[TargetLowering] Add SimplifyDemandedBits support for ZERO_EXTEND_VECTOR_INREG
More work for PR39709.
llvm-svn: 360592
Craig Topper [Mon, 13 May 2019 15:45:20 +0000 (15:45 +0000)]
[X86] Add test case for mask register variant of PR41619 which should be fixed after r360552
llvm-svn: 360591
Brian Cain [Mon, 13 May 2019 15:41:18 +0000 (15:41 +0000)]
[libcxx] teach type_traits test about long uint32_t
Patch by Ben Craig.
llvm-svn: 360590
Amara Emerson [Mon, 13 May 2019 15:37:18 +0000 (15:37 +0000)]
Revert "[LSR] Tweak setup cost depth threshold to 10."
Changing the threshold might not be the best long term approach. Revert for now.
llvm-svn: 360589
Simon Pilgrim [Mon, 13 May 2019 15:31:27 +0000 (15:31 +0000)]
[X86] Add SimplifyDemandedBits support for PEXTRB/PEXTRW (PR39709)
Test case will be included in a followup - its being used but its tricky to show a case that isn't caught at a later stage anyway.
llvm-svn: 360588
Aleksandr Urakov [Mon, 13 May 2019 15:06:13 +0000 (15:06 +0000)]
[NativePDB] Fix tests after r360569
llvm-svn: 360587
Marshall Clow [Mon, 13 May 2019 14:56:02 +0000 (14:56 +0000)]
Add a test for LWG#3204 and mark it as complete. Reviewed as https://reviews.llvm.org/D61829 Thanks to Zoe for the patch.
llvm-svn: 360586
Sanjay Patel [Mon, 13 May 2019 14:31:14 +0000 (14:31 +0000)]
[DAGCombiner] narrow vector binop with inserts/extract
We catch most of these patterns (on x86 at least) by matching
a concat vectors opcode early in combining, but the pattern may
emerge later using insert subvector instead.
The AVX1 diffs for add/sub overflow show another missed narrowing
pattern. That one may be falling though the cracks because of
combine ordering and multiple uses.
llvm-svn: 360585
Alexey Bataev [Mon, 13 May 2019 14:21:46 +0000 (14:21 +0000)]
[OPENMP][NVPTX]Simplify handling of thread limit, NFC.
Summary:
Patch improves performance of the full runtime mode by moving
threads limit counter to the shared memory. It also allows to save
global memory.
Reviewers: grokos, kkwli0, gtbercea
Subscribers: guansong, jdoerfert, openmp-commits, caomhin
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D61801
llvm-svn: 360584
Pavel Labath [Mon, 13 May 2019 13:52:40 +0000 (13:52 +0000)]
DWARF/DIERef: remove non-const operator<
It serves no purpose as one can always invoke the const version instead.
llvm-svn: 360583
Sanjay Patel [Mon, 13 May 2019 13:32:16 +0000 (13:32 +0000)]
[x86] add test for insert/extract binop; NFC
This pattern is visible in the c-ray benchmark with an AVX target.
llvm-svn: 360582
Kevin P. Neal [Mon, 13 May 2019 13:23:30 +0000 (13:23 +0000)]
Add constrained fptrunc and fpext intrinsics.
The new fptrunc and fpext intrinsics are constrained versions of the
regular fptrunc and fpext instructions.
Reviewed by: Andrew Kaylor, Craig Topper, Cameron McInally, Conner Abbot
Approved by: Craig Topper
Differential Revision: https://reviews.llvm.org/D55897
llvm-svn: 360581
Hans Wennborg [Mon, 13 May 2019 13:19:09 +0000 (13:19 +0000)]
Revert r360559 "[c++20] P1064R0: Allow virtual function calls in constant expression evaluation."
This caused Chromium builds to hit the new "can't handle virtual calls with
virtual bases" assert. Reduced repro coming up.
llvm-svn: 360580
Simon Pilgrim [Mon, 13 May 2019 12:44:03 +0000 (12:44 +0000)]
TargetLowering::SimplifyDemandedBits - early-out for UNDEF ops. NFCI.
llvm-svn: 360579
Thomas Preud'homme [Mon, 13 May 2019 12:39:08 +0000 (12:39 +0000)]
FileCheck [5/12]: Introduce regular numeric variables
Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch introduces regular numeric
variables which can be set on the command-line.
This commit introduces regular numeric variable that can be set on the
command-line with the -D option to a numeric value. They can then be
used in CHECK patterns in numeric expression with the same shape as
@LINE numeric expression, ie. VAR, VAR+offset or VAR-offset where offset
is an integer literal.
The commit also enable strict whitespace in the verbose.txt testcase to
check that the position or the location diagnostics. It fixes one of the
existing CHECK in the process which was not accurately testing a
location diagnostic (ie. the diagnostic was correct, not the CHECK).
Copyright:
- Linaro (changes up to diff 183612 of revision D55940)
- GraphCore (changes in later versions of revision D55940 and
in new revision created off D55940)
Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60385
llvm-svn: 360578
Eugene Leviant [Mon, 13 May 2019 11:53:05 +0000 (11:53 +0000)]
[ThinLTO] Don't internalize weak writeable variables
Variables with linkonce_odr and weak_odr linkage shouldn't be internalized
if they're not readonly. Otherwise we may end up with multiple copies of
such variable, so reads and writes will become inconsistent
Differential revision: https://reviews.llvm.org/D61255
llvm-svn: 360577
Pavel Labath [Mon, 13 May 2019 11:32:52 +0000 (11:32 +0000)]
Add REQUIRES: windows to NativePDB/stack_unwinding01.cpp
The test runs the compiled executable. As such, it can only work on
windows hosts.
llvm-svn: 360576
Serge Guelton [Mon, 13 May 2019 11:29:25 +0000 (11:29 +0000)]
Simplify llvm-cat help
Only output options that are directly relevant.
Differential Revision: https://reviews.llvm.org/D61740
llvm-svn: 360575
Pavel Labath [Mon, 13 May 2019 11:25:35 +0000 (11:25 +0000)]
Breakpad: Generate unwind plans from STACK CFI records
Summary:
This patch implements the GetUnwindPlan interface (added in the previous
patch) for SymbolFileBreakpad, and uses it to generate unwind plans from
STACK CFI records in breakpad files.
We first perform a light-weight parse of the breakpad in order to build
up a map of regions covered by the unwind info so that we can later jump
to the right record when we need to unwind a specific function.
The actual parsing is relatively straight-forward, as the STACK CFI records
are just another (text) form of the eh_frame unwind instructions, and
the same goes for lldb's UnwindPlans. The newly-introduced
PostfixExpression API is used to convert the breakpad postfix
expressions into DWARF. The generated dwarf expressions are stored in a
BumpPtrAllocator, as the UnwindPlan does not take ownership of the
expression data it references (usually this is static data in an object
file, so special ownership is needed).
At this moment the generated unwind plans aren't used in the actual
unwind machinery (only in the image show-unwind command), but that is
coming in a separate patch.
Reviewers: amccarth, clayborg, markmentovai
Subscribers: aprantl, jasonmolenda, lldb-commits
Differential Revision: https://reviews.llvm.org/D61733
llvm-svn: 360574
Cullen Rhodes [Mon, 13 May 2019 10:10:24 +0000 (10:10 +0000)]
[AArch64][SVE2] Add SVE2 target features to backend and TargetParser
Summary:
This patch adds the following features defined by Arm SVE2 architecture
extension:
sve2, sve2-aes, sve2-sm4, sve2-sha3, bitperm
For existing CPUs these features are declared as unsupported to prevent
scheduler errors.
The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest
Reviewers: SjoerdMeijer, sdesmalen, ostannard, rovka
Reviewed By: SjoerdMeijer, rovka
Subscribers: rovka, javed.absar, tschuett, kristof.beyls, kristina, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61513
llvm-svn: 360573
Gabor Marton [Mon, 13 May 2019 10:06:25 +0000 (10:06 +0000)]
[ASTImporter] Separate unittest files
Summary:
Move generic redecl chain tests and visibility tests into their own
separate test files.
Reviewers: a_sidorin, a.sidorin, shafik
Subscribers: mgorny, rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61786
llvm-svn: 360572
Stefan Granitz [Mon, 13 May 2019 09:48:26 +0000 (09:48 +0000)]
Fix flakiness in lldb lit test
Messages "breakpoint locations added" and "process stopped" may come out of order.
Differential Revision: https://reviews.llvm.org/D61611#anchor-1499662
llvm-svn: 360571
Ulrich Weigand [Mon, 13 May 2019 09:47:26 +0000 (09:47 +0000)]
[SystemZ] Model floating-point control register
This adds the FPC (floating-point control register) as a reserved
physical register and models its use by SystemZ instructions.
Note that only the current rounding modes and the IEEE exception
masks are modeled. *Changes* of the FPC due to exceptions (in
particular the IEEE exception flags and the DXC) are not modeled.
At this point, this patch is mostly NFC, but it will prevent
scheduling of floating-point instructions across SPFC/LFPC etc.
llvm-svn: 360570
Aleksandr Urakov [Mon, 13 May 2019 09:41:57 +0000 (09:41 +0000)]
[NativePDB] Support member function types in PdbAstBuilder
Summary:
This patch implements missing case in PdbAstBuilder::CreateType for
LF_MFUNCTION. This is necessary, for example, in stack unwinding of struct
methods.
Reviewers: amccarth, aleksandr.urakov
Reviewed By: amccarth
Subscribers: abidh, teemperor, lldb-commits, leonid.mashinskiy
Differential Revision: https://reviews.llvm.org/D61128
llvm-svn: 360569
Pavel Labath [Mon, 13 May 2019 09:35:00 +0000 (09:35 +0000)]
minidump: Use yaml instead of checked-in binaries for ThreadList tests
yaml2obj now supports the ThreadList stream.
llvm-svn: 360568
Sam Parker [Mon, 13 May 2019 09:23:32 +0000 (09:23 +0000)]
[ARM][ParallelDSP] Relax alias checks
When deciding the safety of generating smlad, we checked for any
writes within the block that may alias with any of the loads that
need to be widened. This is overly conservative because it only
matters when there's a potential aliasing write to a location
accessed by a pair of loads.
Now we check for aliasing writes only once, during setup. If two
loads are found to have an aliasing write between them, we don't add
these loads to LoadPairs. This means that later during the transform,
we can safely widened a pair without worrying about aliasing.
However, to maintain correctness, we also need to change the way that
wide loads are inserted because the order is now important.
The MatchSMLAD method has also been changed, absorbing
MatchReductions and AddMACCandidate to hopefully improve readability.
Differential Revision: https://reviews.llvm.org/D6102
llvm-svn: 360567
Clement Courbet [Mon, 13 May 2019 09:07:37 +0000 (09:07 +0000)]
[DAGCombiner] Fix invalid alias analysis.
Summary:
When we know for sure whether two addresses do or do not alias, we
should immediately return from DAGCombiner::isAlias().
I think this comes from a bad copy/paste, Sorry for not catching that during the
code review.
Fixes PR41855.
Reviewers: niravd, gchatelet, EricWF
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61846
llvm-svn: 360566
Pavel Labath [Mon, 13 May 2019 08:58:34 +0000 (08:58 +0000)]
[DWARF] Use sequential integers for the IDs of the SymbolFileDWOs
Summary:
Instead of using the offset of the contained compile unit, we use it's
ID. The goal of this change is two-fold:
- free up space in the user_id_t representation to enable storing the
debug-info-carrying section (debug_types/debug_info) without
decreasing the amount of debug info we can address (as would be the
case with D61503).
- be a step towards supporting DWO files containing more than one unit
(important for debug_types+dwo, but can also happen with regular
dwo+lto). For this part to fully work we'd still need to add a way to
lookup the SymbolFileDWO without going through GetCompileUnitAtIndex,
but making sure things don't accidentally work because the SymbolFile
ID is the same as compile unit offset is a step towards that.
Reviewers: JDevlieghere, clayborg, aprantl
Subscribers: mehdi_amini, dexonsmith, tberghammer, jankratochvil, lldb-commits
Differential Revision: https://reviews.llvm.org/D61783
llvm-svn: 360565
Pavel Labath [Mon, 13 May 2019 08:48:03 +0000 (08:48 +0000)]
@skipIfLinux flaky lldb-mi tests
llvm-svn: 360564
Richard Smith [Mon, 13 May 2019 08:31:14 +0000 (08:31 +0000)]
PR41845: Detect and reject mismatched inner/outer pack expansion sizes
in fold expressions rather than crashing.
llvm-svn: 360563
Fangrui Song [Mon, 13 May 2019 08:25:53 +0000 (08:25 +0000)]
Remove declaratons of deleted structs/classes
llvm-svn: 360562
Clement Courbet [Mon, 13 May 2019 08:15:34 +0000 (08:15 +0000)]
[DAGCombiner][NFC] Commit test to show fix in D61846.
llvm-svn: 360561
Richard Smith [Mon, 13 May 2019 07:51:29 +0000 (07:51 +0000)]
PR41854: Don't assert when constant-evaluating a member function call on an invalid designator.
llvm-svn: 360560
Richard Smith [Mon, 13 May 2019 07:42:10 +0000 (07:42 +0000)]
[c++20] P1064R0: Allow virtual function calls in constant expression
evaluation.
llvm-svn: 360559
Fangrui Song [Mon, 13 May 2019 05:51:39 +0000 (05:51 +0000)]
[WebAssembly] Add dependency on WebAssemblyDesc to fix BUILD_SHARED_LIBS=on builds after rL360550
This fixes the link error
ld.lld: error: undefined symbol: llvm::WebAssembly::anyTypeToString(unsigned int)
>>> referenced by WebAssemblyDisassembler.cpp
llvm-svn: 360558
Fangrui Song [Mon, 13 May 2019 05:05:46 +0000 (05:05 +0000)]
[CMake] Add lli to LLDB_TEST_DEPS
lli is used by lit/Breakpoint/jitbp_elf.test
I had a test failure when running check-lldb-lit because my lli was stale.
llvm-svn: 360557
Yonghong Song [Mon, 13 May 2019 05:00:23 +0000 (05:00 +0000)]
[BPF] emit BTF sections only if debuginfo available
Currently, without -g, BTF sections may still be emitted with
data sections, e.g., for linux kernel bpf selftest
test_tcp_check_syncookie_kern.c issue discovered by Martin
as shown below.
-bash-4.4$ bpftool btf dump file test_tcp_check_syncookie_kern.o
[1] VAR 'results' type_id=0, linkage=global-alloc
[2] VAR '_license' type_id=0, linkage=global-alloc
[3] DATASEC 'license' size=0 vlen=1
type_id=2 offset=0 size=4
[4] DATASEC 'maps' size=0 vlen=1
type_id=1 offset=0 size=28
Let disable BTF generation if no debuginfo, which is
the original design.
Signed-off-by: Yonghong Song <yhs@fb.com>
Differential Revision: https://reviews.llvm.org/D61826
llvm-svn: 360556
Lang Hames [Mon, 13 May 2019 04:51:31 +0000 (04:51 +0000)]
[JITLink] Track section alignment and make sure it is respected during layout.
Previously we had only honored alignments on individual atoms, but
tools/runtimes may assume that the section alignment is respected too.
llvm-svn: 360555
Fangrui Song [Mon, 13 May 2019 04:42:32 +0000 (04:42 +0000)]
Fix file names in file headers. NFC
llvm-svn: 360554
David L. Jones [Mon, 13 May 2019 04:07:54 +0000 (04:07 +0000)]
gn build: support host build on ppc64 (a.k.a. powerpc64le)
llvm-svn: 360553
Craig Topper [Mon, 13 May 2019 04:03:35 +0000 (04:03 +0000)]
Recommit r358887 "[TargetLowering][AMDGPU][X86] Improve SimplifyDemandedBits bitcast handling"
I've included a new fix in X86RegisterInfo to prevent PR41619 without
reintroducing r359392. We might be able to improve that in the base class
implementation of shouldRewriteCopySrc somehow. But this hopefully enables
forward progress on SimplifyDemandedBits improvements for now.
Original commit message:
This patch adds support for BigBitWidth -> SmallBitWidth bitcasts, splitting the DemandedBits/Elts accordingly.
The AMDGPU backend needed an extra (srl (and x, c1 << c2), c2) -> (and (srl(x, c2), c1) combine to encourage BFE creation, I investigated putting this in DAGComb
but it caused a lot of noise on other targets - some improvements, some regressions.
The X86 changes are all definite wins.
llvm-svn: 360552
David L. Jones [Mon, 13 May 2019 03:43:25 +0000 (03:43 +0000)]
gn build: merge r360550
llvm-svn: 360551
David L. Jones [Mon, 13 May 2019 03:32:41 +0000 (03:32 +0000)]
[WebAssembly] Move InstPrinter files to MCTargetDesc. NFC
For some targets, there is a circular dependency between InstPrinter and
MCTargetDesc. Merging them together will fix this. For the other targets,
the merging is to maintain consistency so all targets will have the same
structure.
llvm-svn: 360550
Nico Weber [Sun, 12 May 2019 23:47:03 +0000 (23:47 +0000)]
gn build: Merge r360540
llvm-svn: 360549
Leonard Chan [Sun, 12 May 2019 22:44:46 +0000 (22:44 +0000)]
Fix test to use -cc1.
llvm-svn: 360548
Lang Hames [Sun, 12 May 2019 22:26:33 +0000 (22:26 +0000)]
[JITLink] Add a test for zero-filled content.
Also updates RuntimeDyldChecker and llvm-rtdyld to support zero-fill tests by
returning a content address of zero (but no error) for zero-fill atoms, and
treating loads from zero as returning zero.
llvm-svn: 360547
Lang Hames [Sun, 12 May 2019 22:26:32 +0000 (22:26 +0000)]
[ORC] Fix some typos.
Patch by Praveen Velliengiri. Thanks Praveen!
https://reviews.llvm.org/D61793
llvm-svn: 360546
Stephane Moore [Sun, 12 May 2019 21:52:19 +0000 (21:52 +0000)]
[clang] Regenerate AST matcher docs 📖
Summary:
The documentation seems to have been manually edited in https://reviews.llvm.org/rGa282bde69e375985edd4c371b79864f617380ad5.
This commit regenerates the documentation and commits the resulting diff.
Reviewers: benhamilton, mwyman
Reviewed By: mwyman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61769
llvm-svn: 360545
Leonard Chan [Sun, 12 May 2019 21:50:01 +0000 (21:50 +0000)]
Fix for P41852 where builtin attributes were being caught by FindLocsWithCommonFileID().
llvm-svn: 360544
Simon Pilgrim [Sun, 12 May 2019 15:16:29 +0000 (15:16 +0000)]
[X86][AVX] Split VZEXT_MOVL ymm/zmm if the upper elements are not demanded.
Removes unnecessary vzeroupper noted in D61806
llvm-svn: 360543
Sanjay Patel [Sun, 12 May 2019 14:53:59 +0000 (14:53 +0000)]
[LoopVectorizer] add tests for FP minmax; NFC
llvm-svn: 360542
Sanjay Patel [Sun, 12 May 2019 14:43:20 +0000 (14:43 +0000)]
[DAGCombiner] try to move bitcast after extract_subvector
I noticed that we were failing to narrow an x86 ymm math op in a case similar
to the 'madd' test diff. That is because a bitcast is sitting between the math
and the extract subvector and thwarting our pattern matching for narrowing:
t56: v8i32 = add t59, t58
t68: v4i64 = bitcast t56
t73: v2i64 = extract_subvector t68, Constant:i64<2>
t96: v4i32 = bitcast t73
There are a few wins and neutral diffs in the other tests.
Differential Revision: https://reviews.llvm.org/D61806
llvm-svn: 360541
Tamas Zolnai [Sun, 12 May 2019 12:23:56 +0000 (12:23 +0000)]
[clang-tidy] new check: bugprone-unhandled-self-assignment
Summary:
This check searches for copy assignment operators which might not handle self-assignment properly. There are three patterns of
handling a self assignment situation: self check, copy-and-swap or the less common copy-and-move. The new check warns if none of
these patterns is found in a user defined implementation.
See also:
OOP54-CPP. Gracefully handle self-copy assignment
https://wiki.sei.cmu.edu/confluence/display/cplusplus/OOP54-CPP.+Gracefully+handle+self-copy+assignment
Reviewers: JonasToth, alexfh, hokein, aaron.ballman
Subscribers: riccibruno, Eugene.Zelenko, mgorny, xazax.hun, cfe-commits
Tags: #clang, #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D60507
llvm-svn: 360540
Lubos Lunak [Sun, 12 May 2019 10:39:21 +0000 (10:39 +0000)]
make -ftime-trace also print template arguments
Without this, I get e.g. 'PerformPendingInstantiations' -> 'std::fill',
now I get 'std::fill<unsigned long *, int>'.
Differential Revision: https://reviews.llvm.org/D61822
llvm-svn: 360539
Richard Smith [Sun, 12 May 2019 09:39:08 +0000 (09:39 +0000)]
Reject attempts to call non-static member functions on objects outside
their lifetime in constant expressions.
This is undefined behavior per [class.cdtor]p2.
We continue to allow this for objects whose values are not visible
within the constant evaluation, because there's no way we can tell
whether the access is defined or not, existing code relies on the
ability to make such calls, and every other compiler allows such
calls.
This reinstates r360499, reverted in r360531.
llvm-svn: 360538
Richard Smith [Sun, 12 May 2019 08:57:59 +0000 (08:57 +0000)]
Fix handling of objects under construction during constant expression
evaluation.
It's not enough to just track the LValueBase that we're evaluating, we
need to also track the path to the objects whose constructors are
running.
This reinstates r360464 (reverted in r360531) with a workaround for an
MSVC bug that previously caused the Windows bots to fail.
llvm-svn: 360537
Fangrui Song [Sun, 12 May 2019 04:55:09 +0000 (04:55 +0000)]
[utils] update_test_checks.py: allow opt-8, opt-9
Allow using Debian's opt-8, opt-9 with update_test_checks.py
Patch by Shawn Landden!
Differential Revision: https://reviews.llvm.org/D61148
llvm-svn: 360536
Simon Pilgrim [Sat, 11 May 2019 21:35:50 +0000 (21:35 +0000)]
[X86][SSE] SimplifyDemandedBits - call PEXTRB/PEXTRW SimplifyDemandedVectorElts as well.
See if we can simplify the demanded vector elts from the extraction before trying to simplify the demanded bits.
This helps us with target shuffles and hops in particular.
llvm-svn: 360535
Simon Pilgrim [Sat, 11 May 2019 20:56:05 +0000 (20:56 +0000)]
[DAG] Add SimplifyDemandedBits support for BITREVERSE
Pulled out of D58017 while I continue to investigate the BSWAP regression on PPC
llvm-svn: 360534