Age | Commit message (Collapse) | Author | Files | Lines |
|
Created using spr 1.3.4
[skip ci]
|
|
Created using spr 1.3.4
[skip ci]
|
|
This commit removes the support for lowering Vector to LLVM dialect with
typed pointers. Typed pointers have been deprecated for a while now and
it's planned to soon remove them from the LLVM dialect.
Related PSA:
https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
|
|
Replace hardcoded constants by regular expressions
|
|
These are no-op casts, which are already handled earlier.
|
|
Created using spr 1.3.4
[skip ci]
|
|
ConstantFoldCastInstruction() already has generic code to perform
lane-wise casts for vectors. There is no need to repeate it
specifically for bitcasts.
|
|
This reverts commit e9db60c05e2fb96ff40cbb1f78790abc5de9237e.
This was still failing (unexpectedly passing) on some Sony PS
buildbots.
The issue is that the clang-repl testcases don't depend on what
the default target triple is, but what the host triple is,
which is used for JIT purposes.
|
|
This commit removes the last typed pointer remnants from the MemRef to
LLVM conversions, including the transform dialect operation. Typed
pointers have been deprecated for a while now and it's planned to soon
remove them from the LLVM dialect.
Related PSA:
https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
|
|
|
|
Remove support for zext and sext constant expressions. All places
creating them have been removed beforehand, so this just removes the
APIs and uses of these constant expressions in tests.
There is some additional cleanup that can be done on top of this, e.g.
we can remove the ZExtInst vs ZExtOperator footgun.
This is part of
https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179.
|
|
The const.cpp testcase fails when running in MSVC mode, while it does
succeed in MinGW mode.
In MSVC mode, there are more constructor invocations than expected, as
the printout looks like this:
A(1), this = 0000025597930000
A(1), this = 0000025597930000
f: this = 0000025597930000, val = 1
A(1), this = 0000025597930000
f: this = 0000025597930000, val = 1
~A, this = 0000025597930000, val = 1
~A, this = 0000025597930000, val = 1
~A, this = 0000025597930000, val = 1
While the expected printout looks like this:
A(1), this = 000002C903E10000
f: this = 000002C903E10000, val = 1
f: this = 000002C903E10000, val = 1
~A, this = 000002C903E10000, val = 1
Reapplying with the XFAIL pattern expanded to include PS4/PS5
triples as well, which also seem to have the same behaviour
as MSVC.
|
|
Relative to the first attempt, this contains two changes:
First, we only handle the case where one side simplifies to true or
false, instead of calling simplification recursively. The previous
approach would return poison if one operand simplified to poison
(under the equality assumption), which is incorrect.
Second, we do not fold llvm.is.constant in simplifyWithOpReplaced().
We may be assuming that a value is constant, if the equality holds,
but it may not actually be constant. This is nominally just a QoI
issue, but the std::list implementation in libstdc++ relies on the
precise behavior in a way that causes miscompiles.
-----
and/or in logical (select) form benefit from generic simplifications via
simplifyWithOpReplaced(). However, the corresponding fold for plain
and/or currently does not exist.
Similar to selects, there are two general cases for this fold
(illustrated with `and`, but there are `or` conjugates).
The basic case is something like `(a == b) & c`, where the replacement
of a with b or b with a inside c allows it to fold to true or false.
Then the whole operation will fold to either false or `a == b`.
The second case is something like `(a != b) & c`, where the replacement
inside c allows it to fold to false. In that case, the operand can be
replaced with c, because in the case where a == b (and thus the icmp is
false), c itself will already be false.
As the test diffs show, this catches quite a lot of patterns in existing
test coverage. This also obsoletes quite a few existing special-case
and/or of icmp folds we have (e.g. simplifyAndOrOfICmpsWithLimitConst),
but I haven't removed anything as part of this patch in the interest of
risk mitigation.
Fixes #69050.
Fixes #69091.
|
|
Following PR #70792 for issue #70464
Adding test cases for issue #59493 and #54533
|
|
|
|
This reverts commit 3d54976a704327aea8de85f7b2c36172e42100d9.
This was added as a temporary courtesy to a misuse
https://android-review.googlesource.com/c/platform/ndk/+/1419436 (2020).
|
|
This commit removes typed pointers from the Func to LLVM test pass.
Typed pointers have been deprecated for a while now and it's planned to
soon remove them from the LLVM dialect.
Related PSA:
https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
|
|
Similarly to commit 3935a29, forward spec file arguments to the driver
if they appear in the compile database. Spec files can affect the
include search path.
fixes clangd/clangd#1410
|
|
llvm/include/llvm/Support/VersionTuple.h doesn't need anything from
llvm/Support/Endian.h, but llvm/lib/DebugInfo/BTF/BTFParser.cpp relies
on a transitive inclusion of llvm/Support/Endian.h.
|
|
This adds a new helper that can be called from application code to
ensure that no mutexes are held on specific code paths. This is useful
for multiple scenarios, including ensuring no locks are held:
- at thread exit
- in peformance-critical code
- when a coroutine is suspended (can cause deadlocks)
See this discourse thread for more discussion:
https://discourse.llvm.org/t/add-threadsanitizer-check-to-prevent-coroutine-suspending-while-holding-a-lock-potential-deadlock/74051
|
|
|
|
This comment was not updated when we changed from xor back to sub.
|
|
DummySyntheticFrontEnd is implementing correctly CalculateNumChildren
but not MightHaveChildren, where instead of delegating its action, it
was returning true.
This fixes that simple bug.
|
|
identifier (#71134)
`ModuleDeclState` is incorrectly changed to `NamedModuleImplementation`
for `struct module {}; void foo(module a);`. This is mostly benign but
leads to a spurious warning after #69555.
A real world example is:
```
// pybind11.h
class module_ { ... };
using module = module_;
// tensorflow
void DefineMetricsModule(pybind11::module main_module);
// `module main_module);` incorrectly changes `ModuleDeclState` to `NamedModuleImplementation`
#include <algorithm> // spurious warning
```
|
|
|
|
`'XSfvfnrclipxfqf' (FP32-to-int8 Ranged Clip Instructions)` ->
`'XSfvfnrclipxfqf' (SiFive FP32-to-int8 Ranged Clip Instructions)`
|
|
|
|
Pull request #65409 changed the brace kind heuristic to not treat a
preprocessor if directive as a in statement, however, this caused some
regressions.
If the contents of a brace don't immediately determine the brace kind,
the heuristic will look at the characters immediately before and after
the closing brace to determine the brace type.
Unfortunately, if the closing brace was preceded by a preprocessor
directive, for example `#endif`, the preceding token was `endif`, seen
as just an identifier, so the braces were understood as a braced list.
This patch fixes this behaviour by skipping all preprocessor directives
when calculating brace types. Comments were already being skipped, so
now preprocessor lines are skipped alongside comments.
Fixes https://github.com/llvm/llvm-project/issues/68404
|
|
Tested on `amd64-pc-solaris2.11`.
|
|
FP32-to-int8 Ranged Clip Instructions
https://sifive.cdn.prismic.io/sifive/0aacff47-f530-43dc-8446-5caa2260ece0_xsfvfnrclipxfqf-spec.pdf
|
|
Bfloat16 Matrix Multiply Accumulate Instruction
https://sifive.cdn.prismic.io/sifive/c391d53e-ffcf-4091-82f6-c37bf3e883ed_xsfvfwmaccqqq-spec.pdf
|
|
This patch builds on the support for vectors by adding ability to parse
scalable vectors in MIR and updates error messages to reflect that ability.
|
|
|
|
operation (#70542)
Fix the compile crash when the default result has no result for
https://github.com/llvm/llvm-project/pull/65835
Fixes https://github.com/llvm/llvm-project/issues/65120
Reviewed By: zmodem, nikic
|
|
RegBanks are constructed as global objects. Making the constructor
constexpr helps the compiler construct it without a global
constructor.
clang's optimizer seems to figure this out on its own, but at
least gcc 8 does not.
|
|
Enables having attribute that has another from same file as member.
|
|
directly. NFC (#71105)
RegBanks are allocated as global variables. The use of BitVector causes
a static global constructor to be used. The BitVector is initialized
from a table of bits that is created by tablegen. We can keep a pointer
to that data and use it as the bit vector instead.
This does require a little bit of manual indexing and reimplementation
of BitVector::count.
|
|
Previously, after the algorithm fixpointed, the state was manually
patched by emitting BDVs for EE instructions earlier, while marking some
(but not all) vector and vector<->scalar instructions as conflict. This
causes issues as not all instructions that required BDVs had them
emitted and due to after-fixpoint patching, the extra BDVs did not
propagate to their users.
This change fixes both by rewriting the logic for BDV insertion &
patching. Instead of inserting the BDV for EE earlier, it merely marks
every EE instruction as a conflict. The two phase insertion algorithm
(first insert empty instructions and patch the BDVState, then actually
connect the BDV instructions to their input bases) then ensures correct
propagation to all its users. Furthermore the shufflevector instruction
as well as all instances of IE instruction are conservatively marked as
conflicts as well, fixing the second problem.
This change does not fix the handling of constant values and vectors in
the BDV.
---------
Co-authored-by: Petr Maj <pmaj@azul.com>
|
|
Previously the kill flags of the source register were unconditionally
cleared when a `str` pair was merged, which results in suboptimal
register allocation and inhibits some renaming opportunities which may
allow further merging `str`.
|
|
This doesn't change upstream behaviour, but for downstream users it makes
sure these tests work even if the ABI compat version is modified.
|
|
RegisterBank no longer has a default constructor so there's no way to
create an invalid register bank.
Remove InvalidID and the isValid method.
Replace the one use of isValid outside of RegBank with a check that the
ID matches so there's still some check of sanity.
|
|
Adding sched_barrier, sched_group_barrier, and iglp_opt.
|
|
|
|
This removes the most obvious ones. The others are still TBD.
|
|
Usage of `r30` and `r31` has broken current traceback table's convention
on AIX. Avoid using CSRs in livein list.
|
|
PR#70386 removed hardcoded omp_lib name when checking if it is intrinsic
module procedure reference - but instead relied on bind(c) to avoid
generating error when the implementation is external to module.
However, this change only worked for HLFIR. Make it work for FIR flow
and update the test to exercise that as well.
|
|
Opaque ptr cleanup effort.
|
|
A lot of the code was from a time when we had multiple parallel levels.
The new runtime is much simpler, the code can be simplified a lot which
should speed up reductions too.
|
|
We default to < 1024 teams if the user did not specify otherwise. As
such we can avoid the extra logic in the teams reduction that handles
more than num_of_records (default 1024) teams. This is a stopgap but
still shaves of 33% of the runtime in some simple reduction examples.
|
|
This reverts commit 3e6d7c6d983dd5896e3a03857584654eb1360fda.
That commit caused miscompilation of ffmpeg's libavcodec/vp9dsp_8bpp.o
on aarch64; the file still compiles correctly, but no longer produces
the right result - see https://reviews.llvm.org/D148855#4655968
for details.
|