- May 05, 2024
-
-
Phoebe Wang authored
-
Younan Zhang authored
This patch revolves around the misuse of UnresolvedLookupExpr in BuildTemplateIdExpr. Basically, we build up an UnresolvedLookupExpr not only for function overloads but for "unresolved" templates wherever we need an expression for template decls. For example, a dependent VarTemplateDecl can be wrapped with such an expression before template instantiation. (See https://github.com/llvm/llvm-project/commit/617007240cbfb97c8ccf6d61b0c4ca0bb62d43c9) Also, one important thing is that UnresolvedLookupExpr uses a "canonical" QualType to describe the containing unresolved decls: a DependentTy is for dependent expressions and an OverloadTy otherwise. Therefore, this modeling for non-dependent templates leaves a problem in that the expression is marked and perceived as if describing overload functions. The consumer then expects functions for every such expression, although the fact is the reverse. Hence, we run into crashes. As to the patch, I added a new canonical type "UnresolvedTemplateTy" to model these cases. Given that we have been using this model (intentionally or accidentally) and it is pretty baked in throughout the code, I think extending the role of UnresolvedLookupExpr is reasonable. Further, I added some diagnostics for the direct occurrence of these expressions, which are supposed to be ill-formed. As a bonus, this patch also fixes some typos in the diagnostics and creates RecoveryExprs rather than nothing in the hope of a better error-recovery for clangd. Fixes https://github.com/llvm/llvm-project/issues/88832 Fixes https://github.com/llvm/llvm-project/issues/63243 Fixes https://github.com/llvm/llvm-project/issues/48673 -
superZWT123 authored
1. Bitwise operations are used to access HwMode, allowing for the coexistence of HwMode IDs for different features (such as RegInfo and EncodingInfo). This will provide better scalability for HwMode. Currently, most users utilize HwMode primarily for configuring Register-related information, and few use it for configuring Encoding. The limited scalability of HwMode has been a significant factor in this usage pattern. 2. Sink the HwMode Encodings selection logic down to per instruction level, this makes the logic for choosing encodings clearer and provides better error messages. 3. Add some HwMode ID conflict detection to the getHwMode() interface.
-
Fangrui Song authored
-
Fangrui Song authored
-
Fangrui Song authored
-
Fangrui Song authored
Also replace aarch64-none-linux-gnu (none can indicate an OS as well) with aarch64
-
Fangrui Song authored
And replace -emit-llvm -o - with -emit-llvm-only
-
Kazu Hirata authored
This patch fixes: llvm-project/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp:1715:28: error: unused variable 'kPadToMultipleOfKeyword' [-Werror,-Wunused-const-variable]
-
srcarroll authored
This patch modifies the definition of `PadOp` to take transform params and handles for the `pad_to_multiple_of` operand. --------- Co-authored-by:Oleksandr "Alex" Zinenko <ftynse@gmail.com>
-
Fangrui Song authored
after https://reviews.llvm.org/D83788 Fix #91090
-
Fangrui Song authored
-
Tom Stellard authored
This updates the release-binaries workflow so that the different build stages are split across multiple jobs. This saves money by reducing the time spent on the larger github runners and also makes it easier to debug, because now it's possible to build a smaller release package (with clang and lld) using only the free GitHub runners. The workflow no longer uses the test-release.sh script but instead uses the Release.cmake cache. This gives the workflow more flexibility and ensures that the binary package will always be created even if the tests fail. This idea to split the stages comes from the "LLVM Precommit CI through Github Actions" RFC: https://discourse.llvm.org/t/rfc-llvm-precommit-ci-through-github-actions/76456
-
Markus Böck authored
Both the attribute and type format generator and the op format generator independently implemented the parsing and verification of the `ref` and `qualified` directives with little to no differences. This PR moves the implementation of these into the common `FormatParser` class to deduplicate the implementations.
-
Florian Hahn authored
Code checking stores to invariant addresses and reductions made an incorrect assumption that the case of both a load & store to the same invariant address does not need to be handled. In some cases when vectorizing with runtime checks, there may be dependences with a load and store to the same address, storing a reduction value. Update LAA to separately track if there was a store-store and a load-store dependence with an invariant addresses. Bail out early if there as a load-store dependence with invariant address. If there was a store-store one, still apply the logic checking if they all store a reduction.
-
Kazu Hirata authored
I'm planning to remove StringRef::equals in favor of StringRef::operator==. - StringRef::operator==/!= outnumber StringRef::equals by a factor of 31 under llvm/ in terms of their usage. - The elimination of StringRef::equals brings StringRef closer to std::string_view, which has operator== but not equals. - S == "foo" is more readable than S.equals("foo"), especially for !Long.Expression.equals("str") vs Long.Expression != "str". -
Kareem Ergawy authored
-
Alexey Bataev authored
-
David Blaikie authored
Revert "llvm/lib/CodeGen/TargetSchedule.cpp:132:12: warning: Assert statement modifies 'NIter'" (#91079) Reverts llvm/llvm-project#90982 NIter was only declared in !NDEBUG, and only used for assertions - so it was correct that it was incremented inside the assertion. (& in fact now the non-asserts build fails, because the variable is incremented even though it isn't declared)
-
akshaykumars614 authored
Modified the assert statement
-
Mehdi Amini authored
Revert "AMDGPU: Try to fix build error with old gcc" This reverts commit c7ad12d0. Revert "AMDGPU: Use umin in set.rounding expansion" This reverts commit a56f0b51. Revert "AMDGPU: Optimize set_rounding if input is known to fit in 2 bits (#88588)" This reverts commit b4e751e2. Revert "AMDGPU: Implement llvm.set.rounding (#88587)" This reverts commit 9731b77e.
-
luolent authored
Fixes [#85868](https://github.com/llvm/llvm-project/issues/85868) Parenthesis are added as requested on ternary operators with non trivial conditions. I used this [precedence table](https://en.cppreference.com/w/cpp/language/operator_precedence) for reference, to make sure we get the expected behavior on each change.
-
krzysdz authored
- Add missing `__cpp_lib_containers_ranges` feature test macro - Constrain `__cpp_lib_ranges_to_container` to the `<ranges>` header, since the standard does not list it in containers' headers Ref: - https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1206r7.pdf#section.18 - https://eel.is/c++draft/support.limits#lib:__cpp_lib_containers_ranges - https://eel.is/c++draft/support.limits#lib:__cpp_lib_ranges_to_container
-
- May 04, 2024
-
-
Karl-Johan Karlsson authored
This is a fix for the issue #87758 where fast-math flags are not propagated all builtins. It seems like pragmas with fast math flags was only propagated to calls of unary floating point builtins. This patch propagate them also for binary and ternary floating point builtins.
-
Kazu Hirata authored
I'm planning to remove StringRef::equals in favor of StringRef::operator==. - StringRef::operator== outnumbers StringRef::equals by a factor of 25 under llvm/ in terms of their usage. - The elimination of StringRef::equals brings StringRef closer to std::string_view, which has operator== but not equals. - S == "foo" is more readable than S.equals("foo"), especially for !Long.Expression.equals("str") vs Long.Expression != "str". -
Matt Stephanson authored
Adjust some of the [rand.dist] critical values that are too strict - Most critical values are determined empirically by running each test 51 times with a different PRNG seed and finding the smallest symmetric interval around the median that contains 90% of the sample means, variances, etc. - For the Kolmogorov-Smirnov tests, the alpha=0.1 critical value for large N is 1.224/sqrt(N). - For normally distributed variates, the sample kurtosis is distributed as Normal(0, 24/N). For N=1e5, this gives a 90% confidence interval of 0+/-0.0255. For Binomial(40, 0.25), which is approximately normal, the kurtosis is -0.0167, so the relative 90% CI is large, on the order of 0.0255/0.0167 = 153%. In most cases the distribution of the sample kurtosis isn't known analytically, but similarly large relative tolerances can be expected if the kurtosis is near zero.
-
Simon Pilgrim authored
If the shuffle mask contains no undef elements, then we can move the freeze through a shuffle node. This requires special case handling to create a new ShuffleVectorSDNode. Includes VECTOR_SHUFFLE support for isGuaranteedNotToBeUndefOrPoison / canCreateUndefOrPoison.
-
orbiri authored
Parsing support for floating point types was missing a few features: 1. Parsing floating point attributes from integer literals was supported only for types with bitwidth smaller or equal to 64. 2. Downstream users could not use `AsmParser::parseFloat` to parse float types which are printed as integer literals. This commit addresses both these points. It extends `Parser::parseFloatFromIntegerLiteral` to support arbitrary bitwidth, and exposes a new API to parse arbitrary floating point given an fltSemantics as input. The usage of this new API is introduced in the Test Dialect.
-
Nikita Kniazev authored
-
Kristof Beyls authored
When runOnEachFunctionWithUniqueAllocId is invoked with ForceSequential=true, then the current implementation runs the function with AllocId==0, which is the Id for the shared, non-unique, default AnnotationAllocator. However, the documentation for runOnEachFunctionWithUniqueAllocId states: ``` /// Perform the work on each BinaryFunction except those that are rejected /// by SkipPredicate, and create a unique annotation allocator for each /// task. This should be used whenever the work function creates annotations to /// allow thread-safe annotation creation. ``` Therefore, even when ForceSequential==true, a unique AllocId should be used, i.e. different from 0. In the current upstream BOLT this is presumably not depended on, but it is needed to reduce memory usage for analyses that use a lot of memory/annotations. Examples are the pac-ret and stack-clash analyses that currently have prototype implementations as described in https://discourse.llvm.org/t/rfc-bolt-based-binary-analysis-tool-to-verify-correctness-of-security-hardening/78148 These analyses use the DataFlowAnalysis framework to sometimes store quite a lot of information on each MCInst. They run in parallel on each function. When the dataflow analysis is finished, the annotations on each MCInst can be removed, hugely saving on memory consumption. The only annotations that need to remain are those that indicate some unexpected properties somewhere in the binary. Fixing this bug enables implementing the deletion of the memory used by those huge number of DataFlowAnalysis annotations (by invoking BC.MIB->freeValuesAllocator(AllocatorId)), even when run with --no-threads. Without this bug fixed, the invocation of BC.MIB->freeValuesAllocator(AllocatorId) results in also the memory for all other annotations to be deleted, as AllocatorId is 0. --------- Co-authored-by:
Maksim Panchenko <maks@meta.com>
-
Andreas Jonson authored
-
Nikita Popov authored
The InstCombine contributor guide already says: > Handle non-splat vector constants if doing so is free, but do > not add handling for them if it adds any additional complexity > to the code. This change strengthens this guideline to explicitly discourage asking (new) contributors to implement non-splat support during code reviews. Doing so will almost certainly increase the number of necessary review iterations, or result in outright contradictory review feedback, as different people are willing to accept a different degree of complexity for non-splat vector support.
-
Patrick O'Neill authored
Targets with no `-fstack-split` support now emit `ld.lld: error: target doesn't support split stacks` instead of `UNREACHABLE executed` with a backtrace asking the user to report a bug. Resolves #88061
-
Rafael Ubal authored
This change corrects an invalid behavior in pass `--buffer-loop-hoisting`. The pass is in charge of extracting buffer allocations (e.g., `memref.alloca`) from loop regions (e.g., `scf.for`) when possible. This works OK for looks with sequential execution semantics. However, a buffer allocated in the body of a parallel loop may be concurrently accessed by multiple thread to store its local data. Extracting such buffer from the loop causes all threads to wrongly share the same memory region. In the following example, dimension 1 of the input tensor is reversed. Dimension 0 is traversed with a parallel loop. ``` func.func @f(%input: memref<2x3xf32>) -> memref<2x3xf32> { %c0 = index.constant 0 %c1 = index.constant 1 %c2 = index.constant 2 %c3 = index.constant 3 %output = memref.alloc() : memref<2x3xf32> scf.parallel (%index) = (%c0) to (%c2) step (%c1) { // Create subviews for working input and output slices %input_slice = memref.subview %input[%index, 2][1, 3][1, -1] : memref<2x3xf32> to memref<1x3xf32, strided<[3, -1], offset: ?>> %output_slice = memref.subview %output[%index, 0][1, 3][1, 1] : memref<2x3xf32> to memref<1x3xf32, strided<[3, 1], offset: ?>> // Copy the input slice into this temporary buffer. This intermediate // copy is unnecessary, but is used for illustration purposes. %temp = memref.alloc() : memref<1x3xf32> memref.copy %input_slice, %temp : memref<1x3xf32, strided<[3, -1], offset: ?>> to memref<1x3xf32> // Copy temporary buffer into output slice memref.copy %temp, %output_slice : memref<1x3xf32> to memref<1x3xf32, strided<[3, 1], offset: ?>> scf.reduce } return %output : memref<2x3xf32> } ``` The patch submitted here prevents `%temp = memref.alloc() : memref<1x3xf32>` from being hoisted when the containing op is `scf.parallel` or `scf.forall`. A new op trait called `HasParallelRegion` is introduced and assigned to these two ops to indicate that their regions have parallel execution semantics. @joker-eph @ftynse @nicolasvasilache @sabauma -
Joseph Huber authored
Summary: This file was missing a dependency so it wasn't being installed.
-
paperchalice authored
We need it to test isel related passes. Currently `verifyMachineFunction` is incomplete (no LiveIntervals support), but is enough for testing isel pass, will migrate to complete `MachineVerifierPass` in future.
-
Maksim Levental authored
-
Fangrui Song authored
-
Johannes Doerfert authored
-
Craig Topper authored
Another similar problem was added to the ticket after the first fix.
-