Jason Molenda [Tue, 14 Apr 2020 23:51:58 +0000 (16:51 -0700)]
Bug where insn-based unwind plans on arm64 could be wrong
Fix a bug where UnwindAssemblyInstEmulation would confuse which
register is used to compute the Canonical Frame Address after it
had branched over a mid-function epilogue (where the CFA reg changes
from $fp to $sp in the process of epiloguing). Reinstate the
correct CFA register after we forward the unwind rule for branch
targets. The failure mode was that UnwindAssemblyInstEmulation
would think CFA was set in terms of $sp after one of these epilogues,
and if it sees modifications to $sp after the branch target, it would
change the CFA offset in the unwind rule -- even though the CFA is
defined in terms of $fp and the $sp changes are irrelevant to correct
calculation.
<rdar://problem/
60300528>
Differential Revision: https://reviews.llvm.org/D78077
Adam Straw [Tue, 14 Apr 2020 19:49:18 +0000 (22:49 +0300)]
[mlir] Fix assert on signed integer type in EDSC
Integer type in Std dialect is signless so we should be checking
for signless integer type instead of signed integer type in EDSC.
Differential Revision: https://reviews.llvm.org/D78144
Adrian Prantl [Tue, 14 Apr 2020 22:55:00 +0000 (15:55 -0700)]
Initiallize property getters as being property accessors (NFC)
This is a no-op because it is set later on unconditionally again, but
it's far less confusing this way and consistent with how the setters
are initialized.
David Blaikie [Tue, 14 Apr 2020 22:17:24 +0000 (15:17 -0700)]
llvm-dwarfdump: Don't try to parse a debug_loclist contribution if this CU has no DW_AT_loclists_base
llvm-dwarfdump was trying to parse debug_loclists even in the absence of
a loclists_base if there was a loclists section at all.
Hubert Tong [Tue, 14 Apr 2020 22:36:50 +0000 (18:36 -0400)]
[www] Turn 'Clang 10' boxes green in C++ status pages to reflect release
Summary:
The 'Clang 10' boxes should be green since Clang 10 has been released.
Reviewers: rsmith, aaron.ballman
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D78068
LLVM GN Syncbot [Tue, 14 Apr 2020 22:33:30 +0000 (22:33 +0000)]
[gn build] Port
ebf190fcda0
LLVM GN Syncbot [Tue, 14 Apr 2020 22:33:30 +0000 (22:33 +0000)]
[gn build] Port
8cbe371c28a
LLVM GN Syncbot [Tue, 14 Apr 2020 22:33:29 +0000 (22:33 +0000)]
[gn build] Port
204c3b55162
Eli Friedman [Tue, 7 Apr 2020 21:05:29 +0000 (14:05 -0700)]
[SelectionDAG] Always preserve offset in MachinePointerInfo
Previously, getWithOffset() would drop the offset if the base was null.
Because of this, MachineMemOperand would return the wrong result from
getAlign() in these cases. MachineMemOperand stores the alignment of
the pointer without the offset.
A bunch of MIR tests changed because we print the offset now.
Split off from D77687.
Differential Revision: https://reviews.llvm.org/D78049
Hubert Tong [Tue, 14 Apr 2020 22:24:37 +0000 (18:24 -0400)]
[llvm-objdump][Wasm][NFC] Create WasmDump.h
Summary:
Continuing from D77285, the external interfaces implemented by
`WasmDump.cpp` are now declared in `WasmDump.h` and moved into the
`llvm::objdump` namespace.
Reviewers: jhenderson, MaskRay, DiggerLin, jasonliu, daltenty
Reviewed By: jhenderson, MaskRay
Differential Revision: https://reviews.llvm.org/D77990
Ayke van Laethem [Tue, 14 Apr 2020 15:30:24 +0000 (17:30 +0200)]
[AVR] Define __ELF__
This symbol is defined in avr-gcc. Because AVR normally uses the ELF
format, define the symbol unconditionally.
This patch is needed to get Clang to compile compiler-rt.
Differential Revision: https://reviews.llvm.org/D78117
River Riddle [Tue, 14 Apr 2020 21:54:15 +0000 (14:54 -0700)]
[mlir][NFC] Remove the STLExtras.h header file now that it has been merged into LLVM.
Now that no more utilities exist within, this file can be deleted.
Differential Revision: https://reviews.llvm.org/D78079
River Riddle [Tue, 14 Apr 2020 21:53:50 +0000 (14:53 -0700)]
[llvm][ADT] Move TypeSwitch class from MLIR to LLVM
This class implements a switch-like dispatch statement for a value of 'T' using dyn_cast functionality. Each `Case<T>` takes a callable to be invoked if the root value isa<T>, the callable is invoked with the result of dyn_cast<T>() as a parameter.
Differential Revision: https://reviews.llvm.org/D78070
River Riddle [Tue, 14 Apr 2020 21:53:28 +0000 (14:53 -0700)]
[llvm][STLExtras] Move the algorithm `interleave*` methods from MLIR to LLVM
These have proved incredibly useful for interleaving values between a range w.r.t to streams. After this revision, the mlir/Support/STLExtras.h is empty. A followup revision will remove it from the tree.
Differential Revision: https://reviews.llvm.org/D78067
River Riddle [Tue, 14 Apr 2020 21:53:07 +0000 (14:53 -0700)]
[llvm][STLExtras] Move various iterator/range utilities from MLIR to LLVM
This revision moves the various range utilities present in MLIR to LLVM to enable greater reuse. This revision moves the following utilities:
* indexed_accessor_*
This is set of utility iterator/range base classes that allow for building a range class where the iterators are represented by an object+index pair.
* make_second_range
Given a range of pairs, returns a range iterating over the `second` elements.
* hasSingleElement
Returns if the given range has 1 element. size() == 1 checks end up being very common, but size() is not always O(1) (e.g., ilist). This method provides O(1) checks for those cases.
Differential Revision: https://reviews.llvm.org/D78064
River Riddle [Tue, 14 Apr 2020 21:52:52 +0000 (14:52 -0700)]
[llvm][STLExtras] Add various type_trait utilities currently present in MLIR
This revision moves several type_trait utilities from MLIR into LLVM. Namely, this revision adds:
is_detected - This matches the experimental std::is_detected
is_invocable - This matches the c++17 std::is_invocable
function_traits - A utility traits class for getting the argument and result types of a callable type
Differential Revision: https://reviews.llvm.org/D78059
River Riddle [Tue, 14 Apr 2020 21:52:42 +0000 (14:52 -0700)]
[llvm][DenseMapInfo] Add an info specialization for std::tuple
This revision adds a DenseMapInfo overload for std::tuples whose elements all have a DenseMapInfo. The implementation is similar to that of std::pair, and has been used within MLIR for over a year.
Differential Revision: https://reviews.llvm.org/D78057
Sean Silva [Tue, 14 Apr 2020 20:30:44 +0000 (13:30 -0700)]
Use index for shape.to_extent_tensor
Summary:
Also,
- add IndexTensor to OpBase.td
- fix typo in the op name. It was mistakenly `to_tensor` instead of
`to_extent_tensor`.
Differential Revision: https://reviews.llvm.org/D78149
Eli Friedman [Thu, 26 Mar 2020 17:09:13 +0000 (10:09 -0700)]
Enable new passmanager plugin support for LTO.
This should make both static and dynamic NewPM plugins work with LTO.
And as a bonus, it makes static linking of OldPM plugins more reliable
for plugins with both an OldPM and NewPM interface.
I only implemented the command-line flag to specify NewPM plugins in
llvm-lto2, to show it works. Support can be added for other tools later.
Differential Revision: https://reviews.llvm.org/D76866
Jonas Devlieghere [Tue, 14 Apr 2020 21:51:35 +0000 (14:51 -0700)]
[lldb/Test] s/lldb-repo/lldb-repro/ (NFC)
Mircea Trofin [Tue, 14 Apr 2020 19:33:49 +0000 (12:33 -0700)]
[llvm][NFC][CallSite] Remove Implementation uses of CallSite
Reviewers: dblaikie, davidxl, craig.topper
Subscribers: arsenm, dschuff, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78142
Jonas Devlieghere [Mon, 13 Apr 2020 17:23:35 +0000 (10:23 -0700)]
[lldb/Test] Use RAII for reproducer instrumentation data in unittest.
Use a RAII object to manage the lifetime of the reproducer
instrumentation data.
David Blaikie [Tue, 14 Apr 2020 21:21:33 +0000 (14:21 -0700)]
Reapply "llvm-dwarfdump: Report errors when failing to parse loclist/debug_loc entries""
Originally committed as
416fa7720e30750939c53935051c6c750dfad2c2
Reverted (due to buildbot failure - breaking lldb) in
7a45aeacf3a23449039ef2efcf476995ae1c7007.
I still can't seem to build lldb locally, but Pavel Labath has kindly
provided a potential fix to preserve the old behavior in lldb by
registering a simple recoverable error handler there that prints to the
desired stream in lldb, rather than stderr.
MaheshRavishankar [Tue, 14 Apr 2020 18:54:15 +0000 (11:54 -0700)]
[mlir][Linalg] Handle null affine map returns from inversePermutation.
The inversePermutation method returns a null map on failure. Update
uses of this method within Linalg to handle this. In LinalgToLoops the
null return value was used to emit scalar code. Modify that to return
failure, and emit scalar implementation when affine map is "empty",
i.e. 1 dims, 0 symbols and no result exprs.
Differential Revision: https://reviews.llvm.org/D77964
George Burgess IV [Tue, 14 Apr 2020 21:29:29 +0000 (14:29 -0700)]
[CodeGen] clarify a comment; NFC
Prompted by discussion on https://reviews.llvm.org/D78148.
Christopher Tetreault [Tue, 14 Apr 2020 20:46:27 +0000 (13:46 -0700)]
[SVE] Remove calls to getBitWidth from Transforms
Reviewers: efriedma, sdesmalen, spatel, eugenis, chandlerc
Reviewed By: efriedma
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77896
Juneyoung Lee [Tue, 14 Apr 2020 01:28:45 +0000 (10:28 +0900)]
[ValueTracking] Implement canCreatePoison
Summary:
This PR adds `canCreatePoison(Instruction *I)` which returns true if `I` can generate poison from non-poison
operands.
Reviewers: spatel, nikic, lebedev.ri
Reviewed By: spatel
Subscribers: hiraditya, llvm-commits, regehr, nlopes
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77890
Thomas Lively [Tue, 14 Apr 2020 02:16:20 +0000 (19:16 -0700)]
[lld][WebAssembly] Do not require --shared-memory with --relocatable
Summary:
wasm-ld requires --shared-memory to be passed when the atomics feature
is enabled because historically atomic operations were only valid with
shared memories. This change relaxes that requirement for when
building relocatable objects because their memories are not
meaningful. This technically maintains the validity of object files
because the threads spec now allows atomic operations with unshared
memories, although we don't support that elsewhere in the tools yet.
This fixes and Emscripten build issue reported at
https://bugs.chromium.org/p/webp/issues/detail?id=463.
Reviewers: sbc100
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78072
Christopher Tetreault [Tue, 14 Apr 2020 20:30:18 +0000 (13:30 -0700)]
[SVE] Remove calls to getBitWidth from IR
Reviewers: efriedma, sdesmalen, RKSimon, majnemer
Reviewed By: majnemer
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77897
Joerg Sonnenberger [Tue, 14 Apr 2020 13:13:13 +0000 (15:13 +0200)]
Emit Objective-C constructors as writable
They end up as .init_array sections and those need to be writable,
otherwise bad merging will happen.
Sjoerd Meijer [Tue, 14 Apr 2020 20:04:24 +0000 (21:04 +0100)]
NFC: update of ARM llvm regr test, follow up of
9633fc14aef7ee3da3b.
Christopher Tetreault [Tue, 14 Apr 2020 19:55:48 +0000 (12:55 -0700)]
[SVE] Remove calls to getBitWidth from clang
Reviewers: efriedma
Reviewed By: efriedma
Subscribers: tschuett, rkruppe, psnobl, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77903
Sam Clegg [Tue, 31 Mar 2020 00:37:01 +0000 (17:37 -0700)]
[WebAssembly] Emit .llvmcmd and .llvmbc as custom sections
Fixes: https://bugs.llvm.org/show_bug.cgi?id=45362
Differential Revision: https://reviews.llvm.org/D77115
Louis Dionne [Tue, 14 Apr 2020 20:20:00 +0000 (16:20 -0400)]
[libc++] run.py: Create directory hierarchy if it does not exist
This is useful when replaying tests after the fact and the directories
don't exist anymore.
Huihui Zhang [Tue, 14 Apr 2020 19:38:03 +0000 (12:38 -0700)]
[InstCombine][SVE] Fix visitGetElementPtrInst for scalable type.
Summary:
This patch fix the following issues in InstCombiner::visitGetElementPtrInst
1. Skip for scalable type if transformation requires fixed size number of
vector element.
2. Skip for scalable type if transformation relies on compile-time known type
alloc size.
3. Use VectorType::getElementCount when scalable property is used to construct
new VectorType.
4. Use TypeSize::getKnownMinSize when minimal size of a scalable type is valid to determine GEP 'inbounds'.
5. Explicitly call TypeSize::getFixedSize to avoid implicit type conversion to uint64_t.
Reviewers: sdesmalen, efriedma, spatel, ctetreau
Reviewed By: efriedma
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78081
Walter Erquinigo [Fri, 10 Apr 2020 15:23:42 +0000 (08:23 -0700)]
[lldb] Fix a typo in a test name
Summary:
Removing the Test prefix from the file name and its usages. The standard is using only Test as a suffix.
This was correctly pointed out in https://reviews.llvm.org/D77444.
Reviewers: labath, clayborg
Subscribers: mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D77878
MaheshRavishankar [Tue, 14 Apr 2020 19:13:27 +0000 (12:13 -0700)]
[mlir][Linalg] NFC: Add missing comments from earlier commit (D77965)
Differential Revision: https://reviews.llvm.org/D78140
Louis Dionne [Tue, 14 Apr 2020 19:07:38 +0000 (15:07 -0400)]
[libc++] CI: Allow pointing to specific dylib roots during backdeployment testing
This can be useful when the CI jobs don't have internet access.
Sanjay Patel [Tue, 14 Apr 2020 18:41:35 +0000 (14:41 -0400)]
[InstCombine] try to reduce more shuffles with bitcasted operand
This is the widen mask element sibling to D76844.
shuf (bitcast X), undef, Mask --> bitcast X'
http://volta.cs.utah.edu:8080/z/4dt3V8
Louis Dionne [Tue, 14 Apr 2020 16:51:39 +0000 (12:51 -0400)]
[libc++] Add .verify.cpp tests to the new format
With this patch, .verify.cpp tests explicitly require clang-verify, but
no other test types require clang-verify out of the box. This will allow
making several .fail.cpp tests that don't have any clang-verify markup
to be just .compile.fail.cpp tests, which in turn should allow removing
a long standing workaround that requires parsing tests to detect whether
they have any clang-verify markup in them.
Thomas Raoux [Mon, 13 Apr 2020 19:26:44 +0000 (12:26 -0700)]
[AntidepBreaker] Move AntiDepBreaker to include folder.
This allows AntiDepBreaker to be used in target specific postRA
scheduler.
Differential Revision: https://reviews.llvm.org/D78047
Jon Roelofs [Tue, 14 Apr 2020 16:46:21 +0000 (10:46 -0600)]
[clang] Add missing FileCheck colons
Bryan Chan [Mon, 6 Apr 2020 22:43:35 +0000 (18:43 -0400)]
[OpenMP] Sync writes to child thread's data before reduction
On systems with weak memory consistency, this patch fixes an intermittent crash
in the reduction function called by __kmp_hyper_barrier_gather, which suffers
from a race on a child thread's data.
Reviewed-By: AndreyChurbanov
Differential Revision: https://reviews.llvm.org/D77603
Kostya Kortchinsky [Mon, 13 Apr 2020 14:25:35 +0000 (07:25 -0700)]
[scudo][standalone] Split logs on Android
Summary:
The function used to log on Android will cut the message past
a certain amount of characters, which mostly materializes when
dumping the size class map on OOM.
This change splits the log message at newline boundaries.
Reviewers: pcc, cferris, hctim, eugenis
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D78018
Sourabh Singh Tomar [Sun, 12 Apr 2020 20:05:05 +0000 (01:35 +0530)]
[DWARF5]: Added support for DW_MACRO_import form in llvm-dwarfdump
GCC emits this new form along with others forms(supported in llvm-dwardump)
and since it's support was missing in llvm-dwarfdump, it was not
able to correctly dump the content a debug_macro section for GCC
generated binaries.
This patch extends llvm-dwarfdump to support this form,
now GCC generated debug_macro section can be correctly dumped
using llvm-dwarfdump.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D78006
Vince Bridgers [Tue, 7 Apr 2020 19:46:08 +0000 (14:46 -0500)]
[Fixed Point] [AST] Add an AST serialization code for fixed-point literals.
Summary:
This patch adds the EXPR_FIXEDPOINT_LITERAL AST
code to serialize FixedPointLiterals. They were previously
being serialized with the code for integer literals, which
doesn't work properly.
Reviewers: leonardchan, rjmccall
Reviewed By: leonardchan, rjmccall
Subscribers: vabridgers, JesperAntonsson, bjope, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57226
Christopher Tetreault [Tue, 14 Apr 2020 17:58:39 +0000 (10:58 -0700)]
[SVE] Remove calls to getBitWidth from Hexagon
Reviewers: efriedma, sdesmalen, kparzysz
Reviewed By: kparzysz
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77899
Alina Sbirlea [Tue, 14 Apr 2020 01:51:20 +0000 (18:51 -0700)]
[STLExtras] Make const the * operator for mapped_iterator.
Summary:
The current non-const * operator shadows the const operator in
iterator_adaptor_base.
Reviewers: mehdi_amini, rriddle!, dblaikie, timshen
Subscribers: dexonsmith, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, frgossen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78073
Sanjay Patel [Tue, 14 Apr 2020 17:38:21 +0000 (13:38 -0400)]
[InstCombine] add tests for bitcasted shuffle operand; NFC
Similar to D76844, but this is casted from wider element type.
See D77881.
Sanjay Patel [Mon, 13 Apr 2020 19:31:59 +0000 (15:31 -0400)]
[InstSimplify] add test for select that should not be simplified; NFC
See discussion in D77868
Christopher Tetreault [Tue, 14 Apr 2020 17:34:35 +0000 (10:34 -0700)]
[SVE] Remove calls to getBitWidth from ARM
Reviewers: efriedma
Reviewed By: efriedma
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77904
Isuru Fernando [Fri, 10 Apr 2020 00:44:56 +0000 (19:44 -0500)]
Fix setting Python3_ROOT_DIR on Windows
Summary:
Previously the value of Python3_ROOT_DIR was set to the string
"PYTHON_HOME" instead of the value of the variable named
PYTHON_HOME. This commit fixes that as CMake expects
a path as the value of Python3_ROOT_DIR
Reviewers: #lldb, JDevlieghere, teemperor
Reviewed By: #lldb, JDevlieghere, teemperor
Subscribers: teemperor, JDevlieghere, mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D77842
Scott Constable [Tue, 14 Apr 2020 17:32:12 +0000 (10:32 -0700)]
[X86] Add tests to clang Driver to ensure that SLH/Retpoline features are not enabled with LVI-CFI
Differential Revision: https://reviews.llvm.org/D77427
Fangrui Song [Fri, 10 Apr 2020 22:14:52 +0000 (15:14 -0700)]
[builtins] Make __umodsi3/__udivdi3/__umoddi3 standalone (shift and subtract)
@kamleshbhalui reported that when the Standard Extension M
(Multiplication and Division) is disabled for RISC-V,
`__udivdi3` will call __udivmodti4 which will in turn calls `__udivdi3`.
This patch moves __udivsi3 (shift and subtract) to int_div_impl.inc
`__udivXi3`, optimize a bit, add a `__umodXi3`, and use `__udivXi3` and
`__umodXi3` to define `__udivsi3` `__umodsi3` `__udivdi3` `__umoddi3`.
Reviewed By: kamleshbhalui
Differential Revision: https://reviews.llvm.org/D77912
Thomas Preud'homme [Tue, 14 Apr 2020 17:24:32 +0000 (18:24 +0100)]
[FileCheck] Add missing include in FileCheckImpl.h
FileCheckImpl.h internal header uses type defined in the public
FileCheck.h header but fails to include it. This commit fixes that.
Test Plan: Built it locally successfully.
Christopher Tetreault [Tue, 14 Apr 2020 17:06:23 +0000 (10:06 -0700)]
[SVE] Remove calls to getBitWidth from AArch64
Reviewers: efriedma
Reviewed By: efriedma
Subscribers: danielkiss, tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77905
Jonas Devlieghere [Tue, 14 Apr 2020 17:18:50 +0000 (10:18 -0700)]
[lldb/Reproducers] Make static methods go through the invoke wrapper.
They don't actually have to, but it makes it easier to unify the
corresponding code and macros. NFC.
Andrzej Warzynski [Wed, 8 Apr 2020 10:15:48 +0000 (11:15 +0100)]
[AArch64][SVE] Refine node definitions for ff & nf loads/stores (NFC)
Summary:
Only first-faulting and non-faulting loads read/update the FFR register
and hence only the corresponding SDNodes should be decorated with
`SDNPOptInGlue` and `SDNPOutGlue`. This patch:
* removes SDNPOptInGlue from regular loads stores (FFR is not read)
* adds SDNPOutGlue to first-faulting and non-faulting loads (FFR is
both read and updated)
Differential Revision: https://reviews.llvm.org/D77724
Eric Schweitz [Tue, 14 Apr 2020 16:50:50 +0000 (09:50 -0700)]
[flang] Upstream patch to enable the fir-ops test. bug 45487
Differential revision: https://reviews.llvm.org/D77834
Nico Weber [Tue, 14 Apr 2020 16:51:58 +0000 (12:51 -0400)]
[gn build] (manually) port
c8a5b30bac6
Jonas Devlieghere [Tue, 14 Apr 2020 15:41:50 +0000 (08:41 -0700)]
[lldb/Reproducers] Capture reproducers from the API test suite.
Make it possible to capture reproducers from the API test suite. Given
the symmetry between capture and replay, this patch also adds the
necessary code for replay. For now this is a NO-OP until the
corresponding reproducer instrumentation changes land.
For more info please refer to the RFC on lldb-dev:
http://lists.llvm.org/pipermail/lldb-dev/2020-April/016100.html
Differential revision: https://reviews.llvm.org/D77588
Sergey Dmitriev [Tue, 14 Apr 2020 16:12:34 +0000 (09:12 -0700)]
[AbstractCallSite] Check that callback callee index is within call arguments
Summary:
AbstractCallSite::getCallbackUses() does not check that callback callee index from
the callback metadata does not exceed the total number of call arguments. This patch
add such validation check.
Reviewers: jdoerfert, sstefan1
Reviewed By: jdoerfert
Subscribers: hiraditya, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78112
Louis Dionne [Tue, 14 Apr 2020 16:16:58 +0000 (12:16 -0400)]
[libc++] Remove support for .fail.mm tests
There are no such tests in the libc++ test suite, and I want to move
away from `.fail.cpp` tests (in favour of something else) too, which
require a workaround.
Benjamin Kramer [Tue, 14 Apr 2020 16:13:49 +0000 (18:13 +0200)]
[ADT] Mix the bit width into APInt's hash_value
Otherwise all zero values from i1 to i64 collide.
Sander de Smalen [Tue, 14 Apr 2020 14:56:36 +0000 (15:56 +0100)]
[SveEmitter] Add range checks for immediates and predicate patterns.
Summary:
This patch adds a mechanism to easily add range checks for a builtin's
immediate operands. This patch is tested with the qdech intrinsic, which takes
both an enum for the predicate pattern, as well as an immediate for the
multiplier.
Reviewers: efriedma, SjoerdMeijer, rovka
Reviewed By: efriedma, SjoerdMeijer
Subscribers: mgorny, tschuett, mgrang, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76678
Jonas Devlieghere [Tue, 14 Apr 2020 15:39:46 +0000 (08:39 -0700)]
[lldb/Docs] Document active and passive replay.
Document reproducer replay and its two modes.
Differential revision: https://reviews.llvm.org/D77771
Benjamin Kramer [Tue, 14 Apr 2020 14:52:26 +0000 (16:52 +0200)]
[FunctionAttrs] Don't copy all the nodes where a reference is fine.
Nemanja Ivanovic [Tue, 14 Apr 2020 15:11:13 +0000 (10:11 -0500)]
[PowerPC][NFC] Remove spurious incorrect CHECKNEXT directive from test
The directive was a typo when I first wrote the test case, then
decided to use the script and the script didn't remove the line
with the typo.
Sjoerd Meijer [Tue, 14 Apr 2020 14:38:12 +0000 (15:38 +0100)]
[LV][ARM] Add tail-folding tests for MVE. NFC.
D77635 added support to recognise primary induction variables for counting-down
loops. This allows us to fold the scalar tail loop into the main vector body,
which we need for MVE tail-predication. This adds some ARM tail-folding test
cases that we want to support.
This test was extracted from D76838, which implemented a different approach to
reverse and thus find a primary induction variable.
Sander de Smalen [Tue, 14 Apr 2020 14:31:20 +0000 (15:31 +0100)]
[SveEmitter] Fix encoding/decoding of SVETypeFlags
Summary:
This issue was introduced when reworking D75861. The bug isn't
actually hit with current unit tests because the contiguous loads/stores
infer the EltType and the MemEltType from the pointer and result, rather
than using the flags. But it will be needed for other intrinsics, such as
gather/scatter.
Reviewers: SjoerdMeijer, Andrzej
Reviewed By: SjoerdMeijer
Subscribers: andwar, tschuett, cfe-commits, llvm-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76617
Sander de Smalen [Tue, 14 Apr 2020 12:17:52 +0000 (13:17 +0100)]
[SveEmitter] Implement builtins for contiguous loads/stores
This adds builtins for all contiguous loads/stores, including
non-temporal, first-faulting and non-faulting.
Reviewers: efriedma, SjoerdMeijer
Reviewed By: SjoerdMeijer
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76238
LLVM GN Syncbot [Tue, 14 Apr 2020 14:20:02 +0000 (14:20 +0000)]
[gn build] Port
45630243562
Pierre-vh [Thu, 9 Apr 2020 08:19:23 +0000 (09:19 +0100)]
[Target][ARM] Fix VPT Block Pass miscompilation
The pass was incorrectly reverting back to a "T" when something wrote
to VPR inside a "E" block. This is not the correct behaviour, the
predicate should stay the same.
Differential Revision: https://reviews.llvm.org/D77798
Pierre-vh [Wed, 18 Mar 2020 15:23:17 +0000 (15:23 +0000)]
[Target][ARM] Adding MVE VPT Optimisation Pass
Differential Revision: https://reviews.llvm.org/D76709
Sam McCall [Mon, 13 Apr 2020 20:07:12 +0000 (22:07 +0200)]
[clangd] Add tests that no-op changes are cheap
Summary:
We want to be sure they don't cause AST rebuilds or evict items from the cache.
D77847 is going to start sending spurious no-op changes (in case the preamble
was invalidated), this is cheap enough but we shouldn't regress that in future.
Reviewers: kadircet
Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, jfb, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78048
Daniel Stone [Tue, 14 Apr 2020 04:42:50 +0000 (00:42 -0400)]
libclc: Use temporary files rather than a pipe
This is required for using the Ninja backend on Windows, as it passes
commands directly to CreateProcess, and does not allow the shell to
interpret them: https://ninja-build.org/manual.html#ref_rule_command
Using the Visual Studio backend is not possible as attempting to create
a static library target comprised entirely of novel languages not known
to the Visual Studio backend built in to CMake's C++ source will
generate nothing at all.
reviewer: jvesely
Differential Revision: https://reviews.llvm.org/D77165
Daniel Stone [Tue, 14 Apr 2020 04:41:29 +0000 (00:41 -0400)]
libclc: Don't pass linker flags to CLC/LLAsm
We don't want the regular linker flags for these invocations, since
we're not compiling to the target machine anyway. This fixes things like
'/machine:x64' being unknown when invoked under Windows.
reviewer: jvesely
Differential Revision: https://reviews.llvm.org/D77164
Daniel Stone [Tue, 14 Apr 2020 04:40:20 +0000 (00:40 -0400)]
libclc: Use echo rather than true for try_compile
When providing a fake compiler, libclc currently uses 'true' which does
not exist on Windows. Use echo instead as the no-op.
reviewer: jvesely
Differential Revision: https://reviews.llvm.org/D77163
Daniel Stone [Tue, 14 Apr 2020 04:38:22 +0000 (00:38 -0400)]
libclc: Fix LLVM library linking on Windows
CMake requires library lists on Windows to be split by semi-colons,
rather than the spaces we get from llvm-config. Fix this by a
substitution on Windows.
reviewer: jvesely
Differential Revision: https://reviews.llvm.org/D77162
Pavel Labath [Mon, 23 Mar 2020 10:40:25 +0000 (11:40 +0100)]
[DWARFDebugLine] Check for (EOF) errors when parsing v5 content descriptors
Summary:
Without that we could be silently reading zeroes, as that's the default
DataExtractor behavior. The entire parse would still most likely fail,
but it would do that with a seemingly unrelated/nonsensical error
message.
Reviewers: dblaikie, probinson, jhenderson
Subscribers: hiraditya, MaskRay, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77554
Max Kazantsev [Tue, 14 Apr 2020 13:25:31 +0000 (20:25 +0700)]
[ADCE] Fix incorrect reporting of CFG changes
This patch fixes 2 related bugs in ADCE:
- `performDeadCodeElimination` does not report changes if it did ONLY
CFG changes (affects both old and new pass managers);
- When control flow removal is enabled, new pass manager does not
drop CFG analyses.
Both can lead to incorrect loop info after ADCE that does only CFG changes.
Differential Revision: https://reviews.llvm.org/D78103
Reviewed By: Denis Antrushin
Simon Pilgrim [Tue, 14 Apr 2020 12:37:10 +0000 (13:37 +0100)]
[clang-objc-fuzzer] Add LLVMFuzzerInitialize to fix msvc builds (PR44414)
The (supposedly superfluous) LLVMFuzzerInitialize function was removed when this file was copied from clang-fuzzer, but this is causing link errors on some targets. @morehouse confirmed on D69171 that it was OK to add back.
Louis Dionne [Mon, 13 Apr 2020 21:12:30 +0000 (17:12 -0400)]
[libc++] Simplify how with_system_cxx_lib and availability features are defined
Instead of spamming a bunch of available features that are not actually
used anywhere, only set those that are actually used in the test suite.
In the future, this should probably be based on the target triple only,
with the ability to have wildcards in the triple.
Louis Dionne [Mon, 13 Apr 2020 21:28:52 +0000 (17:28 -0400)]
[libc++] NFC: Minor cleanups in config.py
Remove mentions of the ValgrindExecutor, which doesn't exist. That
executor is literally nowhere in the code base, so this is dead code
as far as we're concerned.
Also, inline a one-liner function that was called exactly once.
Simon Pilgrim [Tue, 14 Apr 2020 11:58:02 +0000 (12:58 +0100)]
[TTI][X86] Add X86TTIImpl::getScalarizationOverhead implementation.
This is a currently just a wrapper to the base type, I'll be adding ISD::BUILD_VECTOR costs in a future patch.
Med Ismail Bennani [Tue, 14 Apr 2020 11:53:26 +0000 (13:53 +0200)]
[lldb/test] Fix TestLoadUnload
Summary:
[lldb/test] Fix TestLoadUnload failure introduced in
e0dbd025131c4d77d8a5050a91d391d950529a8c
It seems that `env_cmd_string` is declared and used few lines under this
self.runCmd expression. I guess this is some left-over from an older
version.
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Reviewers: labath
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D78094
Max Kazantsev [Tue, 14 Apr 2020 11:15:16 +0000 (18:15 +0700)]
[Test] Add failing test that demonstrates buggy behavior of ADCE
ADCE messes up with loop info (proved for new pass manager only) by
making some loop blocks unreachable, without making proper updates
to the loop.
Aaron Puchert [Tue, 14 Apr 2020 11:32:43 +0000 (13:32 +0200)]
[ValueLattice] Remove unused DataLayout parameter of mergeIn, NFC
Reviewed By: fhahn, echristo
Differential Revision: https://reviews.llvm.org/D78061
Muhammad Omair Javaid [Tue, 14 Apr 2020 11:19:05 +0000 (16:19 +0500)]
[LLDB] Remove xfail aarch64-linux from test_step_over_load*
test_step_over_load_with_svr4 and test_step_over_load now pass on
aarch64 linux.
Fixed by change-id:
e0dbd025131c4d77d8a5050a91d391d950529a8c
Differential Revision: https://reviews.llvm.org/D77662
Georgii Rymar [Mon, 13 Apr 2020 11:46:41 +0000 (14:46 +0300)]
[ADT/STLExtras.h] - Add llvm::is_sorted wrapper and update callers.
It can be used to avoid passing the begin and end of a range.
This makes the code shorter and it is consistent with another
wrappers we already have.
Differential revision: https://reviews.llvm.org/D78016
Tres Popp [Tue, 7 Apr 2020 12:12:04 +0000 (14:12 +0200)]
[MLIR] Constant fold multiplies in deriveStaticUpperBound.
Summary:
This operation occurs during collapseParallelLoops, so we constant fold
them also to allow more situations of determining a loop invariant upper
bound when lowering to the GPU dialect from the Loop dialect.
Differential Revision: https://reviews.llvm.org/D77723
Haojian Wu [Fri, 3 Apr 2020 09:00:16 +0000 (11:00 +0200)]
[AST] Dont invalide VarDecl even the default initializaiton is failed.
Summary:
This patch would cause clang emit more diagnostics, but it is much better than https://reviews.llvm.org/D76831
```cpp
struct A {
A(int);
~A() = delete;
};
void k() {
A a;
}
```
before the patch:
/tmp/t3.cpp:24:5: error: no matching constructor for initialization of 'A'
A a;
^
/tmp/t3.cpp:20:3: note: candidate constructor not viable: requires 1 argument, but 0 were provided
A(int);
^
/tmp/t3.cpp:19:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
struct A {
After the patch:
/tmp/t3.cpp:24:5: error: no matching constructor for initialization of 'A'
A a;
^
/tmp/t3.cpp:20:3: note: candidate constructor not viable: requires 1 argument, but 0 were provided
A(int);
^
/tmp/t3.cpp:19:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
struct A {
^
/tmp/t3.cpp:24:5: error: attempt to use a deleted function
A a;
^
/tmp/t3.cpp:21:3: note: '~A' has been explicitly marked deleted here
~A() = delete;
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77395
Florian Hahn [Tue, 14 Apr 2020 10:15:20 +0000 (11:15 +0100)]
Recommit "[SCCP] Use SimplifyBinOp for non-integer constant/expressions & overdef."
This includes a fix reported with simplifications in the presence of
NaN.
This reverts the revert commit
06408451bf12d4baed1fb1312d8af6e6bbb6a797.
Tyker [Tue, 14 Apr 2020 09:57:19 +0000 (11:57 +0200)]
[AssumeBundles] preserve knowledge in DCE
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77403
Tyker [Tue, 14 Apr 2020 09:56:56 +0000 (11:56 +0200)]
[AssumeBundles] preserve knowledge in DSE
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77404
Tyker [Tue, 14 Apr 2020 09:56:38 +0000 (11:56 +0200)]
[AssumeBundles] preserve information in NewGVN
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: Prazek, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77406
Tyker [Tue, 14 Apr 2020 09:56:16 +0000 (11:56 +0200)]
[AssumeBundles] preserve information in LICM
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: hiraditya, asbirlea, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77407
Tyker [Tue, 14 Apr 2020 09:55:56 +0000 (11:55 +0200)]
[AssumeBundles] adapte GVN to assume bundles
Summary:
prevent GVN from removing assume bundles
make GVN preserve information from removed instructions
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77405
Balázs Kéri [Tue, 14 Apr 2020 09:14:17 +0000 (11:14 +0200)]
[Analyzer][StreamChecker] Added evaluation of fseek.
Summary:
Function `fseek` is now evaluated with setting error return value
and error flags.
Reviewers: Szelethus, NoQ, xazax.hun, rnkovacs, dcoughlin, baloghadamsoftware, martong
Reviewed By: Szelethus
Subscribers: ASDenysPetrov, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75851
Georgii Rymar [Tue, 14 Apr 2020 10:20:51 +0000 (13:20 +0300)]
[LLD][ELF][Test] - Fixed the broken test case.
There was no ":" after "SEC", hence the check was
disabled. Found with the use of D78024.