Louis Dionne [Mon, 9 May 2022 17:31:42 +0000 (13:31 -0400)]
[libc++abi] Reword uncaught exception termination message
When we terminate due to an exception being uncaught, libc++abi prints
a message saying "terminating with uncaught exception [...]". This patch
changes that to say "terminating due to uncaught exception [...]" instead,
which is a bit clearer. Indeed, I've seen some people being confused and
thinking that libc++abi was the component throwing the exception.
Differential Revision: https://reviews.llvm.org/D125245
Nikita Popov [Tue, 10 May 2022 13:10:28 +0000 (15:10 +0200)]
[SCEVExpander] Remove handling for mixed int/pointer min/max (NFCI)
Mixed int/pointer min/max are no longer possible.
Alexey Bataev [Tue, 10 May 2022 12:51:14 +0000 (05:51 -0700)]
[SLP][NFC]Add a test for improved shuffles in buildvector sequences,
NFC.
Nikita Popov [Tue, 10 May 2022 12:50:50 +0000 (14:50 +0200)]
[IndVarSimplify] Regenerate test checks (NFC)
Nicolai Hähnle [Thu, 28 Apr 2022 21:27:57 +0000 (16:27 -0500)]
GlobalISel: Trivial documentation and comment fixes
Differential Revision: https://reviews.llvm.org/D124808
Rosie Sumpter [Tue, 3 May 2022 09:58:09 +0000 (10:58 +0100)]
[Sema][SVE2] Move/simplify Sema testing for SVE2 ACLE builtins
Currently for SVE2 ACLE builtins, single tests are used to verify both
clang code generation (when the feature is available) and semantic
error/warning messages (when the feature is unavailable). This
patch moves the semantic testing for the target feature flag into
dedicated Sema tests.
Differential Revision: https://reviews.llvm.org/D124850
Rosie Sumpter [Tue, 3 May 2022 09:39:41 +0000 (10:39 +0100)]
[Sema][SVE] Move/simplify Sema testing for SVE ACLE builtins
Currently for SVE ACLE builtins, single tests are used to verify both
clang code generation (when the feature is available) and semantic
error/warning messages (when the feature is unavailable). This
patch moves the semantic testing into dedicated Sema tests.
Differential Revision: https://reviews.llvm.org/D124924
Haojian Wu [Sun, 8 May 2022 20:14:27 +0000 (22:14 +0200)]
[pseudo] Add benchmarks for pseudoparser.
Running on SemaDecl.cpp with the cxx.bnf grammar:
```
--------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------
runParseBNFGrammar 649389 ns 649365 ns 1013
runBuildLR
34591903 ns
34591380 ns 20
runPreprocessTokens
11418744 ns
11418703 ns 61 bytes_per_second=63.8971M/s
runGLRParse
282996863 ns
282988726 ns 2 bytes_per_second=2.57827M/s
runParseOverall
294969719 ns
294951870 ns 2 bytes_per_second=2.4737M/s
```
Differential Revision: https://reviews.llvm.org/D125226
Adrian Kuegel [Tue, 10 May 2022 10:58:01 +0000 (12:58 +0200)]
[mlir] Remove unused using declaration (NFC)
Fraser Cormack [Tue, 10 May 2022 09:54:12 +0000 (10:54 +0100)]
[RISCV][NFC] Remove else after continue
Nikita Popov [Tue, 10 May 2022 10:17:09 +0000 (12:17 +0200)]
[LoopVectorize] Remove incorrect nuw flag from test (NFC)
nuw does not make sense for reverse iteration.
Nikita Popov [Tue, 10 May 2022 09:46:22 +0000 (11:46 +0200)]
[InstSimplify] Handle unknown function context in pointer icmp fold (PR54615)
This issue reproduces in the context of LoopDeletion, because the
bitcast does not get simplified away there. For a plain -inst-simplify
run the bitcast would get folded away first.
Fixes https://github.com/llvm/llvm-project/issues/54615.
Chuanqi Xu [Tue, 10 May 2022 09:24:24 +0000 (17:24 +0800)]
[NFC] [Coroutines] Remove EnableReuseStorageInFrame option
The EnableReuseStorageInFrame option is designed for testing only.
But it is better to use *_PASS_WITH_PARAMS macro to keep consistent with
other passes.
Nikita Popov [Tue, 10 May 2022 09:24:02 +0000 (11:24 +0200)]
[InstCombine] Handle GEP scalar/vector base mismatch (PR55363)
30a12f3f6322399185fdceffe176152a58bb84ae switched the type check
to use the GEP result type rather than the GEP operand type.
However, the GEP result types may match even if the operand types
don't, in case GEPs with scalar/vector base and vector index
are compared.
Fixes https://github.com/llvm/llvm-project/issues/55363.
Lian Wang [Tue, 10 May 2022 09:20:56 +0000 (09:20 +0000)]
Revert "[RISCV][SelectionDAG] Support VECREDUCE_ADD mask operation"
This patch make CodeGen/test/AArch64/vecreduce-add-legalization.ll fail.
This reverts commit
17a8a1bb7126a7c1b0bc629d9299f2e5ae6db3f1.
Gabor Marton [Tue, 10 May 2022 09:17:59 +0000 (11:17 +0200)]
[analyzer] Attempt to fix test infeasible-crash.c
Lian Wang [Mon, 9 May 2022 06:18:34 +0000 (06:18 +0000)]
[RISCV][SelectionDAG] Support VECREDUCE_ADD mask operation
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D125206
Lian Wang [Tue, 10 May 2022 08:07:46 +0000 (08:07 +0000)]
[RISCV] Add more tests for vector reduce mask operations
Reviewed By: frasercrmck
Differential Revision: https://reviews.llvm.org/D125216
Nikita Popov [Fri, 22 Apr 2022 08:19:54 +0000 (10:19 +0200)]
[fuzzer] Reduce size of large.test
This halves the size of LargeTest, dropping time to compile this
file locally from 14s to 5.5s. Hopefully this will also fix the
persistent timeouts in pre-merge checks.
Differential Revision: https://reviews.llvm.org/D124237
Nikita Popov [Mon, 9 May 2022 14:47:27 +0000 (16:47 +0200)]
[MLIR] Split off MLIRExecutionEngineUtils to fix libMLIR.so build (PR54242)
Building libMLIR.so currently fails with:
> /usr/bin/ld: /tmp/ccNzulEA.ltrans39.ltrans.o: in function `(anonymous namespace)::SerializeToHsacoPass::optimizeLlvm(llvm::Module&, llvm::TargetMachine&)':
> /builddir/build/BUILD/llvm-project-15.0.0.src/mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp:328: undefined reference to `mlir::makeOptimizingTransformer(unsigned int, unsigned int, llvm::TargetMachine*)'
This is because MLIRGPUTransforms depends on MLIRExecutionEngine in
https://github.com/llvm/llvm-project/blob/
61bb2e4ea82fc5499a271d70d4537383d1942208/mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp#L328,
but MLIRExecutionEngine is marked as excluded from libMLIR.so.
However, this code doesn't require the full execution engine: It
only performs middle-end optimization, and does not need any of
the JIT/codegen infrastructure. As such, split off a separate
library MLIRExecutionEngineUtils, which only contains that part
and is not excluded from libMLIR.so.
Fixes https://github.com/llvm/llvm-project/issues/54242.
Differential Revision: https://reviews.llvm.org/D125214
Gabor Marton [Mon, 2 May 2022 11:32:28 +0000 (13:32 +0200)]
[analyzer] Replace adjacent assumeInBound calls to assumeInBoundDual
This is to minimize superfluous assume calls.
Depends on D124758
Differential Revision: https://reviews.llvm.org/D124761
Gabor Marton [Fri, 6 May 2022 14:20:25 +0000 (16:20 +0200)]
[analyzer] Implement assume in terms of assumeDual
Summary:
By evaluating both children states, now we are capable of discovering
infeasible parent states. In this patch, `assume` is implemented in the terms
of `assumeDuali`. This might be suboptimal (e.g. where there are adjacent
assume(true) and assume(false) calls, next patches addresses that). This patch
fixes a real CRASH.
Fixes https://github.com/llvm/llvm-project/issues/54272
Differential Revision:
https://reviews.llvm.org/D124758
Gabor Marton [Tue, 3 May 2022 10:11:49 +0000 (12:11 +0200)]
[analyzer] Indicate if a parent state is infeasible
In some cases a parent State is already infeasible, but we recognize
this only if an additonal constraint is added. This patch is the first
of a series to address this issue. In this patch `assumeDual` is changed
to clone the parent State but with an `Infeasible` flag set, and this
infeasible-parent is returned both for the true and false case. Then
when we add a new transition in the exploded graph and the destination
is marked as infeasible, the node will be a sink node.
Related bug:
https://github.com/llvm/llvm-project/issues/50883
Actually, this patch does not solve that bug in the solver, rather with
this patch we can handle the general parent-infeasible cases.
Next step would be to change the State API and require all checkers to
use the `assume*Dual` API and deprecate the simple `assume` calls.
Hopefully, the next patch will introduce `assumeInBoundDual` and will
solve the CRASH we have here:
https://github.com/llvm/llvm-project/issues/54272
Differential Revision: https://reviews.llvm.org/D124674
Nikita Popov [Tue, 10 May 2022 08:01:24 +0000 (10:01 +0200)]
[Docs] Clarify CLANG_ENABLE_OPAQUE_POINTERS behavior (NFC)
While it originally did, this option no longer affects the cc1
interface. For the cc1 interface, -no-opaque-pointers has to be
passed, there is no cmake option.
Martin Storsjö [Tue, 10 May 2022 07:22:39 +0000 (10:22 +0300)]
[libcxxabi] [cmake] Fix a mismatched variable name
The variable name checked didn't match the one set on the line above.
This error was introduced in
b3df14b6c98702ce50401fd039852787373e4676.
Max Kazantsev [Tue, 10 May 2022 06:21:10 +0000 (13:21 +0700)]
Return "[Test] One more test to prevent crash in SLP vectorizer"
Looks like this test exposes some non-determinism and fails with
auth-generated checks. Recommited with sole check it didn't crash.
Will investigate why it happens.
Max Kazantsev [Tue, 10 May 2022 06:20:57 +0000 (13:20 +0700)]
Revert "[Test] One more test to prevent crash in SLP vectorizer"
This reverts commit
1daf35f47cb13ae3c257873203a52f7c48856eef.
Max Kazantsev [Tue, 10 May 2022 06:09:17 +0000 (13:09 +0700)]
[Test] One more test to prevent crash in SLP vectorizer
Make sure "[SLP]Further improvement of the cost model for scalars used in buildvectors."
does not come back until it's fixed.
Walter Erquinigo [Tue, 10 May 2022 05:46:34 +0000 (22:46 -0700)]
Revert "[NFC][lldb][trace] Use uint64_t when decoding and enconding json"
This reverts commit
9d2dd6d7622335ba9c19b55ac7d463cf662cab0d.
Reverting because this exposes an issue in the uint64_t json parser.
Chuanqi Xu [Tue, 10 May 2022 03:48:30 +0000 (11:48 +0800)]
[Coroutines] Use PassManager instead of Legacy PassManager internally
This is a following cleanup for the previous work D123918. I missed
serveral places which still use legacy pass managers. This patch tries
to remove them.
Shraiysh Vaishay [Tue, 10 May 2022 04:46:06 +0000 (10:16 +0530)]
[flang][OpenMP] Lowering for task construct
This patch adds lowering for task construct from Fortran to
`omp.task` operation in OpenMPDialect Dialect (mlir). Also added tests
for the same.
Reviewed By: kiranchandramohan, peixin
Differential Revision: https://reviews.llvm.org/D124138
Walter Erquinigo [Tue, 10 May 2022 04:44:09 +0000 (21:44 -0700)]
[NFC][lldb][trace] Use uint64_t when decoding and enconding json
llvm's json parser supports uint64_t, so let's better use it for the
packets being sent between lldb and lldb-server instead of using int64_t
as an intermediate type, which might be error-prone.
Craig Topper [Tue, 10 May 2022 04:37:23 +0000 (21:37 -0700)]
[IR][CostModel] A scalable vector shuffle can't be an identity or reverse shuffle.
Even if the minimum number of elements is 1 and the length doesn't change,
we don't know what vscale is so we can't classify it as identity mask. Instead it
is a zero element splat.
For reverse, we shouldn't classify it as a reverse unless there are at least 2 elements
in the mask. This applies to both fixed and scalable vectors. For fixed vectors, a single
element would be an identity shuffle. For scalable vector it's a zero elt splat.
Reviewed By: sdesmalen, liaolucy
Differential Revision: https://reviews.llvm.org/D124655
Walter Erquinigo [Tue, 10 May 2022 04:27:23 +0000 (21:27 -0700)]
[lldb] Fix
7b73de9ec2b19df040c919d3004dfbead9b6ac59
It turns out that the issue in
https://lab.llvm.org/buildbot/#/builders/17/builds/21754 is that a
size_t is attempted to be used interchangeably with uint64_t.
Greg McGary [Tue, 10 May 2022 03:41:08 +0000 (20:41 -0700)]
[ELF] Move InputSectionBase::rawData member [NFC]
Walter Erquinigo [Tue, 10 May 2022 04:12:09 +0000 (21:12 -0700)]
[lldb] Fix
7b73de9ec2b19df040c919d3004dfbead9b6ac59
It turns out that the issue in
https://lab.llvm.org/buildbot/#/builders/17/builds/21754 is that a
size_t is attempted to be used interchangeably with uint64_t.
Walter Erquinigo [Tue, 10 May 2022 04:01:05 +0000 (21:01 -0700)]
[lldb] Fix
7b73de9ec2b19df040c919d3004dfbead9b6ac59
This commit causes
https://lab.llvm.org/buildbot/#/builders/17/builds/21743 to fail
seemingly because of bad handling of the PERF_ATTR_SIZE_VER5 symbol.
This patch tries to handle better the absence of this symbol.
Andrew Litteken [Sun, 1 May 2022 23:06:21 +0000 (18:06 -0500)]
[IRSim] Remove early check from similarity matching such that commutative instructions are checked correctly when using the same value.
When the first commutative instruction in a region using the same value in both positions was compared to a corresponding instruction with two different values, there was an early check that determined that since the values were new, it was true that these values acted in the same way structurally. If this was not contradicted later in the program, the regions were marked as similar. This removes that check, so that it is clear that the same value cannot be mapped to two different values.
Reviewer: paquette
Differential Revision: https://reviews.llvm.org/D124775
Stella Stamenova [Tue, 10 May 2022 02:46:47 +0000 (19:46 -0700)]
[mlir] Fix python bindings build on Windows in Debug
Currently, building mlir with the python bindings enabled on Windows in Debug is broken because pybind11, python and cmake don't like to play together. This change normalizes how the three interact, so that the builds can now run and succeed.
The main issue is that python and cmake both make assumptions about which libraries are needed in a Windows build based on the flavor.
- cmake assumes that a debug (or a debug-like) flavor of the build will always require pythonX_d.lib and provides no option/hint to tell it to use a different library. cmake does find both the debug and release versions, but then uses the debug library.
- python (specifically pyconfig.h and by extension python.h) hardcodes the dependency on pythonX_d.lib or pythonX.lib depending on whether `_DEBUG` is defined. This is NOT transparent - it does not show up anywhere in the build logs until the link step fails with `pythonX_d.lib is missing` (or `pythonX.lib is missing`)
- pybind11 tries to "fix" this by implementing a workaround - unless Py_DEBUG is defined, `_DEBUG` is explicitly undefined right before including python headers. This also requires some windows headers to be included differently, so while clever, this is a non-trivial workaround.
mlir itself includes the pybind11 headers (which contain the workaround) AS WELL AS python.h, essentially always requiring both pythonX.lib and pythonX_d.lib for linking. cmake explicitly only adds one or the other, so the build fails.
This change does a couple of things:
- In the cmake files, explicitly add the release version of the python library on Windows builds regardless of flavor. Since Py_DEBUG is not defined, pybind11 will always require release and it will be satisfied
- To satisfy python as well, this change removes any explicit inclusions of Python.h on Windows instead relying on the fact that pybind11 headers will bring in what is needed
There are a few additional things that we could do but I rejected as unnecessary at this time:
- define Py_DEBUG based on the CMAKE_BUILD_TYPE - this will *mostly* work, we'd have to think through multiconfig generators like VS, but it's possible. There doesn't seem to be a need to link against debug python at the moment, so I chose not to overcomplicate the build and always default to release
- similar to above, but define Py_DEBUG based on the CMAKE_BUILD_TYPE *as well as* the presence of the debug python library (`Python3_LIBRARY_DEBUG`). Similar to above, this seems unnecessary right now. I think it's slightly better than above because most people don't actually have the debug version of python installed, so this would prevent breaks in that case.
- similar to the two above, but add a cmake variable to control the logic
- implement the pybind11 workaround directly in mlir (specifically in Interop.h) so that Python.h can still be included directly. This seems prone to error and a pain to maintain in lock step with pybind11
- reorganize how the pybind11 headers are included and place at least one of them in Interop.h directly, so that the header has all of its dependencies included as was the original intention. I decided against this because it really doesn't need pybind11 logic and it's always included after pybind11 is, so we don't necessarily need the python includes
Reviewed By: stellaraccident
Differential Revision: https://reviews.llvm.org/D125284
Sheng [Tue, 10 May 2022 02:30:39 +0000 (10:30 +0800)]
[NFC] Modify the comment to reflect the changes in decoder
Ben Shi [Tue, 10 May 2022 02:16:45 +0000 (02:16 +0000)]
[clang][Driver] Add more tests for riscv
Reviewed By: benshi001
Differential Revision: https://reviews.llvm.org/D125157
Ben Shi [Tue, 10 May 2022 02:15:13 +0000 (02:15 +0000)]
[RISCV][NFC] Add 'rv32izvfh' invalid arch test
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D125210
Peter Klausler [Wed, 4 May 2022 19:50:03 +0000 (12:50 -0700)]
[flang] Allow ENTRY function result symbol usage before the ENTRY
In a function, ENTRY E without an explicit RESULT() creates a
function result entity also named E that is storage associated with
the enclosing function's result. f18 was emitting an incorrect error
message if that function result E was referenced without any
declaration prior to its ENTRY statement when it should have been
implicitly declared instead.
Differential Revision: https://reviews.llvm.org/D125144
Chuanqi Xu [Tue, 10 May 2022 02:00:35 +0000 (10:00 +0800)]
[NFC] follow up code cleanup after D123837
Reviewed By: iains
Differential Revision: https://reviews.llvm.org/D124149
Peter Klausler [Wed, 4 May 2022 21:10:18 +0000 (14:10 -0700)]
[flang] Accept POINTER followed by INTERFACE
As is already supported for dummy procedures, we need to also accept
declarations of procedure pointers that consist of a POINTER attribute
statement followed by an INTERFACE block. (The case of an INTERFACE
block followed by a POINTER statement already works.)
While cleaning this case up, adjust the utility predicate IsProcedurePointer()
to recognize it (namely a SubprogramDetails symbol with Attr::POINTER)
and delete IsProcName(). Extend tests, and add better comments to
symbol.h to document the two ways in which procedure pointers are
represented.
Differential Revision: https://reviews.llvm.org/D125139
LLVM GN Syncbot [Tue, 10 May 2022 01:06:44 +0000 (01:06 +0000)]
[gn build] Port
059e03476cbb
Douglas Yung [Tue, 10 May 2022 01:00:53 +0000 (18:00 -0700)]
Add x86 to REQUIRES line in test as suggested in https://reviews.llvm.org/D124105.
Mircea Trofin [Wed, 27 Apr 2022 21:19:14 +0000 (14:19 -0700)]
[mlgo] Support exposing more features than those supported by models
This allows the compiler to support more features than those supported by a
model. The only requirement (development mode only) is that the new
features must be appended at the end of the list of features requested
from the model. The support is transparent to compiler code: for
unsupported features, we provide a valid buffer to copy their values;
it's just that this buffer is disconnected from the model, so insofar
as the model is concerned (AOT or development mode), these features don't
exist. The buffers are allocated at setup - meaning, at steady state,
there is no extra allocation (maintaining the current invariant). These
buffers has 2 roles: one, keep the compiler code simple. Second, allow
logging their values in development mode. The latter allows retraining
a model supporting the larger feature set starting from traces produced
with the old model.
For release mode (AOT-ed models), this decouples compiler evolution from
model evolution, which we want in scenarios where the toolchain is
frequently rebuilt and redeployed: we can first deploy the new features,
and continue working with the older model, until a new model is made
available, which can then be picked up the next time the compiler is built.
Differential Revision: https://reviews.llvm.org/D124565
Peter Klausler [Tue, 3 May 2022 20:57:14 +0000 (13:57 -0700)]
[flang] Reverse a reversed type compatibility check
The semantic test for an intrinsic assignment to a polymorphic
derived type entity from a type that is an extension of its base
type was reversed, so it would allow assignments that it shouldn't
and disallowed some that it should; and the test case for it
incorectly assumed that the invalid semantics were correct.
Fix the code and the test, and add a new test for the invalid
case (LHS type is an extension of the RHS type).
Differential Revision: https://reviews.llvm.org/D125135
Peter Klausler [Tue, 3 May 2022 20:17:50 +0000 (13:17 -0700)]
[flang] Refine error checking in specification expressions
The rules in the Fortran standard for specification expressions
are full of special cases and exceptions, and semantics didn't get
them exactly right. It is valid to refer to an INTENT(OUT) dummy
argument in a specification expression in the context of a
specification inquiry function like SIZE(); it is not valid to
reference an OPTIONAL dummy argument outside of the context of
PRESENT. This patch makes the specification expression checker
a little context-sensitive about whether it's examining an actual
argument of a specification inquiry intrinsic function or not.
Differential Revision: https://reviews.llvm.org/D125131
Peter Klausler [Tue, 3 May 2022 18:24:10 +0000 (11:24 -0700)]
[flang] Allow implicit declaration of DATA objects in inner procedures
DATA statements in inner procedures were not treating undeclared objects
as implicitly declared variables if the DATA statement appeared in a
specification part; they were treated as host-associated symbols instead.
This was incorrect. Fix DATA statement name resolution to always treat
DATA as if it had appeared in the executable part.
Differential Revision: https://reviews.llvm.org/D125129
Carl Ritson [Tue, 10 May 2022 00:02:36 +0000 (09:02 +0900)]
[AMDGPU] Pre-commit test for D124981. NFC.
Carl Ritson [Mon, 9 May 2022 23:52:31 +0000 (08:52 +0900)]
[AMDGPU] Generate checks in llvm.amdgcn.softwqm.ll
Peter Klausler [Tue, 3 May 2022 17:10:11 +0000 (10:10 -0700)]
[flang] Allow NULL() actual argument for optional dummy procedure
A disassociated procedure pointer is allowed to be passed as an absent
actual argument that corresponds to an optional dummy procedure,
but not NULL(); accept that case as well.
Differential Revision: https://reviews.llvm.org/D125127
Peter Klausler [Tue, 3 May 2022 16:54:29 +0000 (09:54 -0700)]
[flang] Allow PDTs with LEN parameters in REDUCE()
The type compatibility checks for the ARRAY= argument and the dummy
arguments and result of the OPERATION= argument to the REDUCE intrinsic
function need to allow for parameterized data types with LEN parameters.
(Their values are required to be identical but this is not a numbered
constraint requiring a compilation time check).
Differential Revision: https://reviews.llvm.org/D125124
Amaury Séchet [Sat, 7 May 2022 00:25:03 +0000 (00:25 +0000)]
[AArch64] Remove ADDC, ADDE, SUBC, SUBE support, use the CARRY ops instead
This cleans up tech debt. Similar to D33390 .
Reviewed By: Kmeakin
Differential Revision: https://reviews.llvm.org/D125150
Peter Klausler [Tue, 3 May 2022 16:28:04 +0000 (09:28 -0700)]
[flang] Correct actual/dummy procedure compatibility for ALLOCATABLE/POINTER functions
Functions returning ALLOCATABLE or POINTER arrays have descriptor inquiries in
their results' shape expressions that won't compare equal. These functions
need only be checked for compatible ranks (& of course other characteristics).
Differential Revision: https://reviews.llvm.org/D125123
Peter Klausler [Mon, 2 May 2022 23:56:20 +0000 (16:56 -0700)]
[flang] Fix to UnwrapConvertedExpr()
The utility UnwrapConvertedExpr() was failing to unwrap a
converted TypeParamInquiry operation when called from runtime
derived type description table construction, leading to an
abort in semantics.
Differential Revision: https://reviews.llvm.org/D125119
Michael Kruse [Mon, 9 May 2022 23:19:18 +0000 (18:19 -0500)]
[polly] Fix type in function name. NFC.
Peter Klausler [Mon, 2 May 2022 20:55:29 +0000 (13:55 -0700)]
[flang] Ensure that structure constructors fold parameter references
Structure contructors for instances of parameterized derived types
must have their components' values folded in the context of the values
of the type parameters.
Differential Revision: https://reviews.llvm.org/D125116
Greg Clayton [Mon, 9 May 2022 18:48:18 +0000 (11:48 -0700)]
Add the ability to debug through an exec into ld
A previous commit enabled LLDB to be able to debug a program launched via ld: https://reviews.llvm.org/D108061.
This commit adds the ability to debug a program launched via ld when it happens during an exec into the dynamic loader. There was an issue where after the exec we would locate the rendezvous structure right away but it didn't contain any valid values and we would try to set the dyanamic loader breakpoint at address zero. This patch fixes that and adds a test.
Differential Revision: https://reviews.llvm.org/D125253
LLVM GN Syncbot [Mon, 9 May 2022 23:05:57 +0000 (23:05 +0000)]
[gn build] Port
7b73de9ec2b1
Walter Erquinigo [Fri, 29 Apr 2022 00:11:57 +0000 (17:11 -0700)]
[trace][intelpt] Support system-wide tracing [3] - Refactor IntelPTThreadTrace
I'm refactoring IntelPTThreadTrace into IntelPTSingleBufferTrace so that it can
both single threads or single cores. In this diff I'm basically renaming the
class, moving it to its own file, and removing all the pieces that are not used
along with some basic cleanup.
Differential Revision: https://reviews.llvm.org/D124648
Walter Erquinigo [Thu, 28 Apr 2022 21:00:44 +0000 (14:00 -0700)]
[trace][intelpt] Support system-wide tracing [2] - Add a dummy --per-core-tracing option
This updates the documentation of the gdb-remote protocol, as well as the help messages, to include the new --per-core-tracing option.
Differential Revision: https://reviews.llvm.org/D124640
Mathieu Fehr [Mon, 9 May 2022 22:37:13 +0000 (15:37 -0700)]
[mlir][doc] Move documentation of extensible dialects
Merge the documentation of the definition of extensible dialects
with the definition of dialects.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D125200
Peter Klausler [Sat, 30 Apr 2022 16:14:07 +0000 (09:14 -0700)]
[flang] Refine handling of short character actual arguments
Actual arguments whose lengths are less than the expected length
of their corresponding dummy argument are errors; but this needs
to be refined. Short actual arguments that are variables remain
errors, but those that are expressions can be (again) extended on
the right with blanks.
Differential Revision: https://reviews.llvm.org/D125115
Nico Weber [Mon, 9 May 2022 22:24:59 +0000 (18:24 -0400)]
[gn build] (manually) port
a2f2dfde48ac (clang-fuzzer-dictionary)
River Riddle [Tue, 3 May 2022 23:11:28 +0000 (16:11 -0700)]
[mlir-LSP] Ensure existing documents are process synchronously
This prevents races where we accidentally launched multiple servers.
Peter Klausler [Sat, 30 Apr 2022 15:32:50 +0000 (08:32 -0700)]
[flang] Correct folding of SPREAD() for higher ranks
The construction of the dimension order vector used to populate the
result array was incorrect, leading to a scrambled-looking result
for rank-3 and higher results. Fix, and extend tests.
Differential Revision: https://reviews.llvm.org/D125113
Hongtao Yu [Mon, 9 May 2022 18:10:25 +0000 (11:10 -0700)]
[Inliner] Preserve !prof metadata when converting call to invoke.
When a callee function is inlined via an invoke instruction, every function call inside the callee, if not an invoke, will be converted to an invoke after cloned to the caller body. I found that during the conversion the !prof metadata was dropped. This in turned caused a cloned indirect call not properly promoted in subsequent passes.
The particular scenario I was investigating was with AutoFDO and thinLTO. In prelink, no ICP was triggered (neither by the sample loader nor PGO ICP), no indirect call was promoted. This is because 1) the particular indirect call did not have inlined samples; and 2) PGO ICP was intentionally disabled. After inlining, the prof metadata was dropped. Then in postlink, PGO ICP jumped in but didn't do anything. Thus the opportunity was missed.
I'm making a simple fix to preserve !prof metadata when converting call to invoke.
Reviewed By: davidxl
Differential Revision: https://reviews.llvm.org/D125249
Peter Klausler [Fri, 29 Apr 2022 23:16:41 +0000 (16:16 -0700)]
[flang] Operands of SIGN() need not have same kind
The standard requires that the operands of the intrinsic function
SIGN() must have the same type (INTEGER or REAL), but they are not
required to have the same kind.
Differential Revision: https://reviews.llvm.org/D125105
Florian Mayer [Fri, 6 May 2022 23:13:58 +0000 (16:13 -0700)]
[HWASan] deflake hwasan_symbolize test
Also enable on X86_64.
The directory would change during the test execution. This should not
necessarily prevent us from indexing a directory (a user might
potentially do that if they specify a parent directory of the actual
symbols directory, and change unrelated files).
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/D125143
Michael Kruse [Mon, 9 May 2022 21:05:03 +0000 (16:05 -0500)]
[polly] Load NPM pass plugin for NPM test.
This fixes the polly-*-plugin buildbots.
Peter Klausler [Fri, 29 Apr 2022 22:34:42 +0000 (15:34 -0700)]
[flang] Fold intrinsic functions SPACING() and RRSPACING()
The related real number system inquiry functions SPACING()
and RRSPACING() can be folded for constant arguments.
See 16.9.164 & 16.9.180 in Fortran 2018.
Differential Revision: https://reviews.llvm.org/D125100
Alexey Bataev [Mon, 9 May 2022 20:36:09 +0000 (13:36 -0700)]
Revert "[SLP]Further improvement of the cost model for scalars used in buildvectors."
This reverts commit
99f31acfce338417fea3c14983d6f8fedc8ed043 and several
others to fix detected crashes, reported in https://reviews.llvm.org/D115750
Peter Klausler [Fri, 29 Apr 2022 15:57:51 +0000 (08:57 -0700)]
[flang] Fold intrinsic inquiry functions SAME_TYPE_AS() and EXTENDS_TYPE_OF()
When the result can be known at compilation time, fold it.
Success depends on whether the operands are polymorphic.
When neither one is polymorphic, the result is known and can
be either .TRUE. or .FALSE.; when either one is polymorphic,
a .FALSE. result still can be discerned.
Differential Revision: https://reviews.llvm.org/D125062
Alexey Bataev [Mon, 9 May 2022 20:06:30 +0000 (13:06 -0700)]
[SLP]Adjust assertion check for scalars in several insertelements.
If the same scalar is inserted several times into the same buildvector,
the mask index can be used already. In this case need to check, that
this scalar is already part of the vectorized buildvector.
Peter Klausler [Thu, 28 Apr 2022 23:54:40 +0000 (16:54 -0700)]
[flang][runtime] BACKSPACE after non-advancing I/O
A BACKSPACE statement on a unit after a READ or WRITE with ADVANCE="NO"
must reset the position to the beginning of the record, not to the
beginning of the previous one.
Differential Revision: https://reviews.llvm.org/D125057
Peter Klausler [Thu, 28 Apr 2022 23:30:46 +0000 (16:30 -0700)]
[flang][runtime] (G0) for CHARACTER means (A), not (A0)
I'm emitting zero characters for (G0) formatting of CHARACTER values
instead of using their lengths to determine the output field width.
Differential Revision: https://reviews.llvm.org/D125056
Peter Klausler [Thu, 28 Apr 2022 21:23:31 +0000 (14:23 -0700)]
[flang][runtime] Enforce restrictions on unlimited format repetition
A repeated format item group with an unlimited ('*') repetition count
can appear only as the last item at the top level of a format; it can't
be nested in more parentheses and it can't be followed by anything
else.
Differential Revision: https://reviews.llvm.org/D125054
Peter Klausler [Wed, 27 Apr 2022 20:28:59 +0000 (13:28 -0700)]
[flang][runtime] Don't pad CHARACTER input at end of record unless PAD='YES'
When formatted CHARACTER input runs into the end of an input record,
the runtime usually fills the remainder of the variable with spaces,
but this should be conditional, and not done when PAD='NO'.
And while here, add some better comments to two members of connection.h
to make their non-obvious relationship more clear.
Differential Revision: https://reviews.llvm.org/D125053
Peter Klausler [Tue, 26 Apr 2022 23:49:29 +0000 (16:49 -0700)]
[flang][runtime] Fix input of NAN(...) on non-fast path
The closing parenthesis needs to be consumed when a NaN
with parenthesized (ignored) information is read on the
real input path that preprocesses input characters before
passing them to the decimal-to-binary converter.
Differential Revision: https://reviews.llvm.org/D125048
Thomas Raoux [Mon, 9 May 2022 15:46:28 +0000 (15:46 +0000)]
[mlir][nvvm] Add attribute to nvvm.cpAsyncOp to control l1 bypass
Add attribute to be able to generate the intrinsic version of async copy
generating a copy with l1 bypass. This correspond to
cp.async.cg.shared.global in ptx.
Differential Revision: https://reviews.llvm.org/D125241
Florian Hahn [Mon, 9 May 2022 19:33:14 +0000 (20:33 +0100)]
Revert "Recommit "[VPlan] Remove uneeded needsVectorIV check.""
This reverts commit
8b48223447311af8b3022697dd58858e1ce6975f.
This triggers an assertion on a test case mentioned in D123720.
Revert while I investigate.
Michael Kruse [Mon, 9 May 2022 18:59:49 +0000 (13:59 -0500)]
[polly] Fix compiler warning. NFC.
Fix the warning
warning: 'polly::ScopViewer' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
and for several other classes by inserting virtual destructors.
Michael Kruse [Mon, 9 May 2022 18:38:20 +0000 (13:38 -0500)]
[polly] migrate -polly-show to the new pass manager
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D123678
Michael Kruse [Mon, 9 May 2022 18:38:16 +0000 (13:38 -0500)]
[PassManager] Implement DOTGraphTraitsViewer under NPM
Rename the legacy `DOTGraphTraits{Module,}{Viewer,Printer}` to the corresponding `DOTGraphTraits...WrapperPass`, and implement a new `DOTGraphTraitsViewer` with new pass manager.
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D123677
Chris Bieneman [Thu, 14 Apr 2022 18:41:57 +0000 (13:41 -0500)]
Modify DXILPrepare to emit no-op bitcasts
In supporting opaque pointers we need to re-materialize typed pointers
in bitcode emission. Because of how the value-enumerator pre-allocates
types and instructions we need to insert some no-op bitcasts in the
places that we'll need bitcasts for the pointer types.
Reviewed By: kuhar
Differential Revision: https://reviews.llvm.org/D122269
Clemens Wasser [Mon, 9 May 2022 17:58:53 +0000 (10:58 -0700)]
Make lsan TestCases more consistent
Inlining `LSAN_BASE` makes the lsan TestCases more consistent to the other sanitizer TestCases.
It is also needed on Windows: https://reviews.llvm.org/D115103
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D124322
Stella Stamenova [Mon, 9 May 2022 18:10:17 +0000 (11:10 -0700)]
[mlir] Fix build & test of mlir python bindings on Windows
There are a couple of issues with the python bindings on Windows:
- `create_symlink` requires special permissions on Windows - using `copy_if_different` instead allows the build to complete and then be usable
- the path to the `python_executable` is likely to contain spaces if python is installed in Program Files. llvm's python substitution adds extra quotes in order to account for this case, but mlir's own python substitution does not
- the location of the shared libraries is different on windows
- if the type is not specified for numpy arrays, they appear to be treated as strings
I've implemented the smallest possible changes for each of these in the patch, but I would actually prefer a slightly more comprehensive fix for the python_executable and the shared libraries.
For the python substitution, I think it makes sense to leverage the existing %python instead of adding %PYTHON and instead add a new variable for the case when preloading is needed. This would also make it clearer which tests are which and should be skipped on platforms where the preloading won't work.
For the shared libraries, I think it would make sense to pass the correct path and extension (possibly even the names) to the python script since these are known by lit and don't have to be hardcoded in the test at all.
Reviewed By: stellaraccident
Differential Revision: https://reviews.llvm.org/D125122
Pavel Labath [Mon, 9 May 2022 18:04:14 +0000 (20:04 +0200)]
[lldb/test] Remove superfluous -std=c++11 from tests
We default to that anyway. It does not work on windows, and since
ac7747e, the flag actually takes effect.
Pavel Labath [Mon, 9 May 2022 17:24:57 +0000 (19:24 +0200)]
[lldb/test] Append CXXFLAGS_EXTRAS last in Makefile.rules
This matches what we do with CFLAGS, and it started to matter
8abfa5119ad, which added some -std=-apending code.
Kazu Hirata [Mon, 9 May 2022 17:17:00 +0000 (10:17 -0700)]
[CodeGen] Clarify the semantics of ADDCARRY/SUBCARRY
This patch clarifies the semantics of ADDCARRY/SUBCARRY, specifically
stating that both the incoming and outgoing carries are active high.
Differential Revision: https://reviews.llvm.org/D125130
Kai Nacke [Mon, 9 May 2022 13:53:28 +0000 (09:53 -0400)]
[SystemZ] Fix argument type of tdc instruction.
The DAG node for the Test Data Class is defined using i64 as the second parameter.
However, the code to lower is_fpclass uses `i32` as type. This only works because no
type check is generated in the DAG matcher.
This PR changes the type of the mask constant to `i64`.
Reviewed By: uweigand
Differential Revision: https://reviews.llvm.org/D125230
Arthur Eubanks [Mon, 9 May 2022 00:22:11 +0000 (17:22 -0700)]
[opt] Error on `opt -O# --foo-pass`
Matches the error message we emit with `-opt -O# --passes=foo`.
Otherwise we crash later on.
Makes #55320 much less confusing.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D125196
Alexey Bataev [Fri, 22 Apr 2022 18:14:41 +0000 (11:14 -0700)]
[SLP]Try partial store vectorization if supported by target.
We can try to vectorize number of stores less than MinVecRegSize
/ scalar_value_size, if it is allowed by target. Gives an extra
opportunity for the vectorization.
Fixes PR54985.
Differential Revision: https://reviews.llvm.org/D124284
Anastasia Stulova [Mon, 9 May 2022 16:39:03 +0000 (17:39 +0100)]
[Docs] Added my office hours.
Jakub Tucholski [Mon, 2 May 2022 17:55:36 +0000 (13:55 -0400)]
[mlir] Refactoring dialect and test code to use parseCommaSeparatedList
Issue #55173
Reviewed By: lattner, rriddle
Differential Revision: https://reviews.llvm.org/D124791
Sam McCall [Sat, 7 May 2022 13:10:51 +0000 (15:10 +0200)]
[clang-fuzzer] Add a tiny tool to generate a fuzzing dictionary for clang
It should be useful clang-fuzzer itself, though my own motivation is
to use this in fuzzing clang-pseudo. (clang-tools-extra/pseudo/fuzzer).
Differential Revision: https://reviews.llvm.org/D125166
Erich Keane [Mon, 9 May 2022 16:04:17 +0000 (09:04 -0700)]
Revert ""Re-apply
4b6c2cd642 "Deferred Concept Instantiation Implementation"""""
This reverts commit
a425cac31e2e4cee8e14b7b9a99c8ba17c1ebb52.
There is another libc++ test, that this time causes us to hit an
assertion. Reverting, likely for a while this time.