Jonas Devlieghere [Tue, 4 Feb 2020 22:05:15 +0000 (14:05 -0800)]
[lldb/Unittest] Fix the modules build by including TypeSystemClang.h
This should fix the modules build on the GreenDragon bot.
Jonas Devlieghere [Tue, 4 Feb 2020 21:59:29 +0000 (13:59 -0800)]
Re-land "[lldb] [testsuite] generalize `DWARFASTParserClangTests` based on `DWARFExpressionTest`'s YAML"
Jon Chesterfield [Tue, 4 Feb 2020 21:55:26 +0000 (21:55 +0000)]
[libomptarget] Implement wavefront functions for amdgcn
Summary: [libomptarget] Implement wavefront functions for amdgcn
Reviewers: jdoerfert, ABataev, grokos, arsenm
Reviewed By: arsenm
Subscribers: saiislam, wdng, arsenm, jvesely, openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D73077
Dimitry Andric [Tue, 4 Feb 2020 21:50:05 +0000 (22:50 +0100)]
[compiler-rt] Fix sanitizer_common build for FreeBSD
This was broken by
28c91219c7e2, which added `struct_stack_t_sz` only to
sanitizer_platform_limits_posix.{cpp,h}.
Jan Kratochvil [Tue, 4 Feb 2020 21:48:27 +0000 (22:48 +0100)]
Revert: [lldb] [testsuite] generalize `DWARFASTParserClangTests` based on `DWARFExpressionTest`'s YAML
It is causing a failure on OSX, to be investigated more.
Differential Revision: https://reviews.llvm.org/D73279
Simon Pilgrim [Tue, 4 Feb 2020 21:36:11 +0000 (21:36 +0000)]
[clang-tidy] Fix "expression is redundant [misc-redundant-expression]" warning. NFCI. (PR44768)
We only accept tok::TokenKind::comment enum values so no need to add other cases. Seems to be a cut+paste typo.
Matt Arsenault [Tue, 4 Feb 2020 20:25:48 +0000 (15:25 -0500)]
AMDGPU: Fix isAlwaysUniform for simple asm SGPR results
We were handling the case where the result was a struct with an
extracted SGPR component, but not for the simple case.
Jonas Devlieghere [Tue, 4 Feb 2020 21:18:12 +0000 (13:18 -0800)]
[lldb/Reproducers] Treat SB classes pass by value as const references
Unless trivially copyable, SB classes that are passed by value should be
treated as const references by the reproducer infrastructure and their
address should be serialized. This is already the case on the
serialization side, but not on the deserialization side. This fixes that
by removing the NotImplementedTag.
Jonas Devlieghere [Tue, 4 Feb 2020 21:17:12 +0000 (13:17 -0800)]
[lldb/Reproducers] Instrument SBFile
Currently SBFile isn't really instrumented, which was causing trouble
when capturing and replaying the Python test suite. The class is
particularly tricky because one of its constructors takes a FileSP which
isn't instrumented. Until we have proper shadowing in place, we'll
simply always record a nullptr.
Differential revision: https://reviews.llvm.org/D73992
Simon Pilgrim [Tue, 4 Feb 2020 21:23:50 +0000 (21:23 +0000)]
Fix "expression is redundant [misc-redundant-expression]" warning (PR44768)
Be more specific that getOperandConstraint should return -1 or a uint8_t value
Matt Arsenault [Sat, 25 Jan 2020 00:38:53 +0000 (19:38 -0500)]
AMDGPU/GlobalISel: Select G_SEXT_INREG
Matt Arsenault [Sat, 25 Jan 2020 14:31:09 +0000 (09:31 -0500)]
AMDGPU/GlobalISel: Do a better job splitting 64-bit G_SEXT_INREG
We don't need to expand to full shifts for the > 32-bit case. This
just switches to a sext_inreg of the high half.
Matt Arsenault [Tue, 4 Feb 2020 21:06:34 +0000 (16:06 -0500)]
AMDGPU/GlobalISel: Legalize G_SEXT_INREG
Split the VALU 64-bit case in RegBankSelect.
Austin Kerbow [Tue, 4 Feb 2020 01:08:26 +0000 (17:08 -0800)]
[AMDGPU] Fix infinite loop with fma combines
https://reviews.llvm.org/D72312 introduced an infinite loop which involves
DAGCombiner::visitFMA and AMDGPUTargetLowering::performFNegCombine.
fma( a, fneg(b), fneg(c) ) => fneg( fma (a, b, c) ) => fma( a, fneg(b), fneg(c) ) ...
This only breaks with types where 'isFNegFree' returns flase, e.g. v4f32.
Reproducing the issue also needs the attribute 'no-signed-zeros-fp-math',
and no source mods allowed on one of the users of the Op.
This fix makes changes to indicate that it is not free to negate a fma if it
has users with source mods.
Differential Revision: https://reviews.llvm.org/D73939
Evgenii Stepanov [Tue, 4 Feb 2020 20:21:06 +0000 (12:21 -0800)]
[sanitizer] Add missing declarations for sigaltstack syscall wrappers.
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73987
Matt Arsenault [Tue, 21 Jan 2020 21:47:27 +0000 (16:47 -0500)]
AMDGPU/GlobalISel: Remove extension legality hacks
The legalization has improved since this was added, and the tests
relying on this no longer need it.
Michael Liao [Mon, 3 Feb 2020 20:35:18 +0000 (15:35 -0500)]
[hip] Properly populate macros based on host processor.
Summary:
- The device compilation needs to have a consistent source code compared
to the corresponding host compilation. If macros based on the
host-specific target processor is not properly populated, the device
compilation may fail due to the inconsistent source after the
preprocessor. So far, only the host triple is used to build the
macros. If a detailed host CPU target or certain features are
specified, macros derived from them won't be populated properly, e.g.
`__SSE3__` won't be added unless `+sse3` feature is present. On
Windows compilation compatible with MSVC, that missing macros result
in that intrinsics are not included and cause device compilation
failure on the host-side source.
- This patch addresses this issue by introducing two `cc1` options,
i.e., `-aux-target-cpu` and `-aux-target-feature`. If a specific host
CPU target or certain features are specified, the compiler driver will
append them during the construction of the offline compilation
actions. Then, the toolchain in `cc1` phase will populate macros
accordingly.
- An internal option `--gpu-use-aux-triple-only` is added to fall back
the original behavior to help diagnosing potential issues from the new
behavior.
Reviewers: tra, yaxunl
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73942
Richard Smith [Tue, 4 Feb 2020 20:20:34 +0000 (12:20 -0800)]
PR44761: Fix fallback to later tiebreakers if two non-template functions
are equally constrained.
Richard Smith [Tue, 4 Feb 2020 19:43:15 +0000 (11:43 -0800)]
Additional testcase for
0130b6cb5a8.
Tyker [Tue, 4 Feb 2020 20:17:47 +0000 (21:17 +0100)]
Craig Topper [Tue, 4 Feb 2020 19:25:24 +0000 (11:25 -0800)]
Recommit "[X86] Use X86ISD::SUB instead of X86ISD::CMP in some places."
This time with correct types for the data result from the SUB.
Original commit message:
Our normal lowering for ISD::SETCC uses X86ISD::SUB to enable
CSE unless the RHS is 0. optimizeCompareInstr called by the peephole
pass can turn subs with unused results into cmps to clean this up.
This commit makes other places that create X86ISD::CMP have the
same behavior.
River Riddle [Tue, 4 Feb 2020 20:17:14 +0000 (12:17 -0800)]
[mlir] Print types to the OpAsmPrinter instead of the raw_ostream.
This allows for reusing the internal state of the printer, which is more
efficient and also allows for using type aliases
Teresa Johnson [Tue, 4 Feb 2020 18:37:53 +0000 (10:37 -0800)]
[InlineCost] Add flag to allow changing the default inline cost
Summary:
It can be useful to tune the default inline threshold without overriding other inlining thresholds (e.g. in code compiled for size).
The existing `-inline-threshold` flag overrides other thresholds, so it is insufficient in codebases where there is a mix of code compiled for size and speed.
Patch by Michael Holman <michael.holman@microsoft.com>
Reviewers: eraman, tejohnson
Reviewed By: tejohnson
Subscribers: tejohnson, mtrofin, davidxl, hiraditya, haicheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73217
Matt Arsenault [Sat, 25 Jan 2020 01:53:26 +0000 (20:53 -0500)]
AMDGPU/GlobalISel: Custom lower G_FEXP
Matt Arsenault [Sat, 25 Jan 2020 02:21:03 +0000 (21:21 -0500)]
AMDGPU/GlobalISel: Legalize s16 G_FEXP2
Paula Toth [Tue, 4 Feb 2020 18:39:16 +0000 (10:39 -0800)]
[libc] Fix typo in header generation docs.
Reviewers: sivachandra, abrachet
Reviewed By: sivachandra, abrachet
Subscribers: libc-commits, MaskRay, tschuett
Tags: #libc-project, #llvm
Differential Revision: https://reviews.llvm.org/D72248
Tyker [Tue, 4 Feb 2020 18:23:33 +0000 (19:23 +0100)]
[C++20] Add consteval-specific semantic for functions
Summary:
Changes:
- Calls to consteval function are now evaluated in constant context but IR is still generated for them.
- Add diagnostic for taking address of a consteval function in non-constexpr context.
- Add diagnostic for address of consteval function accessible at runtime.
- Add tests
Reviewers: rsmith, aaron.ballman
Reviewed By: rsmith
Subscribers: mgrang, riccibruno, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D63960
Aaron Watry [Sun, 2 Feb 2020 01:54:45 +0000 (19:54 -0600)]
libclc/asin: Switch to amd builtins version of asin
Fixes a wimpy-mode CTS failure for asin(float).
Passes non-wimpy for both float/double on RX580.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
Matt Arsenault [Fri, 31 Jan 2020 19:35:53 +0000 (14:35 -0500)]
CodeGenPrepare: Reorder check for cold and shouldOptimizeForSize
shouldOptimizeForSize is showing up in a profile, spending around 10%
of the pass time in one function. This should probably not be so slow,
but the much cheaper attribute check should be done first anyway.
aartbik [Mon, 3 Feb 2020 21:27:41 +0000 (13:27 -0800)]
[mlir] [VectorOps] refined description of vector.contract
Summary:
A few details were missing in the description. These
changes makes the documented code "compile".
Reviewers: nicolasvasilache, andydavis1
Reviewed By: nicolasvasilache, andydavis1
Subscribers: merge_guards_bot, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73923
Jonathan Coe [Tue, 4 Feb 2020 18:26:47 +0000 (18:26 +0000)]
[clang-format] Allow a comment to follow a C# attribute specifier
Summary: Add comments to the list of tokens that can follow the ']' at the end of a C# attribute specifier to prevent comments after attribute specifiers from being formatted as continuations.
Reviewers: MyDeveloperDay, krasimir
Reviewed By: MyDeveloperDay
Tags: #clang-format
Differential Revision: https://reviews.llvm.org/D73977
Matt Arsenault [Tue, 3 Dec 2019 07:01:21 +0000 (12:31 +0530)]
AMDGPU: Split denormal mode tracking bits
Prepare to accurately track the future denormal-fp-math attribute
changes. The way to actually set these separately is not wired in yet.
This is just a mechanical change, and mostly still assumes the input
and output mode match. This should be refined for some cases. For
example, fcanonicalize lowering should use the flushing variant if
either input or output flushing is enabled
Vedant Kumar [Tue, 4 Feb 2020 18:43:44 +0000 (10:43 -0800)]
[lldb/test] Skip TestBasicEntryValuesX86_64 due to llvm.org/PR44774
Vedant Kumar [Tue, 4 Feb 2020 18:12:47 +0000 (10:12 -0800)]
[lldb/StackFrameList] Convert assert to defensive check in SynthesizeTailCallFrames
In order to synthesize tail call frames, the stack frame list must not
be empty (otherwise, there is no "previous" frame to infer a tail call
from).
This case is hard to hit. To trigger it, we must first fail to push
`unwind_frame_sp` because we either fail to get its SymbolContext, or
given its SymbolContext the GetParentOfInlineScope call fails. This
causes m_concrete_frames_fetched to be incremented while m_frames
remains empty. Then, the next frame in the stack may fail within
SynthesizeTailCallFrames. This crash arose during a kernel debugging
session.
rdar://
59147051
Jacques Pienaar [Tue, 4 Feb 2020 18:34:42 +0000 (10:34 -0800)]
[mlir] Fix clang 5 warning for missing braces
Fangrui Song [Tue, 4 Feb 2020 18:03:14 +0000 (10:03 -0800)]
[test] yaml2obj -docnum => --docnum=
Make usage more consistent, and make it possible to enable LongOptionsUseDoubleDash.
Matt Arsenault [Thu, 30 Jan 2020 16:03:17 +0000 (11:03 -0500)]
AMDGPU: Cleanup SMRD buffer selection
The usage of the Imm out argument from SelectSMRDOffset is pretty
confusing. Stop trying to reject CI immediates in the case where the
offset field can be used. It's not an illegal way to encode the
immediate, so just prefer the better encoding pattern with
AddedComplexity.
We probably don't even really need the different opcodes for the
different offset types anymore, but that will be more work to cleanup.
The SMRD non-buffer load patterns could also use a cleanup to be done
separately.
Matt Arsenault [Tue, 4 Feb 2020 15:34:22 +0000 (10:34 -0500)]
GlobalISel: Fold SmallVector resizes into constructors
Simon Pilgrim [Tue, 4 Feb 2020 18:01:38 +0000 (18:01 +0000)]
[X86] Fix missing load latencies (PR36894)
We weren't account for load latencies in the SSE42/AES/CLMUL schedule classes
Matt Arsenault [Tue, 4 Feb 2020 18:06:55 +0000 (13:06 -0500)]
Try to fix buildbot failure
Yitzhak Mandelbaum [Tue, 4 Feb 2020 17:32:06 +0000 (12:32 -0500)]
[clang][NFC] Expand some `auto`s and add another test for matcher `isExpandedFromMacro`.
Summary: Spells out some `auto`s explicitly and adds another test for the matcher `isExpandedFromMacro`.
Reviewers: aaron.ballman
Subscribers: gribozavr, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73975
Hiroshi Yamauchi [Mon, 3 Feb 2020 20:22:03 +0000 (12:22 -0800)]
[BFI] Add a debug check for unknown block queries.
Summary:
Add a debug check for frequency queries for unknown blocks (typically blocks
that are created after BFI is computed but their frequencies are not
communicated to BFI.)
This is useful for detecting and debugging missed BFI updates.
This is debug build only and disabled behind a flag.
Reviewers: davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73920
Sanjay Patel [Tue, 4 Feb 2020 17:59:23 +0000 (12:59 -0500)]
[InstCombine] add FIXME comment to shuffle transform; NFC
Existing tests:
rG5d04e008f708
rG2a191cf8500f
...should verify that the underlying analysis doesn't improve
too much without updating this user code.
Matt Arsenault [Thu, 7 Nov 2019 01:10:52 +0000 (17:10 -0800)]
Separately track input and output denormal mode
AMDGPU and x86 at least both have separate controls for whether
denormal results are flushed on output, and for whether denormals are
implicitly treated as 0 as an input. The current DAGCombiner use only
really cares about the input treatment of denormals.
Stephen Neuendorffer [Tue, 4 Feb 2020 17:45:28 +0000 (09:45 -0800)]
[clang] fix lib/ASTMatchers for BUILD_SHARED_LIBS=ON
Fangrui Song [Fri, 31 Jan 2020 02:16:09 +0000 (18:16 -0800)]
[X86] -fpatchable-function-entry=N,0: place patch label after ENDBR{32,64}
Similar to D73680 (AArch64 BTI).
A local linkage function whose address is not taken does not need ENDBR32/ENDBR64. Placing the patch label after ENDBR32/ENDBR64 has the advantage that code does not need to differentiate whether the function has an initial ENDBR.
Also, add 32-bit tests and test that .cfi_startproc is at the function
entry. The line information has a general implementation and is tested
by AArch64/patchable-function-entry-empty.mir
Reviewed By: nickdesaulniers
Differential Revision: https://reviews.llvm.org/D73760
Fangrui Song [Tue, 4 Feb 2020 01:07:41 +0000 (17:07 -0800)]
[Driver] Change -fmax-tokens $arg to -fmax-tokens=$arg
Reviewed By: hans
Differential Revision: https://reviews.llvm.org/D73937
David Spickett [Tue, 4 Feb 2020 16:52:41 +0000 (16:52 +0000)]
[ARM] Correct missing newline after outputting .tlsdescseq directive.
Differential Revision: https://reviews.llvm.org/D73972
Peter Collingbourne [Mon, 3 Feb 2020 23:35:35 +0000 (15:35 -0800)]
scudo: Simplify getClassIdBySize() logic. NFCI.
By subtracting 1 from Size at the beginning we can simplify the
subsequent calculations. This also saves 4 instructions on aarch64
and 9 instructions on x86_64, but seems to be perf neutral.
Differential Revision: https://reviews.llvm.org/D73936
Yonghong Song [Sun, 2 Feb 2020 22:54:16 +0000 (14:54 -0800)]
[BPF] use base lvalue type for preserve_{struct,union}_access_index metadata
Linux commit
https://github.com/torvalds/linux/commit/
1cf5b23988ea0086a252a5c8b005b075f1e9b030#diff-
289313b9fec99c6f0acfea19d9cfd949
uses "#pragma clang attribute push (__attribute__((preserve_access_index)),
apply_to = record)"
to apply CO-RE relocations to all records including the following pattern:
#pragma clang attribute push (__attribute__((preserve_access_index)), apply_to = record)
typedef struct {
int a;
} __t;
#pragma clang attribute pop
int test(__t *arg) { return arg->a; }
The current approach to use struct type in the relocation record will
result in an anonymous struct, which make later type matching difficult
in bpf loader. In fact, current BPF backend will fail the above program
with assertion:
clang: ../lib/Target/BPF/BPFAbstractMemberAccess.cpp:796: ...
Assertion `TypeName.size()' failed.
The patch use the base lvalue type for the "base" value to annotate
preservee_{struct,union}_access_index intrinsics. In the above example,
the type will be "__t" which preserved the type name.
Differential Revision: https://reviews.llvm.org/D73900
Cameron McInally [Tue, 4 Feb 2020 17:10:43 +0000 (11:10 -0600)]
[NFC][LangRef][FPEnv] Fix whitespace for denormal-fp-math/denormal-fp-math-f32
Fix incorrect spacing for `denormal-fp-math` and `denormal-fp-math-f32`. No
other changes.
Stephen Neuendorffer [Wed, 1 Jan 2020 01:23:01 +0000 (17:23 -0800)]
[MLIR] Fixes for shared library dependencies.
Summary:
This patch is a step towards enabling BUILD_SHARED_LIBS=on, which
builds most libraries as DLLs instead of statically linked libraries.
The main effect of this is that incremental build times are greatly
reduced, since usually only one library need be relinked in response
to isolated code changes.
The bulk of this patch is fixing incorrect usage of cmake, where library
dependencies are listed under add_dependencies rather than under
target_link_libraries or under the LINK_LIBS tag. Correct usage should be
like this:
add_dependencies(MLIRfoo MLIRfooIncGen)
target_link_libraries(MLIRfoo MLIRlib1 MLIRlib2)
A separate issue is that in cmake, dependencies between static libraries
are automatically included in dependencies. In the above example, if MLIBlib1
depends on MLIRlib2, then it is sufficient to have only MLIRlib1 in the
target_link_libraries. When compiling with shared libraries, it is necessary
to have both MLIRlib1 and MLIRlib2 specified if MLIRfoo uses symbols from both.
Reviewers: mravishankar, antiagainst, nicolasvasilache, vchuravy, inouehrs, mehdi_amini, jdoerfert
Reviewed By: nicolasvasilache, mehdi_amini
Subscribers: Joonsoo, merge_guards_bot, jholewinski, mgorny, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, csigg, arpith-jacob, mgester, lucyrfox, herhut, aartbik, liufengdb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73653
Yonghong Song [Sun, 2 Feb 2020 05:00:00 +0000 (21:00 -0800)]
[BPF] handle typedef of struct/union for CO-RE relocations
Linux commit
https://github.com/torvalds/linux/commit/
1cf5b23988ea0086a252a5c8b005b075f1e9b030#diff-
289313b9fec99c6f0acfea19d9cfd949
uses "#pragma clang attribute push (__attribute__((preserve_access_index)),
apply_to = record)"
to apply CO-RE relocations to all records including the following pattern:
#pragma clang attribute push (__attribute__((preserve_access_index)), apply_to = record)
typedef struct {
int a;
} __t;
#pragma clang attribute pop
int test(__t *arg) { return arg->a; }
The current approach to use struct/union type in the relocation record will
result in an anonymous struct, which make later type matching difficult
in bpf loader. In fact, current BPF backend will fail the above program
with assertion:
clang: ../lib/Target/BPF/BPFAbstractMemberAccess.cpp:796: ...
Assertion `TypeName.size()' failed.
clang will change to use the type of the base of the member access
which will preserve the typedef modifier for the
preserve_{struct,union}_access_index intrinsics in the above example.
Here we adjust BPF backend to accept that the debuginfo
type metadata may be 'typedef' and handle them properly.
Differential Revision: https://reviews.llvm.org/D73902
Yitzhak Mandelbaum [Mon, 3 Feb 2020 21:21:02 +0000 (16:21 -0500)]
[clang] Add matcher to identify macro expansions.
Summary:
This revision adds a matcher `isExpandedFromMacro` that determines whether a
statement is (transitively) expanded from a given macro.
Reviewers: gribozavr
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73965
Justin Hibbits [Tue, 4 Feb 2020 16:33:39 +0000 (10:33 -0600)]
PowerPC: Remove redundancy in ternary for predicate selection
rG2c4620ad57b8 inadvertently added redundancies in selection of GT and
LE predicates for SPE. Correct this.
Partially addresses PR 44768.
David Spickett [Mon, 27 Jan 2020 13:47:09 +0000 (13:47 +0000)]
[ARM][AsmParser] Make assembly directives case insensitive
Differential Revision: https://reviews.llvm.org/D73469
Sam McCall [Tue, 4 Feb 2020 13:42:06 +0000 (14:42 +0100)]
[clangd] Don't assert when completing a lambda variable inside the lambda.
Summary:
This is a fairly ugly hack - we back off several features for any variable
whose type isn't deduced, to avoid computing/caching linkage.
Better suggestions welcome.
Fixes https://github.com/clangd/clangd/issues/274
Reviewers: kadircet, kbobyrev
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73960
Sam McCall [Tue, 4 Feb 2020 14:41:39 +0000 (15:41 +0100)]
Reland "[clangd] Mechanism to make update debounce responsive to rebuild speed."
This reverts commit
ed98994f64b8fe6443aef57a5faa953e86d9fc0e.
Removed the accidental double-mutex-unlock.
Kazushi (Jam) Marukawa [Tue, 4 Feb 2020 15:55:20 +0000 (16:55 +0100)]
[VE] half fptrunc+store&load+fpext
Summary:
fp16 (half) load+fpext and fptrunc+store isel legalization and tests.
Also, ExternalSymbolSDNode operand printing (tested by fp16 lowering).
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D73899
Jonas Paulsson [Tue, 4 Feb 2020 15:51:42 +0000 (16:51 +0100)]
[SystemZ] Add 'REQUIRES:' or '-mtriple' to some newly added tests.
Needed to fix buildbots.
Jonas Paulsson [Fri, 3 Jan 2020 23:39:07 +0000 (00:39 +0100)]
[SystemZ] Support -msoft-float
This is needed when building the Linux kernel.
Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D72189
Nico Weber [Tue, 4 Feb 2020 15:10:04 +0000 (10:10 -0500)]
Revert "DebugInfo: Add missing test coverage for DW_OP_convert in loclists"
This reverts commit
5327b917e3bd0b3db352cb5a61eea7409f2d1972.
Already fails on non-Linux at this commit.
Nico Weber [Tue, 4 Feb 2020 15:05:49 +0000 (10:05 -0500)]
Revert "DebugInfo: Check DW_OP_convert in loclists with Split DWARF"
and follow-ups.
This reverts commit
1ced28cbe75ff81f35ac2c71e941041eb3afcd00.
This reverts commit
4f281f047457ce3f1870a93253476222314f420b.
This reverts commit
552a8fe12bd1822f48dda2e9e8728a179f82d356.
The test fails on non-Linux.
Jeremy Morse [Tue, 4 Feb 2020 14:19:42 +0000 (14:19 +0000)]
[DebugInfo] Re-instate LiveDebugVariables scope trimming
This patch reverts part of r362750 / D62650, which stopped
LiveDebugVariables from trimming leading variable location ranges down
to only covering those instructions that are in scope. I've observed some
circumstances where the number of DBG_VALUEs in a function can be
amplified in an un-necessary way, to cover more instructions that are
out of scope, leading to very slow compile times. Trimming the range
of instructions that the variables cover solves the slow compile times.
The specific problem that r362750 tries to fix is addressed by the
assignment to RStart that I've added. Any variable location that begins
at the first instruction of a block will now be considered to begin at the
start of the block. While these sound the same, the have different
SlotIndexes, and the register allocator may shoehorn additional
instructions in between the two. The test added in the past
(wrong_debug_loc_after_regalloc.ll) still works with this modification.
live-debug-variables.ll has a range trimmed to not cover the prologue of
the function, while dbg-addr-dse.ll has a DBG_VALUE sink past one
instruction with no DebugLoc, which is expected behaviour.
Differential Revision: https://reviews.llvm.org/D73691
Mikhail Maltsev [Tue, 4 Feb 2020 14:48:10 +0000 (14:48 +0000)]
[ARM] Make ARM::ArchExtKind use 64-bit underlying type (part 2), NFCI
Summary:
After following Simon's suggestion about additional testing posted at
https://reviews.llvm.org/D73906, I found several more places that
need to be updated.
Reviewers: simon_tatham, dmgreen, ostannard, eli.friedman
Reviewed By: simon_tatham
Subscribers: merge_guards_bot, kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73963
Sam McCall [Tue, 4 Feb 2020 14:33:53 +0000 (15:33 +0100)]
Revert "[clangd] Mechanism to make update debounce responsive to rebuild speed."
This reverts commit
92570718a86cc4c23108b596002114ab25857b14.
Breaking tests: http://45.33.8.238/linux/9296/step_9.txt
Krzysztof Parzyszek [Tue, 4 Feb 2020 14:18:40 +0000 (08:18 -0600)]
[Polly] Fix compilation after
105642af5eef: include PassManagerImpl.h
Sam McCall [Tue, 4 Feb 2020 14:08:11 +0000 (15:08 +0100)]
[clangd] Increase stack size of the new threads on macOS
Summary: By default it's 512K, which is way to small for clang parser to run on. There is no way to do it via platform-independent API, so it's implemented via pthreads directly in clangd/Threading.cpp.
Fixes https://github.com/clangd/clangd/issues/273
Patch by Dmitry Kozhevnikov!
Reviewers: ilya-biryukov, sammccall, arphaman
Reviewed By: ilya-biryukov, sammccall, arphaman
Subscribers: dexonsmith, umanwizard, jfb, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D50993
Sanjay Patel [Tue, 4 Feb 2020 14:01:16 +0000 (09:01 -0500)]
[InstCombine] add more splat tests with undef elements; NFC
Jan Kratochvil [Tue, 4 Feb 2020 14:02:10 +0000 (15:02 +0100)]
[lldb] [testsuite] Fixup: generalize `DWARFASTParserClangTests` based on `DWARFExpressionTest`'s YAML
The testcase did not compile now because of an upstream change in the
meantime.
For: https://reviews.llvm.org/D73279
Lei Zhang [Tue, 4 Feb 2020 13:56:28 +0000 (08:56 -0500)]
[mlir][spirv] Wrap debug-only method in #ifndef NDEBUG
Alexander Belyaev [Tue, 4 Feb 2020 13:11:10 +0000 (14:11 +0100)]
[Linalg] Add tiling of Linalg to parallel loops.
Differential Revision: https://reviews.llvm.org/D73955
Lei Zhang [Fri, 31 Jan 2020 15:23:41 +0000 (10:23 -0500)]
[mlir][spirv] Add resource limits into target environment
This commit adds two resource limits, max_compute_workgroup_size
and max_compute_workgroup_invocations as resource limits to
the target environment. They are not used at the current moment,
but they will affect the SPIR-V CodeGen. Adding for now to have
a proper target environment modelling.
Differential Revision: https://reviews.llvm.org/D73905
Jan Kratochvil [Tue, 4 Feb 2020 13:33:29 +0000 (14:33 +0100)]
[lldb] [testsuite] generalize `DWARFASTParserClangTests` based on `DWARFExpressionTest`'s YAML
YAMLModuleTester from DWARFExpressionTest can be reused for more
testcases.
Differential Revision: https://reviews.llvm.org/D73279
Jan Kratochvil [Tue, 4 Feb 2020 13:30:27 +0000 (14:30 +0100)]
[lldb] Increase LINK_INTERFACE_MULTIPLICITY for Debug builds
On Fedora 30 x86_64 with
cmake ../llvm-monorepo/llvm/ -DCMAKE_BUILD_TYPE=Debug -DLLVM_USE_LINKER=gold -DLLVM_ENABLE_PROJECTS="lldb;clang;lld" -DLLVM_USE_SPLIT_DWARF=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_ASSERTIONS=ON
It does not affect Release builds.
getting:
lldb/source/Expression/IRInterpreter.cpp:1471: error: undefined reference to 'lldb_private::ThreadPlanCallFunctionUsingABI::ThreadPlanCallFunctionUsingABI(lldb_private::Thread&, lldb_private::Address const&, llvm::Type&, llvm::Type&, llvm::ArrayRef<lldb_private::ABI::CallArgument>, lldb_private::EvaluateExpressionOptions const&)'
lldb/source/Expression/LLVMUserExpression.cpp:148: error: undefined reference to 'lldb_private::ThreadPlanCallUserExpression::ThreadPlanCallUserExpression(lldb_private::Thread&, lldb_private::Address&, llvm::ArrayRef<unsigned long>, lldb_private::EvaluateExpressionOptions const&, std::shared_ptr<lldb_private::UserExpression>&)'
Pavel Labath has suggest LINK_INTERFACE_MULTIPLICITY could be further
increased.
Differential Revision: https://reviews.llvm.org/D73847
Sanjay Patel [Tue, 4 Feb 2020 12:59:12 +0000 (07:59 -0500)]
[InstCombine] add splat tests with undef elements; NFC
Sanjay Patel [Tue, 4 Feb 2020 12:02:01 +0000 (07:02 -0500)]
[InstCombine] fix operands of shouldChangeType() for casted phi transform
This is a bug noted in the recent D72733 and seen
in the similar transform just above the changed source code.
I added tests with illegal types and zexts to show the bug -
we could transform legal phi ops to illegal, etc. I did not add
tests with trunc because we won't see any diffs on those patterns.
That is because InstCombiner::SliceUpIllegalIntegerPHI() appears to
do those transforms independently of datalayout. It can also create
more casts than are present in existing code.
There are some existing regression tests that do not include a
datalayout that would be altered by this fix. I assumed that the
lack of a datalayout in those regression files is an oversight, so
I added the minimal layout (make i32 legal) necessary to preserve
behavior on those tests.
Differential Revision: https://reviews.llvm.org/D73907
Florian Hahn [Tue, 4 Feb 2020 12:23:42 +0000 (12:23 +0000)]
[Matrix] Mark matrix memory intrinsics as argmemonly/write|read mem.
matrix.columnwise.load and matrix.columnwise.store only access memory
through the argument pointers. Also matrix.columnwise.store only writes
memory.
Georgii Rymar [Fri, 31 Jan 2020 09:43:09 +0000 (12:43 +0300)]
[yaml2obj/obj2yaml] - Add support for the SHT_LLVM_CALL_GRAPH_PROFILE section.
This is a LLVM specific section that is well described here:
https://llvm.org/docs/Extensions.html#sht-llvm-call-graph-profile-section-call-graph-profile
This patch teaches yaml2obj and obj2yaml about how to work with it.
Differential revision: https://reviews.llvm.org/D73788
Sam McCall [Mon, 3 Feb 2020 12:01:03 +0000 (13:01 +0100)]
[clangd] Mechanism to make update debounce responsive to rebuild speed.
Summary:
Currently we delay AST rebuilds by 500ms after each edit, to wait for
further edits. This is a win if a rebuild takes 5s, and a loss if it
takes 50ms.
This patch sets debouncepolicy = clamp(min, ratio * rebuild_time, max).
However it sets min = max = 500ms so there's no policy change or actual
customizability - will do that in a separate patch.
See https://github.com/clangd/clangd/issues/275
Reviewers: hokein
Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73873
Mikhail Maltsev [Tue, 4 Feb 2020 11:22:07 +0000 (11:22 +0000)]
[ARM] Make ARM::ArchExtKind use 64-bit underlying type, NFCI
Summary:
This patch changes the underlying type of the ARM::ArchExtKind
enumeration to uint64_t and adjusts the related code.
The goal of the patch is to prepare the code base for a new
architecture extension.
Reviewers: simon_tatham, eli.friedman, ostannard, dmgreen
Reviewed By: dmgreen
Subscribers: merge_guards_bot, kristof.beyls, hiraditya, cfe-commits, llvm-commits, pbarrio
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D73906
protze@itc.rwth-aachen.de [Tue, 4 Feb 2020 11:16:03 +0000 (12:16 +0100)]
[OpenMP][OMPT] fix reduction test for 32-bit x86
Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=44733 | TEST 'libomp :: ompt/synchronization/reduction/tree_reduce.c' FAILED on 32-bit x86 ]]
For 32-bit we need at least 3 variables to avoid atomic reduction to be
choosen by runtime function `__kmp_determine_reduction_method`.
This patch adds reduction variables to the testcase.
Reviewers: mgorny, Hahnfeld
Differential Revision: https://reviews.llvm.org/D73850
David Bozier [Mon, 3 Feb 2020 15:13:31 +0000 (15:13 +0000)]
Improve error message of FileCheck when stdin is empty
Summary: Replace '-' in the error message with <stdin>. This is also consistent with another error message in the code.
Reviewers: jhenderson, probinson, jdenny, grimar, arichardson
Reviewed By: jhenderson
Subscribers: thopre, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73793
Filipe Cabecinhas [Tue, 29 Oct 2019 12:54:20 +0000 (12:54 +0000)]
[NFC] Fix some spelling mistakes to test pushing to GH.
Sven van Haastregt [Tue, 4 Feb 2020 10:56:53 +0000 (10:56 +0000)]
[OpenCL] Tidy up OpenCLBuiltins.td
Align `Type` names to their actual OpenCL C type names, such that we
can print OpenCL C types from TableGen. This is particularly helpful
for completeness comparisons with `opencl-c.h`.
Drop the "Name" field from `TypeList`, as it is unused.
Minor formatting changes.
Simon Pilgrim [Tue, 4 Feb 2020 10:51:48 +0000 (10:51 +0000)]
[DAG] OptLevelChanger - fix uninitialized variable analyzer warning (PR44471)
Ensure that OptLevelChanger::SavedFastISel is initialized in the constructor.
This should be NFC - as the equivalent 'same opt level' early-out is used in the destructor as well, so SavedFastISel is only actually referenced in the general case.
Differential Revision: https://reviews.llvm.org/D73875
Raphael Isemann [Tue, 4 Feb 2020 10:52:37 +0000 (11:52 +0100)]
[lldb][NFC] Use correct Decl typedef in ClangASTSource
This is iterating over a DeclContext and not a TagDecl (even
though both iterators are the same underlying type).
Kadir Cetinkaya [Tue, 4 Feb 2020 10:21:53 +0000 (11:21 +0100)]
Revert "[X86] Use X86ISD::SUB instead of X86ISD::CMP in some places."
This reverts commit
8413116bf10402eef12f556cb9d80b08faeb9890.
this seems to be causing crashes while compiling ncurses.
```
$ ./bin/llc bugpoint-reduced-simplified.ll
LLVM ERROR: Cannot emit physreg copy instruction
```
Here are the crashers: https://gist.github.com/kadircet/
918f5bb97a2afe048cb875490edba46e
executing with an llc compiled at
904d54de9ba9f71e937b24e04ad5941281cd50b7 works fine.
David Green [Tue, 4 Feb 2020 09:25:01 +0000 (09:25 +0000)]
[ARM][VecReduce] Force expand vector_reduce_fmin
Under MVE, we do not have any lowering for fminimum, which a
vector_reduce_fmin without NoNan will be expanded into. As with the
other recent patches, force this to expand in the pre-isel pass. Note
that Neon lowering would be OK because the scalar fminimum uses the
vector VMIN instruction, but is probably better to just rely on the
scalar operations, which is what is done here.
Also fixes what appears to be the reversal of INF vs -INF in the
vector_reduce_fmin widening code.
Guillaume Chatelet [Tue, 4 Feb 2020 08:52:21 +0000 (09:52 +0100)]
[NFC] Encapsulate MemOp logic
Summary:
This patch simply introduces functions instead of directly accessing the fields.
This helps introducing additional check logic. A second patch will add simplifying functions.
Reviewers: courbet
Subscribers: arsenm, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, jsji, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73945
Alex Richardson [Tue, 4 Feb 2020 08:40:56 +0000 (08:40 +0000)]
[update_cc_test_checks] Don't attach CHECK lines to function declarations
Previously we were adding the CHECK lines to both definitions and
declarations. Update the JSON AST dump parsing code to skip all
FunctionDecls without an "inner" node (i.e. no body).
Reviewed By: MaskRay, greened
Differential Revision: https://reviews.llvm.org/D73708
Juneyoung Lee [Tue, 4 Feb 2020 08:16:32 +0000 (17:16 +0900)]
[ValueTracking] Let isGuaranteedToBeUndefOrPoison look into operands of icmp
Juneyoung Lee [Tue, 4 Feb 2020 07:46:54 +0000 (16:46 +0900)]
Let isGuaranteedNotToBeUndefOrPoison consider PHINode with constant values
Craig Topper [Tue, 4 Feb 2020 07:17:20 +0000 (23:17 -0800)]
[X86] Remove unneeded code that looks for (and (i8 (X86setcc_c))
I don't believe we use this construct anymore so I don't think
we need to look for it.
Thomas Raoux [Tue, 4 Feb 2020 06:24:12 +0000 (22:24 -0800)]
[GVN] Add GVNOption to control load-pre more fine-grained.
Adds the global (cl::opt) GVNOption enable-load-in-loop-pre in order
to control whether the optimization will be performed if the load
is part of a loop.
Patch by Hendrik Greving!
Differential Revision: https://reviews.llvm.org/D73804
Craig Topper [Tue, 4 Feb 2020 06:43:33 +0000 (22:43 -0800)]
[X86] Remove some uncovered and possibly broken code from combineZext.
This code matches (zext (trunc (setcc_carry))) -> (and (setcc_carry), 1)
but the code never checks what type we're truncating too. An and
mask of 1 would only make sense if the trunc was to MVT::i1, but
we didn't check for that.
I believe this code is a leftover from when i1 was a legal type.
River Riddle [Tue, 4 Feb 2020 06:14:33 +0000 (22:14 -0800)]
[mlir] Emit a fatal error when the assembly format is invalid
This revision makes sure that errors emitted outside of testing are treated as fatal errors. This avoids the current silent failures that occur when the format is invalid.
River Riddle [Tue, 4 Feb 2020 05:52:43 +0000 (21:52 -0800)]
[mlir][ODS] Refactor BuildableType to use $_builder as part of the format
Summary:
Currently BuildableType is assumed to be preceded by a builder. This prevents constructing types that don't have a callable 'get' method with the builder. This revision reworks the format to be like attribute builders, i.e. by accepting $_builder within the format itself.
Differential Revision: https://reviews.llvm.org/D73736
River Riddle [Tue, 4 Feb 2020 05:52:38 +0000 (21:52 -0800)]
[mlir] Initial support for type constraints in the declarative assembly format
Summary: This revision add support for accepting a few type constraints, e.g. AllTypesMatch, when inferring types for operands and results. This is used to remove the c++ parsers for several additional operations.
Differential Revision: https://reviews.llvm.org/D73735
Craig Topper [Tue, 4 Feb 2020 04:43:07 +0000 (20:43 -0800)]
[X86] Use X86ISD::SUB instead of X86ISD::CMP in some places.
Our normal lowering for ISD::SETCC uses X86ISD::SUB to enable
CSE unless the RHS is 0. optimizeCompareInstr called by the peephole
pass can turn subs with unused results into cmps to clean this up.
This commit makes other places that create X86ISD::CMP have the
same behavior.