- Jan 16, 2024
-
-
Krzysztof Parzyszek authored
… NFC The names were ``` bool DataSharingProcessor ::needBarrier() void DataSharingProcessor ::insertBarrier() ``` It seems like clang-format treats those as references to the global namespace instead of separators in a qualified name.
-
Wang Pengcheng authored
This commit includes the necessary changes to clang and LLVM to support codegen of `RVE` and the `ilp32e`/`lp64e` ABIs. The differences between `RVE` and `RVI` are: * `RVE` reduces the integer register count to 16(x0-x16). * The ABI should be `ilp32e` for 32 bits and `lp64e` for 64 bits. `RVE` can be combined with all current standard extensions. The central changes in ilp32e/lp64e ABI, compared to ilp32/lp64 are: * Only 6 integer argument registers (rather than 8). * Only 2 callee-saved registers (rather than 12). * A Stack Alignment of 32bits (rather than 128bits). * ilp32e isn't compatible with D ISA extension. If `ilp32e` or `lp64` is used with an ISA that has any of the registers x16-x31 and f0-f31, then these registers are considered temporaries. To be compatible with the implementation of ilp32e in GCC, we don't use aligned registers to pass variadic arguments and set stack alignment\ to 4-bytes for types with length of 2*XLEN. FastCC is also supported on RVE, while GHC isn't since there is only one avaiable register. Differential Revision: https://reviews.llvm.org/D70401
-
Matthias Springer authored
This commit fixes rewrite pattern API violations: * Rewrite pattern must return "failure" if the IR was not modified. * In-place op modifications must be communicated to the rewriter (`updateRootInPlace`). This commit fixes `test/Dialect/ArmSVE/legalize-vector-storage.mlir`, `test/Dialect/ArmSME/vector-ops-to-llvm.mlir`, `test/Dialect/ArmSME/tile-allocation-invalid.mlir`, `test/Conversion/ArmSMEToLLVM/arm-sme-to-llvm.mlir`, `test/Conversion/ArmSMEToLLVM/tile-spills-and-fills.mlir`, `test/Conversion/ArmSMEToLLVM/unsupported.mlir` when running with `MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS`. --------- Co-authored-by:Benjamin Maxwell <macdue@dueutil.tech>
-
Shengchen Kan authored
We supported encoding/decoding for APX AND in #76319 This test should be added in #77564 but was missing.
-
Shengchen Kan authored
-
martinboehme authored
In various places, we would previously call `FunctionDecl::hasBody()` (which checks whether any redeclaration of the function has a body, not necessarily the one on which `hasBody()` is being called). This is bug-prone, as a recent bug in Crubit's nullability checker has shown ([fix](https://github.com/google/crubit/commit/4b01ed0f14d953cda20f92d62256e7365d206b2e), [fix for the fix](https://github.com/google/crubit/commit/e0c5d8ddd7d647da483c2ae198ff91d131c12055)). Instead, we now use `FunctionDecl::doesThisDeclarationHaveABody()` which, as the name implies, checks whether the specific redeclaration it is being called on has a body. Alternatively, I considered being more lenient and "canonicalizing" to the `FunctionDecl` that has the body if the `FunctionDecl` being passed is a different redeclaration. However, this also risks hiding bugs: A caller might inadverently perform the analysis for all redeclarations of a function and end up duplicating work without realizing it. By accepting only the redeclaration that contains the body, we prevent this. I've checked, and all clients that I'm aware of do currently pass in the redeclaration that contains the function body. Typically this is because they use the `ast_matchers::hasBody()` matcher which, unlike `FunctionDecl::hasBody()`, only matches for the redeclaration containing the body.
-
Sander de Smalen authored
These attributes were using the GNU attribute syntax, rather than the new keyword attribute syntax, and they are no longer required as we have code in SemaChecking to verify whether a builtin is compatible with its caller.
-
Dmitry Chernenkov authored
-
Hristo Hristov authored
[libc++][utility][NFC] Refactored safe integer `cmp_xxxx` functions to use the `__libcpp_is_integer` concept (#78115) Replaced a functionally identical internal concept helper. References: - https://eel.is/c++draft/utility.intcmp - https://eel.is/c++draft/basic.fundamental Co-authored-by:
Zingam <zingam@outlook.com>
-
XChy authored
Fixes #78049 This patch has done: - Ignore unreachable predecessors when looking for nearest common dominator. - Check catchswitch with `getFirstNonPHI`, instead of `getFirstInsertionPt`. The latter skips EHPad.
-
Nikita Popov authored
This reverts commit 01f4d40a. Causes test failures.
-
Sander de Smalen authored
See the specification for more details: * https://github.com/ARM-software/acle/blob/main/main/acle.md#udot-sdot-fdot-vectors * https://github.com/ARM-software/acle/blob/main/main/acle.md#udot-sdot-fdot-indexed
-
Alfie Richards authored
This avoids possible undefined behavior using the same register for Rm and Rda. Additionally adds a check in MC to produce an error upon parsing this case.
-
David Green authored
With commuted operands on the phi node, the two old incoming values could be removed in the wrong order, removing newly added operand instead of the old one.
-
Stanislav Mekhanoshin authored
-
Momchil Velikov authored
This would cause compiler errors if ISel tried to match affected instructions.
-
Paschalis Mpeis authored
Fix a crash of `replace-with-veclib` pass, when the arguments of the TLI mapping do not match the original call. Now, it simply ignores such cases. Test require assertions as it accesses programmatically the debug log. Reapplies reverted PR #77112
-
Aiden Grossman authored
This further sets things up for validation events. Having a separate abstraction for a configured event that is setup as a counter allows for much easier creation of more events in the future within a single counter group (like validation counters) without duplicating any code.
-
Piotr Zegar authored
Check now more properly add missing parentheses to code like this: 'bool bar = true ? 1 : 0 != 0;'. Closes #71867
-
Shengchen Kan authored
-
Congcong Cai authored
`UnusedUsingDeclsCheck::removeFromFoundDecls` will be called with high frequency. At current time it will check every `Context`. This patch adds a cache to reduce algorithm complexity.
-
Alexandros Lamprineas authored
This patch extends the -mcpu/mtune=native support to handle the Microsoft Azure Cobalt 100 CPU as a Neoverse N2. We expect users to use -mcpu=neoverse-n2 when targeting this CPU and all the architecture and codegen decisions to be identical. The only difference is that the Microsoft Azure Cobalt 100 has a different Implementer ID in the /proc/cpuinfo entry that needs to be detected in getHostCPUNameForARM appropriately.
-
Stephen Tozer authored
This patch adds a set of functions to the DPValue class that conveniently perform some common operations, and some that replicate existing functions on `DbgVariableIntrinsic` and its subclasses.
-
Aiden Grossman authored
This refactoring gets things ready for validation counters where the plan is to reuse the existing Counter infrastructure to contain event groups that consist of a single event that is being measured along with validation counters.
-
David Green authored
This removes the MaskedValueIsZero check in decomposing geps in BasicAA, using the isDisjoint flags instead. This relies on the disjoint flags being present when AA is ran. The alternative would be to keep the old MaskedValueIsZero check too if this causes issues.
-
elhewaty authored
Alive2: https://alive2.llvm.org/ce/z/i7zYtE Fixes: https://github.com/llvm/llvm-project/issues/71280
-
Matthias Springer authored
Add a new interface method to `BufferizableOpInterface`: `hasTensorSemantics`. This method returns "true" if the op has tensor semantics and should be bufferized. Until now, we assumed that an op has tensor semantics if it has tensor operands and/or tensor op results. However, there are ops like `ml_program.global` that do not have any results/operands but must still be bufferized (#75103). The new interface method can return "true" for such ops. This change also decouples `bufferization::bufferizeOp` a bit from the func dialect.
-
Pierre van Houtryve authored
Fixes #77055
-
Clement Courbet authored
Right now we are not triggering on: ``` for (auto [x, y] : container) { // const-only access } ``` -
Ben Shi authored
-
Haojian Wu authored
Fixes https://github.com/llvm/llvm-project/issues/51710. When transforming a constructor into a corresponding deduction guide, the decayed types (function/array type) were not handled properly which made clang fail to compile valid code. The patch teaches clang handle these decayed type in the transformation.
-
Nikita Popov authored
NameAnonGlobals is required when emitting ThinLTO bitcode, otherwise the bitcode writer will crash.
-
Matthias Springer authored
This commit fixes `Dialect/Vector/vector-rewrite-narrow-types.mlir` when running with `MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS`. ``` within split at llvm-project/mlir/test/Dialect/Vector/vector-rewrite-narrow-types.mlir:1 offset :118:8: error: 'arith.trunci' op operand type 'vector<3xi16>' and result type 'vector<3xi16>' are cast incompatible %1 = vector.bitcast %0 : vector<16xi3> to vector<3xi16> ^ within split at llvm-project/mlir/test/Dialect/Vector/vector-rewrite-narrow-types.mlir:1 offset :118:8: note: see current operation: %48 = "arith.trunci"(%47) : (vector<3xi16>) -> vector<3xi16> LLVM ERROR: IR failed to verify after pattern application ``` -
Matthias Springer authored
If a rewrite pattern returns "failure", it must not have modified the IR. This commit fixes `Dialect/Vector/vector-contract-to-outerproduct-transforms-unsupported.mlir` when running with `MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS`. ``` * Pattern (anonymous namespace)::ContractionOpToOuterProductOpLowering : 'vector.contract -> ()' { Trying to match "(anonymous namespace)::ContractionOpToOuterProductOpLowering" ** Insert : 'vector.transpose'(0x5625b3a8cb30) ** Insert : 'vector.transpose'(0x5625b3a8cbc0) "(anonymous namespace)::ContractionOpToOuterProductOpLowering" result 0 } -> failure : pattern failed to match } -> failure : pattern failed to match LLVM ERROR: pattern returned failure but IR did change ``` Note: `vector-contract-to-outerproduct-transforms-unsupported.mlir` is merged into `vector-contract-to-outerproduct-matvec-transforms.mlir`. The `greedy pattern application failed` error is not longer produced. This error indicates that the greedy pattern rewrite did not convergence; it does not mean that a pattern could not be applied. -
Matt Arsenault authored
This is the missing GISel part of 54470176
-
Matthias Springer authored
This change moves most IR verification logic (which is part of the expensive checks) into `DebugFingerPrints` and renames the struct to `ExpensiveChecks`. This isolates the debugging logic better from the remaining code. This commit also removes a redundant check: the IR is no longer verified after a failed pattern application. We already assert that the IR did not change. (We know that the IR was valid before the attempted pattern application.)
-
martinboehme authored
This saves having to assemble the set of constraints and run the SAT solver in the trivial case of `flowConditionImplies(true)` or `flowConditionAllows(false)`. This is an update / reland of my previous reverted [#77453](https://github.com/llvm/llvm-project/pull/77453). That PR contained a logic bug -- the early-out for `flowConditionAllows()` was wrong because my intuition about the logic was wrong. (In particular, note that `flowConditionImplies(F)` does not imply `flowConditionAllows(F)`, even though this may run counter to intuition.) I've now done what I should have done on the first iteration and added more tests. These pass both with and without my early-outs. This patch is a performance win on the benchmarks for the Crubit nullability checker, except for one slight regression on a relatively short benchmark: ``` name old cpu/op new cpu/op delta BM_PointerAnalysisCopyPointer 68.5µs ± 7% 67.6µs ± 4% ~ (p=0.159 n=18+19) BM_PointerAnalysisIntLoop 173µs ± 3% 162µs ± 4% -6.40% (p=0.000 n=19+20) BM_PointerAnalysisPointerLoop 307µs ± 2% 312µs ± 4% +1.56% (p=0.013 n=18+20) BM_PointerAnalysisBranch 199µs ± 4% 181µs ± 4% -8.81% (p=0.000 n=20+20) BM_PointerAnalysisLoopAndBranch 503µs ± 3% 508µs ± 2% ~ (p=0.081 n=18+19) BM_PointerAnalysisTwoLoops 304µs ± 4% 286µs ± 2% -6.04% (p=0.000 n=19+20) BM_PointerAnalysisJoinFilePath 4.78ms ± 3% 4.54ms ± 4% -4.97% (p=0.000 n=20+20) BM_PointerAnalysisCallInLoop 3.05ms ± 3% 2.90ms ± 4% -5.05% (p=0.000 n=19+20) ``` When running clang-tidy on real-world code, the results are less clear. In three runs, averaged, on an arbitrarily chosen input file, I get 11.60 s of user time without this patch and 11.40 s with it, though with considerable measurement noise (I'm seeing up to 0.2 s of variation between runs). Still, this is a very simple change, and it is a clear win in benchmarks, so I think it is worth making.
-
Christian Sigg authored
-
Christian Sigg authored
-
Alex Bradbury authored
Reordering based on the sort order of the MemOpInfo array was disabled in <https://reviews.llvm.org/D72706>. However, it's not clear this is desirable for al targets. It also makes it more difficult to compare the incremental benefit of enabling load clustering in the selectiondag scheduler as well was the machinescheduler, as the sdag scheduler does seem to allow this reordering. This patch adds a parameter that can control the behaviour on a per-target basis. Split out from #73789.
-