[z/OS] Implement shared memory handling for JIT (#89933)
Fix 'use of undeclared identifier' build errors for shm_ functions on
z/OS by implementing the functionality using shmget(), shmat(), and
shmdt(). Use the BLAKE3 hash to map the name of the shared memory to a
key.
---------
Co-authored-by: Kai Nacke <kai.peter.nacke at ibm.com>
[flang][OpenMP] Add OpenMP versions to some tests (#89295)
Some constructs used in the tests are only allowed in certain OpenMP
spec versions. Add a flag with the minimum required OpenMP version
(other than the default version) to these tests that need it.
[AArch64] Combine concat(binop, binop) into binop(concat, concat) (#89911)
This generalizes the existing combine for concat(radd, radd) to any
binops. For much the same reason as the existing code, pushing the
concat up through the tree are hopefully quicker (or the same) as the
existing two half-vector operations, and can help combine away the
concat.
[Clang] Diagnose apply AST consume actions on LLVM IR (#88602)
Fixes https://github.com/llvm/llvm-project/issues/88522
This PR introduce a new diagnostic to report apply AST consume actions
on LLVM IR.
---------
Signed-off-by: yronglin <yronglin777 at gmail.com>
[clang-format] Remove YAML hack to emit a BasedOnStyle comment (#89228)
When serializing a formatting style to YAML, we were emitting a comment
`# BasedOnStyle: <style>` if the serialized formatting style matches one
of the known styles. This is useful, but mis-uses the YAML API.
An upcoming change to fix keys with special characters by quoting them
breaks this,
and will emit a non-comment **key** `'# BasedOnStyle': <style>` instead.
(https://github.com/llvm/llvm-project/pull/88763)
Thus, remove this hack. There doesn't seem to be a specific use for it,
and it is not tested.
If we want the comment back, we should add comment support to the YAML writer,
and use that instead.
[LAA] Tests with different strides where BTC can rule out dependence.
Tests to add support for different strides with isSafeDependenceDistance
as follow-up to https://github.com/llvm/llvm-project/pull/88039.
[Clang] Fall back to DW_TAG_typedef for instantiation dependent template aliases (#90032)
Workaround for issue #89774 until it can be properly fixed.
When `-gtemplate-alias` is specified Clang emits a DW_TAG_template_alias
for template aliases. This patch avoids an assertion failure by falling
back to the `-gno-template-alias` (default) behaviour, emitting a
DW_TAG_typedef, if the alias is instantiation dependent.
[Serialization] Introduce OnDiskHashTable for specializations
Following up for https://github.com/llvm/llvm-project/pull/83108
This follows the suggestion literally from
https://github.com/llvm/llvm-project/pull/76774#issuecomment-1951172457
which introduces OnDiskHashTable for specializations based on
D41416.
Note that I didn't polish this patch to reduce the diff from D41416
to it easier to review. I'll make the polishing patch later. So that we
can focus what we're doing in this patch and focus on the style in the
next patch.
[flang][NFC] Use tablegen to create SimplifyIntrinsics constructor (#89963)
This pass runs on ModuleOp, internally walking all func::CallOps so it
shouldn't need anything special to work on other top level operations.
[flang][NFC] Use tablegen to create simplifyRegionLite constructor (#89957)
This is a ModuleOp pass anyway so it doesn't need to be run on
particular top level operations.
[NFC] [ASTUnit] [Serialization] Transalte local decl ID to global decl ID before consuming
Discovered from
https://github.com/llvm/llvm-project/commit/d86cc73bbfd9a22d9a0d498d72c9b2ee235128e9.
There is a potential issue of using DeclID in ASTUnit. ASTUnit may
record the declaration ID from ASTWriter. And after loading the
preamble, the ASTUnit may consume the recorded declaration ID directly
in ExternalASTSource. This is not good. According to the design, all
local declaration ID consumed in ASTReader need to be translated by
`ASTReader::getGlobaldeclID()`.
This will be problematic if we changed the encodings of declaration IDs or if we
make preamble to work more complexly.
[lldb][Docs] Convert platform packets doc to Markdown (#89913)
As before, script did most of the work, hand edits after that.
There's a lot more we can do dedupe this and the packets doc, this will
come in a follow up PR.
Push immediate function context while transforming lambdas in templates. (#89702)
The following program is [accepted](https://godbolt.org/z/oEc34Trh4) by
Clang, EDG, and MSVC, but rejected by Clang:
```cpp
#include <vector>
consteval auto fn() { return std::vector {1,2,3}; }
template <typename T = int>
void fn2() {
(void)[]() consteval {
for (auto e : fn()) {}
};
}
void caller() {
fn2();
}
[11 lines not shown]
[coro][pgo] Remove redundant coroutine test files (#89620)
Each of these is a copy of a test under Transforms/Coroutines/
The PGO functionality is already covered by multiple runlines (pgo and
no pgo) in the original files, so the copies add no new coverage, only
maintenance problems.
[coro] Merge two almost identical tests (#89928)
llvm/test/Transforms/Coroutines/coro-split-musttail10.ll and
coro-split-musttail11.ll were the same except for the triple.
Also add a requires clause.
[clang][dataflow] Crash fix for `widenDistinctValues()`. (#89895)
We used to crash if the previous iteration contained a `BoolValue` and
the
current iteration contained an `IntegerValue`. The accompanying test
sets up
this situation -- see comments there for details.
While I'm here, clean up the tests for integral casts to use the test
helpers we
have available now. I was looking at these tests to understand how we
handle
integral casts, and the test helpers make the tests easier to read.
[clang][dataflow] Don't propagate result objects in nested declarations. (#89903)
Trying to do so can cause crashes -- see newly added test and the
comments in
the fix.
[InstCombine] Remove redundant shift folds (NFCI) (#90016)
These are already handled by canEvaluateShifted/getShiftedValue (one-use
only), and also in reassociateShiftAmtsOfTwoSameDirectionShifts (also
multi-use), so let's at least get rid of the *third* implementation...
[lldb] Add SB API to access static constexpr member values (#89730)
The main change is the addition of a new SBTypeStaticField class,
representing a static member of a class. It can be retrieved created
through SBType::GetStaticFieldWithName. It contains several methods
(GetName, GetMangledName, etc.) whose meaning is hopefully obvious. The
most interesting method is
lldb::SBValue GetConstantValue(lldb::SBTarget)
which returns a the value of the field -- if it is a compile time
constant. The reason for that is that only constants have their values
represented in the clang AST.
For non-constants, we need to go back to the module containing that
constant, and ask retrieve the associated ValueObjectVariable. That's
easy enough if the we are still in the type system of the module
(because then the type system will contain the pointer to the module
symbol file), but it's hard when the type has been copied into another
AST (e.g. during expression evaluation). To do that we would need to
walk the ast import chain backwards to find the source TypeSystem, and I
[10 lines not shown]
[NFC] [Serialization] Avoid using DeclID directly as much as possible
This patch tries to remove all the direct use of DeclID except the real
low level reading and writing. All the use of DeclID is converted to
the use of LocalDeclID or GlobalDeclID. This is helpful to increase the
readability and type safety.
Revert "[NFC] [Serialization] Avoid using DeclID directly as much as possible"
This reverts commit 42070a5c092ed420bf92ebf38229c594885e94c7.
I forgot to touch lldb.
[RISCV] Split out VSETVLIInfo AVL states to be more explicit (#89964)
We currently use AVLIsReg to represent VLMAX as well as a dummy value
for
whenever the VL is ignored by vmv.x.s. This splits them out into
separate
states so that AVLIsReg is always a virtual register and should help
with
tracking the definition inside VSETVLIInfo directly in #89180.
This is almost an NFC but it sets the kill flag for x0 in more places.