-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang]MveEmitter:Pass Args as const references *bad rebase, please ignore* #89202
Conversation
|
@llvm/pr-subscribers-clang Author: aniplcc (aniplcc) ChangesCloses #89192 Full diff: https://github.com/llvm/llvm-project/pull/89202.diff 1 Files Affected:
diff --git a/clang/utils/TableGen/MveEmitter.cpp b/clang/utils/TableGen/MveEmitter.cpp
index 88e7b6e8546595..23c1646fa82623 100644
--- a/clang/utils/TableGen/MveEmitter.cpp
+++ b/clang/utils/TableGen/MveEmitter.cpp
@@ -660,7 +660,7 @@ class IRBuilderResult : public Result {
std::map<unsigned, std::string> IntegerArgs;
IRBuilderResult(StringRef CallPrefix, std::vector<Ptr> Args,
std::set<unsigned> AddressArgs,
- std::map<unsigned, std::string> IntegerArgs)
+ const std::map<unsigned, std::string> &IntegerArgs)
: CallPrefix(CallPrefix), Args(Args), AddressArgs(AddressArgs),
IntegerArgs(IntegerArgs) {}
void genCode(raw_ostream &OS,
@@ -728,7 +728,7 @@ class IRIntrinsicResult : public Result {
std::vector<const Type *> ParamTypes;
std::vector<Ptr> Args;
IRIntrinsicResult(StringRef IntrinsicID, std::vector<const Type *> ParamTypes,
- std::vector<Ptr> Args)
+ const std::vector<Ptr> &Args)
: IntrinsicID(std::string(IntrinsicID)), ParamTypes(ParamTypes),
Args(Args) {}
void genCode(raw_ostream &OS,
|
|
cc @RKSimon |
clang/utils/TableGen/MveEmitter.cpp
Outdated
| @@ -660,7 +660,7 @@ class IRBuilderResult : public Result { | |||
| std::map<unsigned, std::string> IntegerArgs; | |||
| IRBuilderResult(StringRef CallPrefix, std::vector<Ptr> Args, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::vector Args?
clang/utils/TableGen/MveEmitter.cpp
Outdated
| @@ -660,7 +660,7 @@ class IRBuilderResult : public Result { | |||
| std::map<unsigned, std::string> IntegerArgs; | |||
| IRBuilderResult(StringRef CallPrefix, std::vector<Ptr> Args, | |||
| std::set<unsigned> AddressArgs, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::set AddressArgs?
clang/utils/TableGen/MveEmitter.cpp
Outdated
| @@ -728,7 +728,7 @@ class IRIntrinsicResult : public Result { | |||
| std::vector<const Type *> ParamTypes; | |||
| std::vector<Ptr> Args; | |||
| IRIntrinsicResult(StringRef IntrinsicID, std::vector<const Type *> ParamTypes, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::vector<const Type *> ParamTypes?
…in OpenCL environment (llvm#89199) If there is no information about OpenCL version we are forced to generate OpenCL 1.0 by default for the OpenCL environment to avoid puzzling run-times with Unknown/0.0 version output. For a reference, LLVM-SPIRV Translator avoids potential issues with run-times in a similar manner.
…llvm#89352) For some reason, when I merged llvm#89235, two lines were mis-formatted. This patch corrects this; while I'm here, I'm also correcting other existing formatting errors.
…lized' Previously we use 'unsigned' as the type of ID in 'CreateDeserialized'. And the type of `DeclID` in serialization is 'uint32_t', so there is minor inconsistency. Also more importantly, if we want to extend the type of DeclID from uint32_t to uint64_t, we may be in trouble due to we forgot updating the a lot of 'CreateDeserialized'. So this patch tries to use semantical type 'DeclID' for '*Decl::CreateDeserialized' to make sure it is tightly consistent.
These were added in https://reviews.llvm.org/D14208, which look like they attempt to detect abs from xor+add+ashr. They do not appear to be detecting the correct value for the src input though, which I think is intended to be the sub(zext, zext) part of the pattern. We have pattens from abs now, so the old invalid patterns can be removed. Fixes llvm#88784
Introduce new subclasses of VPWidenMemoryRecipe for VP (vector-predicated) loads and stores to address multiple TODOs from llvm#76172 Note that the introduction of the new recipes also improves code-gen for VP gather/scatters by removing the redundant header mask. With the new approach, it is not sufficient to look at users of the widened canonical IV to find all uses of the header mask. In some cases, a widened IV is used instead of separately widening the canonical IV. To handle that, first collect all VPValues representing header masks (by looking at users of both the canonical IV and widened inductions that are canonical) and then checking all users (recursively) of those header masks. Depends on llvm#87411. PR: llvm#87816
Restrict the types which are valid for EmitC operations. Use what is currently supported by the emitter as restriction. Define a utility functions for valid types, such that they can be used to restrict the operations in table gen as well as being available for reuse in dialect conversions.
Solves SWDEV-449592
This patch fixes llvm#85592 (comment). I found this while fixing flag propagation in my ["vectorizer"](https://github.com/dtcxzyw/llvm-codegen-benchmark/blob/main/vectorize.cpp).
This reverts commit 74e07ab. It might be that Mask.getBitWidth() == Mask.countl_zero() (32 in my case) and zero bitwidth2 causes the crash.
…lvm#88413) Allow to fold or/and-and to BSL instuction for scalable vectors.
Need to check that at least single bit is cleared for unsigned nodes before reducing their size. Otherwise they might be treated as signed in signed nodes.
This commit extends the data layout to support scalable vectors. For scalable vectors, the `TypeSize`'s scalable field is set accordingly, and the alignment information remains the same as for normal vectors. This behavior is in sync with what LLVM's data layout queries are producing. Before this change, scalable vectors incorrectly returned the same size as "normal" vectors.
…m#88999) OpenMP 5.2: Section 5.5.5: A procedure pointer must not appear in a reduction clause. Fixes llvm#87915
…#89355) This commit introduces a flag to allow skipping the potentially recursive import of DICompositeType elements. This patch is essentially a bandaid for the still broken recursive debug type import. Some of our downstream inputs are produced by excessive usage of template meta programming, and thus contain tens of thousands of types that all participate in such recursions. Unfortunately, the series of patches that introduces type support is not easily revertible due to being around for a while now and Modular depending on it. We can consider to revert this change once the type importer has show to be very performant, but for now we are talking second vs hours to import specific files.
The implementation follows the ELF implementation.
…lvm#89183) The types we get out of expressions will not have an associated symbol file, so the current method of looking up the type will fail. Instead, I plumb the query through the TypeSystem class. This correctly finds the type in both cases (importing it into the expression AST if needed). I haven't measured, but it should also be more efficient than doing a type lookup (at least, after the type has already been found once).
…ouldExpandReduction` (llvm#88874) In the existing version, SystemZTTIImpl::shouldExpandReduction will create a `cast` error when handling vector reduction intrinsics that do not have the vector to reduce as their first operand, such as `llvm.vector.reduce.fadd` and `llvm.vector.reduce.fmul`. This commit fixes that problem by moving the cast into the case statement that handles the specific intrinsic, where the vector operand position is well-known.
This commit explicitly specifies the matching mode (C library function, any non-method function, or C++ method) for the `CallDescription`s constructed in various checkers where this transition was easy and straightforward. This change won't cause major functional changes, but isn't NFC because it ensures that e.g. call descriptions for a non-method function won't accidentally match a method that has the same name. Separate commits will perform (or have already performed) this change in other checkers. My goal is to ensure that the call description mode is always explicitly specified and eliminate (or strongly restrict) the vague "may be either a method or a simple function" mode that's the current default.
This PR adds the TPEI (Test Pending External Interruption) instruction, along with the facility that contains it. This is a millicoded system instruction that is not used for code generation, so it will be used exclusively by the Assembler and Disassembler. Accordingly, this commit also adds tests for both.
…pasta typo This was copied from vec_add_of_not_with_undef instead of vec_add_of_not_decrement - replacing the second sub with an add
… to accept UNDEF in a splat vector of -1 Make sure we use getNOT instead of reusing the allones (with undefs) vector
…69267) This patch generalizes tensor.expand_shape and memref.expand_shape to consume the output shape as a list of SSA values. This enables us to implement generic reshape operations with dynamic shapes using collapse_shape/expand_shape pairs. The output_shape input to expand_shape follows the static/dynamic representation that's also used in `tensor.extract_slice`. Differential Revision: https://reviews.llvm.org/D140821 Co-authored-by: Ramiro Leal-Cavazos <ramiroleal050@gmail.com>
…t" (llvm#89540) Reverts llvm#69267 this broke some bots.
Similar to llvm#87934, this adds costs to the shuffles in a canonical LD3/LD4 pattern, which are represented in LLVM as deinterleaving-shuffle(load). This likely has less effect at the moment than the ST3/ST4 costs as instcombine will perform certain transforms without considering the cost.
Closes #89192