forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 76
merge main into amd-staging #579
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Directly update induction increments with step value created for wide inductions in createWidenInductionRecipes, which does not require looking up via RecipeBuilder.
This PR extracts visitation of paths stored in `CompilerInvocation` into a member function. We already have a second copy of this downstream, and I'm in the need of adding a third one.
Replace direct access to underlying IR instructions with VPlan-level equivalents, i.e. VPTypeAnalysis and pattern matching on the recipe. Removes a few uses of accessing underlying IR.
Add support for `nvvm.barrier0.[popc|and|or]` operation. It is added as a separate operation since `Barrier0Op` has no result. https://docs.nvidia.com/cuda/nvvm-ir-spec/#barrier-and-memory-fence This will be used in CUDA Fortran lowering: https://github.com/llvm/llvm-project/blob/49f55f4991227f3c7a2b8161bbf45c74b7023944/flang/lib/Optimizer/Builder/CUDAIntrinsicCall.cpp#L1081 And could be used later in the CUDA C/C++ with CIR https://github.com/llvm/llvm-project/blob/49f55f4991227f3c7a2b8161bbf45c74b7023944/clang/lib/Headers/__clang_cuda_device_functions.h#L524 --------- Co-authored-by: Guray Ozen <guray.ozen@gmail.com>
…67245) Add support for handling parenthesized expressions in lifetime safety analysis. Modified the `OriginManager::get` method to ignore parentheses when retrieving origins by recursively calling itself on the unparenthesized expression. This ensures that expressions with extra parentheses are properly analyzed for lifetime safety issues.
Lit has a number of options controlling the output, but they don't
compose very well. This breaks the existing options down into smaller,
orthogonal options, and makes the existing options aliases of the new
ones.
This introduces the following options:
--test-output {off,failed,all}
--print-result-after {off,failed,all}
--diagnostic-level {error,warning,note}
--terse-summary
--no-terse-summary
--progress-bar (mirroring --no-progress-bar)
--test-output and --print-result-after are not entirely orthogonal, as
'--test-output X' requires that --print-result-after is set to at least
X, and implicitly does so if it isn't already. Conversely,
'--print-result-after Y' requires that --test-output is at most Y, and
implicitly lowers if it is higher. This means that the following
invocations have different end results, as they are applied in order:
'--test-output all --print-result-after off'
'--print-result-after off --test-output all'
The following existing options are now aliases as follows:
-q, --quiet
'--diagnostic-level error --test-output off --terse-summary'
-s, --succinct
'--progress-bar --print-result-after failed'
-v, --verbose
'--test-output failed'
-a, --show-all
'--test-output all'
These where all completely separate options and would override each
other in ad-hoc ways, with no regard to the order they were given.
This fixes llvm#106643 This is
based on the RFC
https://discourse.llvm.org/t/rfc-new-command-line-options-for-controlling-llvm-lit-output/
with the addition of --terse-summary, which was a behaviour of -q that
was not captured by the original RFC. This also diverges from the RFC in
that --debug is NOT folded into --diagnostic-level, because it can be
useful to debug any configuration, including those specifying
--diagnostic-level.
Example combination that is possible now but wasn't before:
'--diagnostic-level error --test-output all --progress-bar' Another use
case is aliases, where you can alias e.g:
alias lit=llvm-lit --quiet
but still override the specified default options.
For tail-calls we want to re-use the caller stack-frame and potentially
need to copy stack arguments.
For large stack arguments, such as by-val structs, this can lead to
overwriting incoming stack arguments when preparing outgoing ones by
copying them. E.g., in cases like
%"struct.s1" = type { [19 x i32] }
define void @f0(ptr byval(%"struct.s1") %0, ptr %1) {
tail call void @F1(ptr %1, ptr byval(%"struct.s1") %0)
ret void
}
declare void @F1(ptr, ptr)
that swap arguments, the last bytes of %0 are on the stack, followed by
%1. To prepare the outgoing arguments, %0 needs to be copied and %1
needs to be loaded into r0. However, currently the copy of %0
overwrites the location of %1, resulting in loading garbage into r0.
We fix that by forcing the load to the pointer stack argument to happen
before the copy.
…i clang-tidy check (llvm#167778)
ExecuteFunctionUnix.cpp which is guarded by this check should reliably work on darwin as it only uses POSIX API - nothing specific to linux.
The unused field src2 is now encoded to vgpr0 accoring to the latest guidelines. Fixes: SWDEV-565846
…llvm#167625) When pointer element type is casted to integer type, the stored value should be casted to integer type to avoid type mistmatch. LLVM IR change in function _Z18__clc_atomic_storePU3AS1Vffii: > %5 = bitcast float %1 to i32 (New) < %5 = fptosi float %1 to i32 (Old)
These instructions show up when building asan in the premerge container and do not on other bots, likely due to different standard library versions.
As of e4a672b, lldbCore is free of plugins. These headers are no longer needed.
…m#167794) The ValueObject library doesn't actually depend on any plugins currently, but it links against the C++ and ObjC language plugins. I removed those and added NO_PLUGIN_DEPENDENCIES. However, the build failed initally because the Commands library depends on clangFrontend and it was previously getting it transitively through ValueObject -> C++/ObjC Language -> clangFrontend. This makes the dependency more explicit.
…lvm#163699) When the stars align to conspire against stack alignment, when we have frame-pointer=non-leaf we can incorrectly skip preserving fp/r7 in the prolog. The fix here first makes sure we're using the right frame pointer register in the context of preserving the incoming FP, and then make sure that we save the FP when re-alignment is known to be necessary. rdar://162462271
related: llvm#160386 Add support for address space conversions in CIR. - Added `createAddrSpaceCast` methods to `CIRBaseBuilderTy` to handle address space conversions - Implemented address space conversion handling in `emitCastLValue` and `VisitCastExpr` - Added `performAddrSpaceCast` method to `TargetCIRGenInfo` for target-specific address space casting - Added `getLangTempAllocaAddressSpace` to `CIRGenModule` to get the language-specific address space for temporary allocations - Added a test file `address-space-conversion.cpp` to verify address space conversion functionality
These calls were added in 8d51149 to keep valgrind quiet. They are redundant, and I'm not aware of anyone attempting to run LLVM under valgrind these days, so deleting them.
The rate at which lit's progress bar progresses is not deterministic. Don't try to match the contents of the progress bar, only the fact that it's there.
…ssedEntityID (llvm#166346) Similar to previous no transitive changes to decls, types, identifiers and source locations ( llvm#92083 llvm#92085 llvm#92511 llvm#86912 ) This patch does the same thing for MacroID and PreprocessedEntityID. --- ### Some background Previously we record different IDs linearly. That is, when writing a module, if we have 17 decls in imported modules, the ID of decls in the module will start from 18. This makes the contents of the BMI changes if the we add/remove any decls, types, identifiers and source locations in the imported modules. This makes it hard for us to reduce recompilations with modules. We want to skip recompilations as we think the modules can help us to remove fake dependencies. This can be done by split the ID into <ModuleIndex, LocalIndex> pairs. This is ALREADY done for several different ID above. We call it non-casacading changes (https://clang.llvm.org/docs/StandardCPlusPlusModules.html#experimental-non-cascading-changes). Our internal users have already used this feature and it works well for years. Now we want to extend this to MacroID and PreprocessedEntityID. This is helpful for us in the downstream as we allowed named modules to export macros. But I believe this is also helpful for header-like modules if you'd like to explore the area. And also I think this is a nice cleanup too. --- Given the use of MacroID and PreprocessedEntityID are not as complicated as other IDs in the above series, I feel the patch itself should be good. I hope the vendors can test the patch to make sure it won't affect existing users.
…: `arith-to-apfloat` (llvm#167608) Fix both symbol visibility issue in the mlir_apfloat_wrappers lib and the linkage issue in ArithToAPFloat.
When landing 141c2b I didn't realize that none of these files actually got built either locally or by premerge. I had some minor syntax mistakes that caused the build to fail. This patch fixes those issues and has been verified on a Windows machine.
This reverts commit 4b805e1. It turns out the original commit was wrong and these were not just quieting valgrind down, but actually solving an issue. We now get MSan failures. Reverting to have some time to investigate. https://lab.llvm.org/buildbot/#/builders/164/builds/15562
Currently, we don't have support for patterns that need access to a `Tester` instance in `mlir-reduce`. This PR adds `DialectReductionPatternWithTesterInterface` to the set of supported interfaces. Dialects can implement this interface to inject the tester into their pattern classes.
…n. (llvm#167651) We can use the default legalization which will create an i32 load followed by a v2i32 scalar_to_vector followed by a bitcast. We can isel the scalar_to_vector like a bitcast and not generate any instructions for it.
…sics (llvm#167553) This commit adds documentation clarifying the meaning of `align` on ptr addrpsace(7) (buffer fat pointer) and ptr addrspace(9) (bufferef structured pointer) operations (specifying that both the base and the offset need to be aligned) and documents the meaning of the `align` attribute when used as an argument on *.buffer.ptr.* intrinsics.
This integration test has been broken for a while. This commit partially fixes it. - Use `CHECK` + `CHECK-NEXT` to ensure that the correct error lines are matched together. - Move all `CHECK-NOT` to the end. Having a `CHECK` with the same string does not make sense after a `CHECK-NOT`. - Add a missing `CHECK: ERROR` for one of the test cases. - Deactivate `reverse_from_3`, which is broken, and put a TODO.
Collaborator
Author
ronlieb
approved these changes
Nov 13, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.