Craig Topper [Tue, 11 Feb 2020 19:04:47 +0000 (11:04 -0800)]
[X86] Raise the latency for VectorImul from 4 to 5 in Skylake scheduler models
Based on uops.info these should have 5 cycle latency as they did on Haswell/Broadwell. I have no additional internal information from Intel.
This was also shown as a discrepancy in the spreadsheet that was sent with an early llvm-dev post about llvm-exegesis.
It also matches Agner Fog.
Differential Revision: https://reviews.llvm.org/D74357
LLVM GN Syncbot [Tue, 11 Feb 2020 19:14:15 +0000 (19:14 +0000)]
[gn build] Port
453a8f3af78
Stanislav Mekhanoshin [Tue, 11 Feb 2020 18:55:14 +0000 (10:55 -0800)]
[AMDGPU] Remove AMDGPURegisterInfo
R600 and GCN do not have anything in common in terms of register
file organization anymore.
Differential Revision: https://reviews.llvm.org/D74426
Raphael Isemann [Tue, 11 Feb 2020 18:59:21 +0000 (19:59 +0100)]
[lldb][NFC] Test SourceFileCompletion by completing the target line-table argument
Michael Halkenhäuser [Tue, 11 Feb 2020 18:46:31 +0000 (12:46 -0600)]
[Polly] LLVM OpenMP Backend -- Fix "static chunked" scheduling.
Static chunked OpenMP scheduling has not been treated correctly.
This patch fixes the problem that threads would not process their
(work-)chunks as intended.
Differential Revision: https://reviews.llvm.org/D61081
Teresa Johnson [Thu, 6 Feb 2020 18:54:15 +0000 (10:54 -0800)]
Restore "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP"
This restores commit
748bb5a0f1964d20dfb3891b0948ab6c66236c70, along
with a fix for a Chromium test suite build issue (and a new test for
that case).
Differential Revision: https://reviews.llvm.org/D73242
Krzysztof Parzyszek [Tue, 11 Feb 2020 17:06:21 +0000 (11:06 -0600)]
[Hexagon] Fix ABI info for returning HVX vectors
Cyndy Ishida [Tue, 11 Feb 2020 18:31:54 +0000 (10:31 -0800)]
[llvm][TextAPI] add simulators to output
Summary:
* for <= tbd_v3, simulator platforms appear the same as the real
platform and we distinct the difference from the architecture.
fixes: rdar://problem/
59161559
Reviewers: ributzka, steven_wu
Reviewed By: ributzka
Subscribers: hiraditya, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74416
Justin Lebar [Tue, 11 Feb 2020 07:23:44 +0000 (23:23 -0800)]
Use std::foo_t rather than std::foo in clang.
Summary: No functional change.
Reviewers: bkramer, MaskRay, martong, shafik
Subscribers: martong, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D74414
Justin Lebar [Tue, 11 Feb 2020 06:52:00 +0000 (22:52 -0800)]
Fix SFINAE in CFG.cpp.
Summary: Used std::enable_if without ::type.
Reviewers: bkramer, MaskRay
Subscribers: martong, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D74412
Diego Caballero [Tue, 11 Feb 2020 17:38:34 +0000 (09:38 -0800)]
[mlir] Turn flags in ConvertStandardToLLVM into pass flags
Follow-up on D72802. Turn -convert-std-to-llvm-use-alloca and
-convert-std-to-llvm-bare-ptr-memref-call-conv into pass flags
of LLVMLoweringPass.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D73912
Jordan Rupprecht [Tue, 11 Feb 2020 18:10:52 +0000 (10:10 -0800)]
[NFC] Fix unused var in release builds
Peter Collingbourne [Tue, 11 Feb 2020 18:03:35 +0000 (10:03 -0800)]
gn build: Make scudo cflags more consistent with the cmake build.
Jordan Rupprecht [Tue, 11 Feb 2020 18:01:16 +0000 (10:01 -0800)]
[lldb][test] Remove symlink for API tests.
Summary: Moves lldbsuite tests to lldb/test/API.
This is a largely mechanical change, moved with the following steps:
```
rm lldb/test/API/testcases
mkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}}
mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runner
for d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; done
for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; done
for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done
```
lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure.
Reviewers: labath, JDevlieghere
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71151
Yonghong Song [Wed, 5 Feb 2020 18:27:43 +0000 (10:27 -0800)]
[BPF] implement isTruncateFree and isZExtFree in BPFTargetLowering
Currently, isTruncateFree() and isZExtFree() callbacks return false
as they are not implemented in BPF backend. This may cause suboptimal
code generation. For example, if the load in the context of zero extension
has more than one use, the pattern zextload{i8,i16,i32} will
not be generated. Rather, the load will be matched first and
then the result is zero extended.
For example, in the test together with this commit, we have
I1: %0 = load i32, i32* %data_end1, align 4, !tbaa !2
I2: %conv = zext i32 %0 to i64
...
I3: %2 = load i32, i32* %data, align 4, !tbaa !7
I4: %conv2 = zext i32 %2 to i64
...
I5: %4 = trunc i64 %sub.ptr.lhs.cast to i32
I6: %conv13 = sub i32 %4, %2
...
The I1 and I2 will match to one zextloadi32 DAG node, where SUBREG_TO_REG is
used to convert a 32bit register to 64bit one. During code generation,
SUBREG_TO_REG is a noop.
The %2 in I3 is used in both I4 and I6. If isTruncateFree() is false,
the current implementation will generate a SLL_ri and SRL_ri
for the zext part during lowering.
This patch implement isTruncateFree() in the BPF backend, so for the
above example, I3 and I4 will generate a zextloadi32 DAG node with
SUBREG_TO_REG is generated during lowering to Machine IR.
isZExtFree() is also implemented as it should help code gen as well.
This patch also enables the change in https://reviews.llvm.org/D73985
since it won't kick in generates MOV_32_64 machine instruction.
Differential Revision: https://reviews.llvm.org/D74101
Raphael Isemann [Tue, 11 Feb 2020 17:44:02 +0000 (18:44 +0100)]
[lldb][NFC] Remove support file searching from SourceFileCompleter
This code seems wrong as the directory variable actually contains
the file name. It's also unreachable code as m_include_support_files
is hardcoded to false which is the condition for the surrounding 'if
statement'. Let's just remove all of this.
Ben Langmuir [Tue, 11 Feb 2020 01:22:52 +0000 (17:22 -0800)]
[DirectoryWatcher] Fix misuse of FSEvents API and data race
I observed two bugs in the DirectoryWatcher on macOS
1. We were calling FSEventStreamStop and FSEventStreamInvalidate before
we called FSEventStreamStart and FSEventStreamSetDispatchQueue, if the
DirectoryWatcher was destroyed before the initial async work was done.
This violates the requirements of the FSEvents API.
2. Calls to Receiver could race between the initial work and the
invalidation during destruction.
The second issue is easier to see when using TSan.
Differential Revision: https://reviews.llvm.org/D74371
rdar://
59215667
Johannes Doerfert [Tue, 11 Feb 2020 17:19:34 +0000 (11:19 -0600)]
[Attributor][NFC] Improve documentation
Johannes Doerfert [Tue, 11 Feb 2020 17:06:04 +0000 (11:06 -0600)]
[CodingStandards] Add link to "Picking the Right Data Structure"
See https://reviews.llvm.org/D74340
Johannes Doerfert [Fri, 10 Jan 2020 20:49:45 +0000 (14:49 -0600)]
[Attributor] Return uses do not free pointers
If a pointer is returned that does not mean it is freed in the current
(function) scope. We can ignore such uses in AANoFree.
Johannes Doerfert [Sun, 12 Jan 2020 06:17:08 +0000 (00:17 -0600)]
[Attributor][FIX] Remove duplicate, half-broken functionality
The changeXXXAfterManifest functions are better suited to deal with
changes so we should prefer them. These functions also recursively
delete dead instructions which is why we see test changes.
Johannes Doerfert [Sun, 12 Jan 2020 05:36:17 +0000 (23:36 -0600)]
[Attributor][NFC] Improve debug message
Alexey Bataev [Tue, 11 Feb 2020 16:10:43 +0000 (11:10 -0500)]
[OPENMP50]Add support for relaxed clause in atomic directive.
Added full support for relaxed clause.
Nikita Popov [Tue, 11 Feb 2020 16:41:32 +0000 (17:41 +0100)]
[IRBuilder] Remove more unnecessary NoFolder methods
Split out from D73835. I removed some of these before, but missed
these ones. They are not part of the ConstantFolder interface
and are not going to be used by the IRBuilder.
Nikita Popov [Mon, 3 Feb 2020 20:17:36 +0000 (21:17 +0100)]
[InstCombine] Use replaceOperand() in more places
This is a followup to D73803, which uses the replaceOperand()
helper in more places.
This should be NFC apart from changes to worklist order.
Differential Revision: https://reviews.llvm.org/D73919
Peter Collingbourne [Tue, 11 Feb 2020 16:29:16 +0000 (08:29 -0800)]
Fix errors/warnings in scudo build.
Jonas Paulsson [Tue, 11 Feb 2020 16:28:10 +0000 (11:28 -0500)]
[SystemZ] Fix new test case for expensive checks.
It needs 'tracksRegLiveness: true' to pass the machine verifier.
Nikita Popov [Thu, 6 Feb 2020 20:16:10 +0000 (21:16 +0100)]
[X86CmovConversion] Make heuristic for optimized cmov depth more conservative (PR44539)
Fix/workaround for https://bugs.llvm.org/show_bug.cgi?id=44539.
As discussed there, this pass makes some overly optimistic
assumptions, as it does not have access to actual branch weights.
This patch makes the computation of the depth of the optimized cmov
more conservative, by assuming a distribution of 75/25 rather than
50/50 and placing the weights to get the more conservative result
(larger depth). The fully conservative choice would be
std::max(TrueOpDepth, FalseOpDepth), but that would break at least
one existing test (which may or may not be an issue in practice).
Differential Revision: https://reviews.llvm.org/D74155
Louis Dionne [Tue, 11 Feb 2020 16:11:00 +0000 (17:11 +0100)]
[libc++] Make sure that vector copy-construction is disabled for non-copyable types
The Standard requires the value_type of the vector to be Cpp17CopyInsertable
in order for copy-construction to be enabled:
http://eel.is/c++draft/container.requirements#tab:container.req
rdar://problem/
56674564
Differential Revision: https://reviews.llvm.org/D74251
James Henderson [Tue, 11 Feb 2020 16:10:56 +0000 (16:10 +0000)]
[test][DebugInfo][NFC] Fix line endings
Eric Astor [Tue, 11 Feb 2020 14:18:08 +0000 (09:18 -0500)]
[ms] [llvm-ml] Add support for attempted register parsing
Summary:
Add a new method (tryParseRegister) that attempts to parse a register specification.
MASM allows the use of IFDEF <register>, as well as IFDEF <symbol>. To accommodate this, we make it possible to check whether a register specification can be parsed at the current location, without failing the entire parse if it can't.
Reviewers: thakis
Reviewed By: thakis
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73486
Jonas Paulsson [Mon, 10 Feb 2020 20:08:23 +0000 (21:08 +0100)]
[SystemZ] Bugfix in emitSelect()
When more than one SelectPseudo instruction is handled a new MBB is
returned. This must not be done if that would result in leaving an undhandled
isel pseudo behind in the original MBB.
Fixes https://bugs.llvm.org/show_bug.cgi?id=44849.
Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D74352
Justin Lebar [Mon, 10 Feb 2020 23:49:14 +0000 (15:49 -0800)]
Use C++14-style return type deduction in LLVM.
Summary:
Simplifies the C++11-style "-> decltype(...)" return-type deduction.
Note that you have to be careful about whether the function return type
is `auto` or `decltype(auto)`. The difference is that bare `auto`
strips const and reference, just like lambda return type deduction. In
some cases that's what we want (or more likely, we know that the return
type is a value type), but whenever we're wrapping a templated function
which might return a reference, we need to be sure that the return type
is decltype(auto).
No functional change.
Subscribers: dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74383
Justin Lebar [Tue, 11 Feb 2020 03:38:44 +0000 (19:38 -0800)]
Fix SFINAE in JSON.h constructor.
Summary:
This used std::enable_if without referencing ::type. Changed to use
std::enable_if_t.
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74381
Florian Hahn [Tue, 11 Feb 2020 15:06:59 +0000 (15:06 +0000)]
[SCCP] Remove forcedconstant, go to overdefined instead
This patch removes forcedconstant to simplify things for the
move to ValueLattice, which includes constant ranges, but no
forced constants.
This patch removes forcedconstant and changes ResolvedUndefsIn
to mark instructions with unknown operands as overdefined. This
means we do not do simplifications based on undef directly in SCCP
any longer, but this seems to hardly come up in practice (see stats
below), presumably because InstCombine & others take care
of most of the relevant folds already.
It is still beneficial to keep ResolvedUndefIn, as it allows us delaying
going to overdefined until we propagated all known information.
I also built MultiSource, SPEC2000 and SPEC2006 and compared
sccp.IPNumInstRemoved and sccp.NumInstRemoved. It looks like the impact
is quite low:
Tests: 244
Same hash: 238 (filtered out)
Remaining: 6
Metric: sccp.IPNumInstRemoved
Program base patch diff
test-suite...arks/VersaBench/dbms/dbms.test 4.00 3.00 -25.0%
test-suite...TimberWolfMC/timberwolfmc.test 38.00 34.00 -10.5%
test-suite...006/453.povray/453.povray.test 158.00 155.00 -1.9%
test-suite.../CINT2000/176.gcc/176.gcc.test 668.00 668.00 0.0%
test-suite.../CINT2006/403.gcc/403.gcc.test 1209.00 1209.00 0.0%
test-suite...arks/mafft/pairlocalalign.test 76.00 76.00 0.0%
Tests: 244
Same hash: 238 (filtered out)
Remaining: 6
Metric: sccp.NumInstRemoved
Program base patch diff
test-suite...arks/mafft/pairlocalalign.test 185.00 175.00 -5.4%
test-suite.../CINT2006/403.gcc/403.gcc.test 2059.00 2056.00 -0.1%
test-suite.../CINT2000/176.gcc/176.gcc.test 2358.00 2357.00 -0.0%
test-suite...006/453.povray/453.povray.test 317.00 317.00 0.0%
test-suite...TimberWolfMC/timberwolfmc.test 12.00 12.00 0.0%
Reviewers: davide, efriedma, mssimpso
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D61314
Sjoerd Meijer [Tue, 11 Feb 2020 15:14:54 +0000 (15:14 +0000)]
[ARM][MVE] Tail-Predication: recognise (again) active lanes IR pattern
A small IR change in calculating the active lanes resulted in no longer
recognising tail-predication. Now recognise both an 'add' and 'or' in
the expression that calculates the active lanes.
Differential Revision: https://reviews.llvm.org/D74394
Alexandre Ganea [Tue, 11 Feb 2020 15:17:15 +0000 (10:17 -0500)]
[Clang][Driver] After default -fintegrated-cc1, make llvm::report_fatal_error() generate preprocessed source + reproducer.sh again.
Added a test for #pragma clang __debug llvm_fatal_error to test for the original issue.
Added llvm::sys::Process::Exit() and replaced ::exit() in places where it was appropriate. This new function would call the current CrashRecoveryContext if one is running on the same thread; or call ::exit() otherwise.
Fixes PR44705.
Differential Revision: https://reviews.llvm.org/D73742
Alexey Bataev [Tue, 11 Feb 2020 14:35:52 +0000 (09:35 -0500)]
[OPENMP50]Add restrictions for memory order clauses in atomic directive.
Added restrictions for atomic directive.
1. If atomic-clause is read then memory-order-clause must not be acq_rel or release.
2. If atomic-clause is write then memory-order-clause must not be
acq_rel or acquire.
3. If atomic-clause is update or not present then memory-order-clause
must not be acq_rel or acquire.
Joonsoo Jeon [Tue, 11 Feb 2020 14:38:14 +0000 (09:38 -0500)]
[mlir][ods] Added RankedIntElementsAttr class
Defines a tablegen class RankedIntElementsAttr. This is an integer
version of RankedFloatElementsAttr.
Differential Revision: https://reviews.llvm.org/D73764
Richard Smith [Tue, 11 Feb 2020 14:09:18 +0000 (06:09 -0800)]
CWG1423: don't permit implicit conversion of nullptr_t to bool.
The C++ rules briefly allowed this, but the rule changed nearly 10 years
ago and we never updated our implementation to match. However, we've
warned on this by default for a long time, and no other compiler accepts
(even as an extension).
Richard Smith [Mon, 10 Feb 2020 15:22:51 +0000 (07:22 -0800)]
P1957R2: conversion from a pointer to bool is considered narrowing.
This is being implemented somewhat speculatively, to match GCC's
behavior.
Andrew Wei [Tue, 11 Feb 2020 14:42:45 +0000 (22:42 +0800)]
[RISCV] Optimize seteq/setne pattern expansions for better code size
ADDI(C.ADDI) may achieve better code size than XORI, since XORI has no C extension.
This patch transforms two patterns and gets almost equivalent results.
Differential Revision: https://reviews.llvm.org/D71774
Kadir Cetinkaya [Tue, 11 Feb 2020 14:26:15 +0000 (15:26 +0100)]
Revert "[DSE] Add first version of MemorySSA-backed DSE (Bottom up walk)."
This reverts commit
d0c4d4fe0929098a98d9fb20c5e5e19d71341517.
Revert "[DSE,MSSA] Move more passing test cases from todo to simple.ll."
This reverts commit
02266e64bb6dacf76f3aa510df4b59f66d834b1f.
Revert "[DSE,MSSA] Adjust mda-with-dbg-values.ll to MSSA backed DSE."
This reverts commit
74f03e4ff0c1f11c29102329af95f7d9782426dc.
Sam McCall [Mon, 10 Feb 2020 10:52:42 +0000 (11:52 +0100)]
[clangd] Expose completion range in code completion results (C++ API)
Summary:
Informative only, useful for positioning UI, interacting with other sources of
completion etc. As requested by an embedder of clangd.
Reviewers: usaxena95
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D74305
Stephan Herhut [Tue, 11 Feb 2020 09:20:55 +0000 (10:20 +0100)]
[MLIR][GPU] Disallow llvm tanh intrinsics when lowering to NVVM/ROCm.
Summary:
The lowering to NVVM and ROCm handles tanh operations differently by
mapping them to NVVM/ROCm specific intrinsics. This conflicts with
the lowering to LLVM, which uses the default llvm intrinsic. This change
declares the LLVM intrinsics to be illegal, hence disallowing the
correspondign rewrite.
Differential Revision: https://reviews.llvm.org/D74389
Jan Kratochvil [Tue, 11 Feb 2020 13:54:23 +0000 (14:54 +0100)]
[NFC] [lldb] Remove unused declaration
ObjectFileELF::GetSectionIndexByType declaration without definition was
added by commit
17220c188635721e948cf02d2b6ad36b267ea393.
Louis Dionne [Tue, 11 Feb 2020 13:47:53 +0000 (14:47 +0100)]
[libc++] Disable a filesystem test that uses debug mode with the macOS system libc++
The system libc++.dylib doesn't support the debug mode, so this test
can't be supported. As a fly-by fix, we also specify more stringently
that only the macOS system library is unsupported in other tests using
the debug mode.
Simon Pilgrim [Tue, 11 Feb 2020 13:37:44 +0000 (13:37 +0000)]
[X86] combineConcatVectorOps - reuse IsSplat and remove duplicate code. NFC.
Sanjay Patel [Mon, 10 Feb 2020 22:49:48 +0000 (17:49 -0500)]
[VectorCombine] remove unused debug counter; NFC
The variable was added to the initial commit via copy/paste of existing
code, but it wasn't actually used in the code. We can add it back with
the proper usage if/when that is needed.
Raphael Isemann [Tue, 11 Feb 2020 13:09:55 +0000 (14:09 +0100)]
[lldb][NFC] Remove the CppVirtualMadness test
We now have a virtual-functions test and a multiple-inheritance test that
are testing the same functionality (and more) using the newer test functions which
we have in LLDB these days. These tests should also be less flaky and
less dependent on other unrelated LLDB functionality.
Alex Zinenko [Tue, 11 Feb 2020 12:54:55 +0000 (13:54 +0100)]
[mlir] StdToLLVM: add a separate test for the new memref calling convention
Louis Dionne [Tue, 11 Feb 2020 12:50:38 +0000 (13:50 +0100)]
[libc++][macOS CI] Ensure that the SDK version is not older than the deployment target
Raphael Isemann [Tue, 11 Feb 2020 12:31:00 +0000 (13:31 +0100)]
[lldb][NFC] Remove ConstString -> const char * -> StringRef conversions when calling Stream::Indent
Let's just pass in a StringRef and save the strlen call when rebuilding the StringRef parameter.
Feng Liu [Tue, 11 Feb 2020 12:33:38 +0000 (07:33 -0500)]
[mlir] Use the first location in the fused location for diagnostic handler
Differential Revision: https://reviews.llvm.org/D71851
Raphael Isemann [Tue, 11 Feb 2020 11:48:37 +0000 (12:48 +0100)]
[lldb] Add test for multiple inheritance
Raphael Isemann [Tue, 11 Feb 2020 12:04:48 +0000 (13:04 +0100)]
[lldb][NFC] Remove Stream::Indent(const char *) overload in favor of the StringRef version
Pavel Labath [Tue, 4 Feb 2020 02:05:21 +0000 (18:05 -0800)]
[lldb] Delete the SharingPtr class
Summary:
The only use of this class was to implement the SharedCluster of ValueObjects.
However, the same functionality can be implemented using a regular
std::shared_ptr, and its little-known "sub-object pointer" feature, where the
pointer can point to one thing, but actually delete something else when it goes
out of scope.
This patch reimplements SharedCluster using this feature --
SharedClusterPointer::GetObject now returns a std::shared_pointer which points
to the ValueObject, but actually owns the whole cluster. The only change I
needed to make here is that now the SharedCluster object needs to be created
before the root ValueObject. This means that all private ValueObject
constructors get a ClusterManager argument, and their static Create functions do
the create-a-manager-and-pass-it-to-value-object dance.
Reviewers: teemperor, JDevlieghere, jingham
Subscribers: mgorny, jfb, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D74153
Simon Pilgrim [Tue, 11 Feb 2020 11:59:17 +0000 (11:59 +0000)]
[X86][SSE] lowerShuffleAsBitRotate - lower to vXi8 shuffles to ROTL on pre-SSSE3 targets
Without PSHUFB we are better using ROTL (expanding to OR(SHL,SRL)) than using the generic v16i8 shuffle lowering - but if we can widen to v8i16 or more then the existing shuffles are still the better option.
Momchil Velikov [Tue, 11 Feb 2020 12:01:17 +0000 (12:01 +0000)]
[ARM][MVE] Fix a corner case of checking for MVE-I with -mfpu=none
-march=armv8.1-m.main+mve.fp+nomve -mfpu=none should disable FP
registers and instructions moving to/from FP registers.
This patch fixes the case when "+mve" (added to the feature list by
"+mve.fp"), is followed by "-mve" (added by "+nomve").
Differential Revision: https://reviews.llvm.org/D72633
Jonathan Coe [Mon, 10 Feb 2020 08:17:42 +0000 (08:17 +0000)]
[clang-format] Improve handling of C# attributes
Summary:
C# attributes can appear on classes and methods, in which case they should go on their own line, or on method parameters in which case
they should be left inline.
Reviewers: krasimir, MyDeveloperDay
Reviewed By: MyDeveloperDay
Subscribers: klimek
Tags: #clang-format
Differential Revision: https://reviews.llvm.org/D74265
Alexey Lapshin [Mon, 10 Feb 2020 20:57:01 +0000 (23:57 +0300)]
[Debuginfo][NFC] Rename error handling functions using the same pattern.
Summary:
That patch is extracted from https://reviews.llvm.org/D74308.
Currently there are two patterns to name error handling functions:
using "Callback" and "Handler". This patch uses "Handler" for all
usage places.
Reviewers: jhenderson, dblaikie, probinson, aprantl
Reviewed By: jhenderson, dblaikie
Subscribers: hiraditya, llvm-commits
Tags: #llvm, #debug-info
Differential Revision: https://reviews.llvm.org/D74354
Kamil Rytarowski [Tue, 11 Feb 2020 09:57:16 +0000 (10:57 +0100)]
[compiler-rt] Restrict sanitizer_linux.cpp dlinfo(3) to FreeBSD
FreeBSD is currently the only user in this file.
Accessing this symbol on Linux does not work as is.
Louis Dionne [Tue, 11 Feb 2020 10:57:35 +0000 (11:57 +0100)]
[libc++] span: Fix incorrect return type of span::subspan
The extent of the returned span was always std::dynamic_extent, which
is incorrect.
Thanks to Michael Schellenberger Costa for the patch.
Differential Revision: https://reviews.llvm.org/D71997
Mirko Brkusanin [Tue, 11 Feb 2020 10:35:23 +0000 (11:35 +0100)]
[Mips] Add intrinsics for 4-byte and 8-byte MSA loads/stores.
New intrinisics are implemented for when we need to port SIMD code from other
arhitectures and only load or store portions of MSA registers.
Following intriniscs are added which only load/store element 0 of a vector:
v4i32 __builtin_msa_ldrq_w (const void *, imm_n2048_2044);
v2i64 __builtin_msa_ldr_d (const void *, imm_n4096_4088);
void __builtin_msa_strq_w (v4i32, void *, imm_n2048_2044);
void __builtin_msa_str_d (v2i64, void *, imm_n4096_4088);
Differential Revision: https://reviews.llvm.org/D73644
Med Ismail Bennani [Mon, 10 Feb 2020 22:29:12 +0000 (23:29 +0100)]
[lldb/test] Add alternate symbol to StackFrame Recognizer
This reimplements commit
6b2979c12300b90a1e69791d43ee9cff14f4265e and updates
the tests to reflect the addition of the alternate symbol attribute.
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Louis Dionne [Tue, 11 Feb 2020 10:38:00 +0000 (11:38 +0100)]
[libcxx] span: Remove unneeded comparison
size_t is always greater than 0, so remove the artifact from the old
index_type.
Patch by Michael Schellenberger Costa.
Differential Revision: https://reviews.llvm.org/D71996
Raphael Isemann [Tue, 11 Feb 2020 10:28:14 +0000 (11:28 +0100)]
[lldb] Add test for calling overloaded virtual functions
Kerry McLaughlin [Tue, 11 Feb 2020 10:09:27 +0000 (10:09 +0000)]
[AArch64][SVE] Add SVE2 intrinsics for complex integer dot product
Summary:
Implements the following intrinsics:
- @llvm.aarch64.sve.cdot
- @llvm.aarch64.sve.cdot.lane
Reviewers: sdesmalen, efriedma, dancgr, c-rhodes, rengolin
Reviewed By: efriedma
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73687
OCHyams [Tue, 11 Feb 2020 10:07:03 +0000 (10:07 +0000)]
[DebugInfo][NFC] Fixup the UserValue methods to use FragmentInfo
Fixup the UserValue methods to use FragmentInfo instead of DIExpression because
the DIExpression is only ever used to get the to get the FragmentInfo. The
DIExpression is meaningless in the UserValue class because each definition point
added to a UserValue may have a unique DIExpression.
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D74057
OCHyams [Tue, 11 Feb 2020 10:02:31 +0000 (10:02 +0000)]
[DebugInfo][NFC] Rename the class DbgValueLocation to DbgVariableValue
Rename the class DbgValueLocation to DbgVariableValue and instances from Loc to
DbgValue. These names better express the new semantics introduced in D74053.
The class previously represented a { Location } only. It now represents a
{ Location, DIExpression } pair which together describe a value.
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D74055
OCHyams [Tue, 11 Feb 2020 09:44:32 +0000 (09:44 +0000)]
[DebugInfo] Teach LDV how to handle identical variable fragments
LiveDebugVariables uses interval maps to explicitly represent DBG_VALUE
intervals. DBG_VALUEs are filtered into an interval map based on their {
Variable, DIExpression }. The interval map will coalesce adjacent entries that
use the same { Location }. Under this model, DBG_VALUEs which refer to the same
bits of the same variable will be filtered into different interval maps if they
have different DIExpressions which means the original intervals will not be
properly preserved.
This patch fixes the problem by using { Variable, Fragment } to filter the
DBG_VALUEs into maps, and coalesces adjacent entries iff they have the same
{ Location, DIExpression } pair.
The solution is not perfect because we see the similar issues appear when
partially overlapping fragments are encountered, but is far simpler than a
complete solution (i.e. D70121).
Fixes: pr41992, pr43957
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D74053
Louis Dionne [Tue, 11 Feb 2020 10:16:40 +0000 (11:16 +0100)]
[libc++] span: Cleanup includes
Thanks to Michael Schellenberger Costa for the patch.
Differential Revision: https://reviews.llvm.org/D72036
Raphael Isemann [Tue, 11 Feb 2020 10:12:54 +0000 (11:12 +0100)]
[lldb] Add test for lldb_private::Stream's indentation functionality
Georgii Rymar [Thu, 6 Feb 2020 11:15:59 +0000 (14:15 +0300)]
[llvm-readobj][test] - Add a test for --elf-cg-profile option.
This adds a test to document --elf-cg-profile option we have.
I am going to refactor this area, and this patch is mostly to
create a base for a follow-up change.
Differential revision: https://reviews.llvm.org/D74115
Louis Dionne [Tue, 11 Feb 2020 09:59:12 +0000 (10:59 +0100)]
[libcxx] Qualify make_move_iterator in vector::insert for input iterators
Unqualified calls to make_move_iterator in the vector::insert overload
for input iterators lead to ADL issues: https://gcc.godbolt.org/z/bmcNbh
Patch by Logan Smith.
Differential Revision: https://reviews.llvm.org/D74290
Raphael Isemann [Mon, 10 Feb 2020 12:50:29 +0000 (13:50 +0100)]
[lldb] Add test for C++ constructor calls from the expression evaluator
Jay Foad [Mon, 10 Feb 2020 14:09:34 +0000 (14:09 +0000)]
[AMDGPU] Fix non-deterministic iteration order
Summary:
As far as I know this did not affect code generation, but it did affect
the order of -debug-only=si-wqm output and the naming of autonamed
values in -print-after=si-wqm output.
Reviewers: arsenm, rampitec, nhaehnle
Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, mgrang, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74317
Haojian Wu [Tue, 11 Feb 2020 09:05:52 +0000 (10:05 +0100)]
[clang-rename] Fix the failure rename test.
We cannot run two different tests in a single lit test, split into two.
Haojian Wu [Fri, 7 Feb 2020 13:27:54 +0000 (14:27 +0100)]
[clang-rename] Fix the missing template constructors.
Summary:
When renaming a class with template constructors, we are missing the
occurrences of the template constructors, because getUSRsForDeclaration doesn't
give USRs of the templated constructors (they are not in the normal `ctors()`
method).
Reviewers: kbobyrev
Subscribers: jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D74216
Haojian Wu [Tue, 11 Feb 2020 08:27:00 +0000 (09:27 +0100)]
[clangd] Remove a FIXME which has been done, NFC.
Raphael Isemann [Tue, 11 Feb 2020 08:05:37 +0000 (09:05 +0100)]
[lldb][NFC] Remove several inefficient ConstString -> const char * -> StringRef conversions
StringRef will call strlen on the C string which is inefficient (as ConstString already
knows the string lenght and so does StringRef). This patch replaces all those calls
with GetStringRef() which doesn't recompute the length.
Raphael Isemann [Tue, 11 Feb 2020 07:19:59 +0000 (08:19 +0100)]
[lldb][NFC] Refactor TypeSystemClang::GetTypeName
John Regehr [Tue, 11 Feb 2020 07:05:16 +0000 (00:05 -0700)]
remove outdated comparison with other open-source c++ compilers
Craig Topper [Mon, 10 Feb 2020 06:48:10 +0000 (22:48 -0800)]
[X86] Custom lower ISD::FP16_TO_FP and ISD::FP_TO_FP16 on f16c targets instead of using isel patterns.
We need to use vector instructions for these operations. Previously
we handled this with isel patterns that used extra instructions
and copies to handle the the conversions.
Now we use custom lowering to emit the conversions. This allows
them to be pattern matched and optimized on their own. For
example we can now emit vpextrw to store the result if its going
directly to memory.
I've forced the upper elements to VCVTPHS2PS to zero to keep some
code similar. Zeroes will be needed for strictfp. I've added a
DAG combine for (fp16_to_fp (fp_to_fp16 X)) to avoid extra
instructions in between to be closer to the previous codegen.
This is a step towards strictfp support for f16 conversions.
Kai Luo [Tue, 11 Feb 2020 05:58:35 +0000 (13:58 +0800)]
[NFC] Fix typo.
Fangrui Song [Wed, 5 Feb 2020 04:33:41 +0000 (20:33 -0800)]
[ELF][RISCV] Add R_RISCV_IRELATIVE
https://github.com/riscv/riscv-elf-psabi-doc/pull/131 assigned 58 to R_RISCV_IRELATIVE.
Differential Revision: https://reviews.llvm.org/D74022
Johannes Doerfert [Mon, 10 Feb 2020 17:07:14 +0000 (11:07 -0600)]
[CodingStandards] Clarify C++ Standard Library usage
The existing wording leaves it unclear if C++ standard library data
structures should be preferred over custom LLVM ones, e.g., SmallVector,
even though common practice seems clear on the issue. This change makes
the wording more explicit and aligns it better with the code base.
Some motivating statistics:
```
ag SmallVector llvm/lib/ | wc
8846 40306 901421
ag 'std::vector' llvm/lib/ | wc
2123 8990 214482
ag SmallVector clang/lib/ | wc
3023 13824 281691
ag 'std::vector' clang/lib/ | wc
719 2914 72817
```
Differential Revision: https://reviews.llvm.org/D74340
Evgenii Stepanov [Tue, 11 Feb 2020 02:26:18 +0000 (18:26 -0800)]
[asan] Disable qsort interceptor on Android.
The interceptor uses thread-local variables, which (until very recently)
are emu-tls. An access to such variable may call malloc which can
deadlock the runtime library.
Yuanfang Chen [Tue, 11 Feb 2020 02:22:09 +0000 (18:22 -0800)]
Reland "[NFC][libFuzzer] Prefix TempPath with string showing the work it is doing."
With fix (somehow one hunk is missed).
Jason Molenda [Tue, 11 Feb 2020 02:16:15 +0000 (18:16 -0800)]
Only perform the login_session_has_gui_access on macOS
Michael Kruse [Tue, 11 Feb 2020 02:11:51 +0000 (20:11 -0600)]
[Polly][Docs] Fix wrong claim about optimization levels.
Thanks Justin Paston-Cooper for the report.
Yuanfang Chen [Tue, 11 Feb 2020 02:06:17 +0000 (18:06 -0800)]
Revert "[NFC][libFuzzer] Prefix TempPath with string showing the work it is doing."
This reverts commit
8a29cb4421f1196bc40c4db5298ca13df516bf19.
fuzzer-linux bot has failure because of this.
River Riddle [Tue, 11 Feb 2020 01:51:26 +0000 (17:51 -0800)]
[llvm][TableGen] Define FieldInit::isConcrete overload
Summary:
There are a few field init values that are concrete but not complete/foldable (e.g. `?`). This allows for using those values as initializers without erroring out.
Example:
```
class A {
string value = ?;
}
class B<A impl> : A {
let value = impl.value; // This currently emits an error.
let value = ?; // This doesn't emit an error.
}
```
Differential Revision: https://reviews.llvm.org/D74360
Nathan James [Tue, 11 Feb 2020 02:03:37 +0000 (02:03 +0000)]
Fix Sphinx failure on ReadabilityQualifiedAuto docs
Michael Kruse [Tue, 11 Feb 2020 00:50:51 +0000 (18:50 -0600)]
[Polly] Silence mixed signed/unsigned comparison warnings. NFC.
ISL changed some return types from unsigned to
isl_size (typedef of int), which results in such warnings.
Michael Kruse [Mon, 10 Feb 2020 20:51:33 +0000 (14:51 -0600)]
[Polly] Update ISL to
isl-0.22.1-87-gfee05a13.
The primary motivation is to fix an assertion failure in
isl_basic_map_alloc_equality:
isl_assert(ctx, room_for_con(bmap, 1), return -1);
Although the assertion does not occur anymore, I could not identify
which of ISL's commits fixed it.
Compared to the previous ISL version, Polly requires some changes for this update
* Since ISL commit
20d3574 "perform parameter alignment by modifying both arguments to function"
isl_*_gist_* and similar functions do not always align the paramter
list anymore. This caused the parameter lists in JScop files to
become out-of-sync. Since many regression tests use JScop files with
a fixed parameter list and order, we explicitly call align_params to
ensure a predictable parameter list.
* ISL changed some return types to isl_size, a typedef of (signed) int.
This caused some issues where the return type was unsigned int before:
- No overload for std::max(unsigned,isl_size)
- It cause additional 'mixed signed/unsigned comparison' warnings.
Since they do not break compilation, and sizes larger than 2^31
were never supported, I am going to fix it separately.
* With the change to isl_size, commit
57d547 "isl_*_list_size: return isl_size"
also changed the return value in case of an error from 0 to -1. This
caused undefined looping over isl_iterator since the 'end iterator'
got index -1, never reached from the 'begin iterator' with index 0.
* Some internal changes in ISL caused the number of operations to
increase when determining access ranges to determine aliasing
overlaps. In one test, this caused exceeding the default limit of
800000. The operations-limit was disabled for this test.
Peter Collingbourne [Mon, 10 Feb 2020 23:53:07 +0000 (15:53 -0800)]
scudo: Fix Android build.
Differential Revision: https://reviews.llvm.org/D74366
Yuanfang Chen [Mon, 10 Feb 2020 22:33:27 +0000 (14:33 -0800)]
[NFC][libFuzzer] Prefix TempPath with string showing the work it is doing.
Yuanfang Chen [Mon, 10 Feb 2020 22:31:47 +0000 (14:31 -0800)]
[libFuzzer] communicate through pipe to subprocess for MinimizeCrashInput
For CleanseCrashInput, discards stdout output anyway since it is not used.
These changes are to defend against aggressive PID recycle on windows to reduce the chance of contention on files.
Using pipe instead of file also workaround the problem that when the
process is spawned by llvm-lit, the aborted process keeps a handle to the
output file such that the output file can not be removed. This will
cause random test failures.
https://devblogs.microsoft.com/oldnewthing/
20110107-00/?p=11803
Reviewers: kcc, vitalybuka
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D73329
diggerlin [Tue, 11 Feb 2020 00:23:01 +0000 (19:23 -0500)]
[NFC] Refactor the tuple of symbol information with structure for llvm-objdump
SUMMARY:
refator the std::tuple<uint64_t, StringRef, uint8_t> to structor
Reviewers: daltenty
Subscribers: wuzish, nemanjai, hiraditya
Differential Revision: https://reviews.llvm.org/D74240