- Mar 01, 2024
-
-
Timm Bäder authored
We manage the Result through EvaluationResult now.
-
Timm Bäder authored
This shouldn't be a problem in general, but we used to have some sanity checks that prevented it from working. Remove those and only do them on the non-recursive calls instead.
-
zhijian lin authored
enable `--demangle` option for the xcoff object file for llvm-readobj
-
Nikolas Klauser authored
The values for `__has_cpp_attribute` don't have to be guarded behind `LangOpts.CPlusPlus` because `__has_cpp_attribute` isn't available if Clang isn't in a C++ mode. Fixes #82995
-
Martin Wehking authored
Use RegOp directly inside debug code to silence a static analyzer that warns about accessing it through its ArrayRef wrapper.
-
Shengchen Kan authored
-
Alfie Richards authored
This changes the type of `PredicationCode` and `VPTPredicationCode` from `unsigned` to `ARMCC::CondCodes` and `ARMVCC::VPTCodes` resp' for clarity and correctness.
-
Pierre van Houtryve authored
Use IR analysis to infer when an addrspacecast operand is nonnull, then lower it to an intrinsic that the DAG can use to skip the null check. I did this using an intrinsic as it's non-intrusive. An alternative would have been to allow something like `!nonnull` on `addrspacecast` then lower that to a custom opcode (or add an operand to the addrspacecast MIR/DAG opcodes), but it's a lot of boilerplate for just one target's use case IMO. I'm hoping that when we switch to GISel that we can move all this logic to the MIR level without losing info, but currently the DAG doesn't see enough so we need to act in CGP. Fixes: SWDEV-316445
-
Alexey Bataev authored
When do the analysis for the (potential) masked gather node, we check that not greater than half of the pointer operands are loop invariants or potentially vectorizable. Need to check actually, that we have a loop at first and do better check for the potentially vectorizable pointers. Reviewers: RKSimon Reviewed By: RKSimon Pull Request: https://github.com/llvm/llvm-project/pull/83472
-
Marius Brehler authored
This adds operations for bitwise operators. Furthermore, an UnaryOp class and a helper to print unary operations are introduced.
-
Alexey Bataev authored
If the buildvector node contains extract, which later should be combined with some other nodes by shuffling, need to estimate the cost of this shuffle before building the mask after shuffle. Reviewers: RKSimon Reviewed By: RKSimon Pull Request: https://github.com/llvm/llvm-project/pull/83442
-
David Green authored
These were last used in the fcopysign lowering, which now uses AArch64ISD::BSP.
-
Alexandros Lamprineas authored
Fixes the `sanitizer-x86_64-linux-android` buildbot.
-
David CARLIER authored
-
David Green authored
This come from https://discourse.llvm.org/t/combining-aes-and-xor-can-be-improved-further/77248. These instructions start out with: ``` XOR Vd, Vn <some complicated math> ``` The initial XOR means that they can be treated as commutative, removing some of the unnecessary mov's introduced during register allocation.
-
Martin Storsjö authored
This testcase fails on MinGW targets, because when compiling the main() function, it gets an implicit call to __main(), which is missing in this context.
-
Tom Eccles authored
In #83253 @matthias-springer pointed out that LowerHLFIRIntrinsics.cpp should not be using rewrite patterns with the dialect conversion driver. The intention of this pass is to lower HLFIR intrinsic operations into FIR so it conceptually fits dialect conversion. However, dialect conversion is much stricter about changing types when replacing operations. This pass sometimes looses track of array bounds, resulting in replacements with operations with different but compatible types (expressions of the same rank and element types but with or without compile time known array bounds). This is difficult to accommodate with the dialect conversion driver and so I have changed to use the greedy pattern rewriter. There is a lot of test churn because the greedy pattern rewriter also performs canonicalization.
-
Jay Foad authored
This just renames a tablegen argument to match the corresponding subtarget feature.
-
Pavel Iliin authored
The patch fixes https://github.com/llvm/llvm-project/issues/83407 modifing __builtin_cpu_supports behaviour so that it returns false if unsupported features names provided in parameter and issue a warning. __builtin_cpu_supports is target independent, but currently supported by X86, AArch64 and PowerPC only.
-
Benjamin Maxwell authored
This will now print the value of `vector.vscale` as `%vscale` in IR dumps which makes it easier to spot where things are scalable. One test that depended on the value names has also been fixed.
-
Sergei Barannikov authored
At some point in the past, optional operands have become allowed in the middle of an instruction. However, `checkAsmTiedOperandConstrains` hasn't been modified to support this. This patch adds the support by pulling operand offsets counting out of `convertToMCInst` and reusing it in `checkAsmTiedOperandConstrains`.
-
Simon Pilgrim authored
-
David Spickett authored
See https://github.com/llvm/llvm-project/issues/22648 for why we don't use it on Windows. Any pexpect tests are skipped there.
-
Jie Fu authored
llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp:886:26: error: lambda capture 'TI' is not used [-Werror,-Wunused-lambda-capture] 886 | llvm::sort(Features, [&TI](const StringRef LHS, const StringRef RHS) { | ~^~ 1 error generated. -
Nikita Popov authored
This can no longer return a bitcast, but the function type in FunctionCallee may differ from the function type of the function.
-
David CARLIER authored
shuffling the order of its includes.
-
Timm Bäder authored
-
Alexandros Lamprineas authored
This decouples feature priorities from name mangling. Doing so will prevent ABI breakages in case we change the feature priorities. Formalized in ACLE here: https://github.com/ARM-software/acle/pull/303.
-
Pravin Jagtap authored
Authored-by:Pravin Jagtap <Pravin.Jagtap@amd.com>
-
chuongg3 authored
Reverts llvm/llvm-project#83038 due to failing build in Fuchsia build https://lab.llvm.org/staging/#/builders/187/builds/1695
-
Nick Anderson authored
fixes #68087 Not sure where to put regression tests for this pr? Also, should i1 args not in reg also be promoted?
-
Timm Bäder authored
NFC but makes the backtrace easier to read in case the expression somehow ends up being null.
-
martinboehme authored
This fixes a crash introduced by https://github.com/llvm/llvm-project/pull/82348 but also adds additional handling to make sure that we treat empty initializer lists for both unions and structs/classes correctly (see tests added in this patch).
-
Shengchen Kan authored
The base register of OPmi_ND may be allocated to the same physic register as the ND operand. OPmi_ND is not compressible b/c it has different semnatic from OPmi. In this case, `isRedundantNewDataDest` should return false, otherwise we would get error Assertion `!IsNDLike && "Missing entry for ND-like instruction"' failed.
-
Dhruv Chawla (work) authored
GISel was currently falling back to SDAG for these functions, and this matches the way SDAG currently generates code for these functions.
-
David CARLIER authored
mostly interested in the first half of the type, adding also compile time check.
-
Balázs Kéri authored
If a stream operation fails the position can become "indeterminate". This may cause warning from the checker at a later operation. The new note tag shows the place where the position becomes "indeterminate", this is where a failure occurred.
-
Matthias Gehre authored
Due to buildbot failure https://lab.llvm.org/buildbot/#/builders/88/builds/72130 This reverts commit dca32a3b.
-
Matthias Gehre authored
From https://reviews.llvm.org/D153245 This adds support for native PDL (and PDLL) C++ constraints to return results. This is useful for situations where a pattern checks for certain constraints of multiple interdependent attributes and computes a new attribute value based on them. Currently, for such an example it is required to escape to C++ during matching to perform the check and after a successful match again escape to native C++ to perform the computation during the rewriting part of the pattern. With this work we can do the computation in C++ during matching and use the result in the rewriting part of the pattern. Effectively this enables a choice in the trade-off of memory consumption during matching vs recomputation of values. This is an example of a situation where this is useful: We have two operations with certain attributes that have interdependent constraints. For instance `attr_foo: one_of [0, 2, 4, 8], attr_bar: one_of [0, 2, 4, 8]` and `attr_foo == attr_bar`. The pattern should only match if all conditions are true. The new operation should be created with a new attribute which is computed from the two matched attributes e.g. `attr_baz = attr_foo * attr_bar`. For the check we already escape to native C++ and have all values at hand so it makes sense to directly compute the new attribute value as well: ``` Constraint checkAndCompute(attr0: Attr, attr1: Attr) -> Attr; Pattern example with benefit(1) { let foo = op<test.foo>() {attr = attr_foo : Attr}; let bar = op<test.bar>(foo) {attr = attr_bar : Attr}; let attr_baz = checkAndCompute(attr_foo, attr_bar); rewrite bar with { let baz = op<test.baz> {attr=attr_baz}; replace bar with baz; }; } ``` To achieve this the following notable changes were necessary: PDLL: - Remove check in PDLL parser that prevented native constraints from returning results PDL: - Change PDL definition of pdl.apply_native_constraint to allow variadic results PDL_interp: - Change PDL_interp definition of pdl_interp.apply_constraint to allow variadic results PDLToPDLInterp Pass: The input to the pass is an arbitrary number of PDL patterns. The pass collects the predicates that are required to match all of the pdl patterns and establishes an ordering that allows creation of a single efficient matcher function to match all of them. Values that are matched and possibly used in the rewriting part of a pattern are represented as positions. This allows fusion and thus reusing a single position for multiple matching patterns. Accordingly, we introduce ConstraintPosition, which records the type and index of the result of the constraint. The problem is for the corresponding value to be used in the rewriting part of a pattern it has to be an input to the pdl_interp.record_match operation, which is generated early during the pass such that its surrounding block can be referred to by branching operations. In consequence the value has to be materialized after the original pdl.apply_native_constraint has been deleted but before we get the chance to generate the corresponding pdl_interp.apply_constraint operation. We solve this by emitting a placeholder value when a ConstraintPosition is evaluated. These placeholder values (due to fusion there may be multiple for one constraint result) are replaced later when the actual pdl_interp.apply_constraint operation is created. Changes since the phabricator review: - Addressed all comments - In particular, removed registerConstraintFunctionWithResults and instead changed registerConstraintFunction so that contraint functions always have results (empty by default) - Thus we don't need to reuse `rewriteFunctions` to store constraint functions with results anymore, and can instead use `constraintFunctions` - Perform a stable sort of ConstraintQuestion, so that ConstraintQuestion appear before other ConstraintQuestion that use their results. - Don't create placeholders for pdl_interp::ApplyConstraintOp. Instead generate the `pdl_interp::ApplyConstraintOp` before generating the successor block. - Fixed a test failure in the pdl python bindings Original code by @martin-luecke Co-authored-by:
martin-luecke <martinpaul.luecke@amd.com>
-
Douglas Yung authored
-