- Jun 04, 2024
-
-
Nikita Popov authored
-
Nikita Popov authored
-
Pavel Labath authored
-
Chuanqi Xu authored
Following of https://github.com/llvm/llvm-project/pull/86912 The motivation of the patch series is that, for a module interface unit `X`, when the dependent modules of `X` changes, if the changes is not relevant with `X`, we hope the BMI of `X` won't change. For the specific patch, we hope if the changes was about irrelevant declaration changes, we hope the BMI of `X` won't change. **However**, I found the patch itself is not very useful in practice, since the adding or removing declarations, will change the state of identifiers and types in most cases. That said, for the most simple example, ``` // partA.cppm export module m:partA; // partA.v1.cppm export module m:partA; export void a() {} // partB.cppm export module m:partB; export void b() {} // m.cppm export module m; export import :partA; export import :partB; // onlyUseB; export module onlyUseB; import m; export inline void onluUseB() { b(); } ``` the BMI of `onlyUseB` will change after we change the implementation of `partA.cppm` to `partA.v1.cppm`. Since `partA.v1.cppm` introduces new identifiers and types (the function prototype). So in this patch, we have to write the tests as: ``` // partA.cppm export module m:partA; export int getA() { ... } export int getA2(int) { ... } // partA.v1.cppm export module m:partA; export int getA() { ... } export int getA(int) { ... } export int getA2(int) { ... } // partB.cppm export module m:partB; export void b() {} // m.cppm export module m; export import :partA; export import :partB; // onlyUseB; export module onlyUseB; import m; export inline void onluUseB() { b(); } ``` so that the new introduced declaration `int getA(int)` doesn't introduce new identifiers and types, then the BMI of `onlyUseB` can keep unchanged. While it looks not so great, the patch should be the base of the patch to erase the transitive change for identifiers and types since I don't know how can we introduce new types and identifiers without introducing new declarations. Given how tightly the relationship between declarations, types and identifiers, I think we can only reach the ideal state after we made the series for all of the three entties. The design of the patch is similar to https://github.com/llvm/llvm-project/pull/86912, which extends the 32-bit DeclID to 64-bit and use the higher bits to store the module file index and the lower bits to store the Local Decl ID. A slight difference is that we only use 48 bits to store the new DeclID since we try to use the higher 16 bits to store the module ID in the prefix of Decl class. Previously, we use 32 bits to store the module ID and 32 bits to store the DeclID. I don't want to allocate additional space so I tried to make the additional space the same as 64 bits. An potential interesting thing here is about the relationship between the module ID and the module file index. I feel we can get the module file index by the module ID. But I didn't prove it or implement it. Since I want to make the patch itself as small as possible. We can make it in the future if we want. Another change in the patch is the new concept Decl Index, which means the index of the very big array `DeclsLoaded` in ASTReader. Previously, the index of a loaded declaration is simply the Decl ID minus PREDEFINED_DECL_NUMs. So there are some places they got used ambiguously. But this patch tried to split these two concepts. As https://github.com/llvm/llvm-project/pull/86912 did, the change will increase the on-disk PCM file sizes. As the declaration ID may be the most IDs in the PCM file, this can have the biggest impact on the size. In my experiments, this change will bring 6.6% increase of the on-disk PCM size. No compile-time performance regression observed. Given the benefits in the motivation example, I think the cost is worthwhile.
-
Benjamin Chetioui authored
-
Vladimir Vereschaka authored
Avoid usage DEFAULT_SYSROOT CMake variable to confgiure the ARM/Aarch64 cross platform toolchain builds. Use the Clang configuration files with proper `--sysroot=` in it instead. More details could be found here: https://github.com/llvm/llvm-project/issues/94284 -
martinboehme authored
To avoid generating unnecessary values, we don't create a new value but instead leave it to the specific analysis to do this if desired.
-
Nikita Popov authored
Remove support for the icmp and fcmp constant expressions. This is part of: https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179 As usual, many of the updated tests will no longer test what they were originally intended to -- this is hard to preserve when constant expressions get removed, and in many cases just impossible as the existence of a specific kind of constant expression was the cause of the issue in the first place.
-
Tina Jung authored
Convert all arith.cmpf on floats (not vectors/tensors thereof) to EmitC. --------- Co-authored-by:
Matthias Gehre <matthias.gehre@amd.com> Co-authored-by:
Jose Lopes <jose.lopes@amd.com>
-
Christian Sigg authored
-
Christian Sigg authored
-
Han-Chung Wang authored
In some cases (see https://github.com/iree-org/iree/issues/16285), `memref.subview` ops can't be folded into transfer ops and sub-byte type emulation fails. This issue has been blocking a few things, including the enablement of vector flattening transformations (https://github.com/iree-org/iree/pull/16456 ). This PR extends the existing sub-byte type emulation support of `memref.subview` to handle multi-dimensional subviews with dynamic offsets and addresses the issues for some of the `memref.subview` cases that can't be folded. Co-authored-by:
Diego Caballero <diegocaballero@google.com>
-
LLVM GN Syncbot authored
-
Younan Zhang authored
This patch picks up #78598 with the hope that we can address such crashes in `tryCaptureVariable()` for unevaluated lambdas. In addition to `tryCaptureVariable()`, this also contains several other fixes on e.g. lambda parsing/dependencies. Fixes #63845 Fixes #67260 Fixes #69307 Fixes #88081 Fixes #89496 Fixes #90669 Fixes #91633
-
Maksim Panchenko authored
Move functionality for patching build ID into a separate rewriter class and change the way we do the patching. Support build ID in different note sections in order to update the build ID in the Linux kernel binary which puts in into ".notes" section instead of ".note.gnu.build-id".
-
Teresa Johnson authored
With the change in 2fa05919 we can now use a range for loop.
-
klensy authored
Similar to https://github.com/rust-lang/rust/pull/125007
-
Teresa Johnson authored
A cycle profile showed that we were spending a lot of time invoking MapVector::erase. According to https://llvm.org/docs/ProgrammersManual.html#llvm-adt-mapvector-h, erasing elements one at a time is very inefficient for MapVector and it is better to use remove_if. This change resulted in around 7% time reduction on a large thin link. While here remove an unused function that also invokes erase on MapVectors.
-
Johannes Doerfert authored
The old use of must-be-executed-context (MBEC) did propagate through calls even if that was not allowed. We now only propagate from call site arguments. If there are calls/intrinsics that allows propagation, we need to add them explicitly. Fixes: https://github.com/llvm/llvm-project/issues/78507 --------- Co-authored-by:
Matt Arsenault <arsenm2@gmail.com>
-
Yeting Kuo authored
FunctionStackPoisoner does not serve for `AllocaInst` with scalable vector type, but it does not filter out struct type with scalable vector introduced by c8eb535a.
-
Fangcao Wang authored
Sink vscale calls as well when indvars is not widen (-indvars-widen-indvars=false).
-
Teresa Johnson authored
A cycle profile of a thin link showed a lot of time spent in sort called from the BitcodeWriter, which was being used to compute the unique references to stack ids in the summaries emitted for each backend in a distributed thinlto build. We were also frequently invoking lower_bound to locate stack id indices in the resulting vector when writing out the referencing memprof records. Change this to use a map to uniquify the references, and to hold the index of the corresponding stack id in the StackIds vector, which is now populated at the same time. This reduced the time of a large thin link by about 10%.
-
Kareem Ergawy authored
Fixes a crash uncovered by [pr89651](https://github.com/llvm/llvm-test-suite/blob/main/Fortran/gfortran/regression/gomp/pr89651.f90) in the test suite. Fixes a crash caused by missing handling of `omp.private` ops in `FirOpBuilder::getAllocaBlock()`.
-
Jordan Rupprecht authored
This manifests as `AddressSanitizer: stack-use-after-return` w/o this change. The `~CheckFEnv()` method of checking fenv seems to only work for test fixtures.
-
Jakub Kuderski authored
* Improve the condition type requirement description ('scalar' -> signless i1), to match what is actually verified. * Use the `I1` type predicate instead of `AnyBooleanTypeMatch`. Related discussion: https://github.com/llvm/llvm-project/pull/93351#issuecomment-2130453233. -
Kai Luo authored
The MI is generated in `PPCDAGToDAGISel::Select` so the match pattern isn't used and can be removed.
-
Mehdi Amini authored
-
paperchalice authored
It should preserve more analysis results, but it happens immediately after instruction selection.
-
Keith Smiley authored
Previously this assumed that `LLVM_ENABLE_ABI_BREAKING_CHECKS` would always be enabled in this case, if it's not `TTI` does not exist. Introduced in 7652a594
-
Lu Weining authored
To support the third parameter of the alignment directive, R_LARCH_ALIGN relocations need a non-zero symbol index. In many cases we don't need the third parameter and can set the symbol index to 0. This patch will remove a lot of .Lla-relax-align* symbols and mitigate the size regression due to https://github.com/llvm/llvm-project/pull/72962 . Co-authored-by:
Jinyang He <hejinyang@loongson.cn> Co-authored-by:
Weining Lu <luweining@loongson.cn>
-
Rahman Lavaee authored
[Codegen, BasicBlockSections] Avoid cloning blocks which have their machine block address taken. (#94296) These blocks usually show up in the form of branches within inline assembly. Since it's hard to rewire them, we fully omit paths with such blocks from path cloning.
-
pcc authored
-fvisibility-global-new-delete-hidden is deprecated and clang was warning about it on every build command. These libraries are always built using a stage2 compiler, so we can use the new build flag unconditionally. Reviewers: aeubanks Reviewed By: aeubanks Pull Request: https://github.com/llvm/llvm-project/pull/88459
-
paperchalice authored
- Fix build with `EXPENSIVE_CHECKS` - Remove unused `PassName::ID` to resolve warning - Mark `~SelectionDAGISel` virtual so AArch64 backend can work properly
-
Han-Chung Wang authored
The revision unrolls vector.bitcast like: ```mlir %0 = vector.bitcast %arg0 : vector<2x4xi32> to vector<2x2xi64> ``` to ```mlir %cst = arith.constant dense<0> : vector<2x2xi64> %0 = vector.extract %arg0[0] : vector<4xi32> from vector<2x4xi32> %1 = vector.bitcast %0 : vector<4xi32> to vector<2xi64> %2 = vector.insert %1, %cst [0] : vector<2xi64> into vector<2x2xi64> %3 = vector.extract %arg0[1] : vector<4xi32> from vector<2x4xi32> %4 = vector.bitcast %3 : vector<4xi32> to vector<2xi64> %5 = vector.insert %4, %2 [1] : vector<2xi64> into vector<2x2xi64> ``` The scalable vector is not supported because of the limitation of `vector::createUnrollIterator`. The targetRank could mismatch the final rank during unrolling; there is no direct way to query what the final rank is from the object.
-
Namish Kukreja authored
ARM64EC designates a set of disallowed registers, because a mapping does not exist from them to x64. The MSVC assembler (armasm64) has a warning for this. A test is also included as part of the patch. See the list of disallowed registers below: https://learn.microsoft.com/en-us/cpp/build/arm64ec-windows-abi-conventions?view=msvc-170#register-mapping
-
Michael Kruse authored
Update the folder titles for targets in the monorepository that have not seen taken care of for some time. These are the folders that targets are organized in Visual Studio and XCode (`set_property(TARGET <target> PROPERTY FOLDER "<title>")`) when using the respective CMake's IDE generator. * Ensure that every target is in a folder * Use a folder hierarchy with each LLVM subproject as a top-level folder * Use consistent folder names between subprojects * When using target-creating functions from AddLLVM.cmake, automatically deduce the folder. This reduces the number of `set_property`/`set_target_property`, but are still necessary when `add_custom_target`, `add_executable`, `add_library`, etc. are used. A LLVM_SUBPROJECT_TITLE definition is used for that in each subproject's root CMakeLists.txt.
-
smanna12 authored
This patch adds assertions in the getMangledNameImpl() function to ensure that the expected target attributes (TargetAttr, TargetVersionAttr, and TargetClonesAttr) are not null before they are passed to appendAttributeMangling() to prevent potential null pointer dereferences and improve the robustness of the attribute mangling process. This assertion will trigger a runtime error with a clear message in debug build if any of the expected attributes are missing, facilitating early and easier diagnosis and debugging of such issues related to attribute mangling.
-
antangelo authored
Adds AArch64 support for the `preserve_none` calling convention. Registers X0-X7, X9-X15 and X19-X28 are caller save, and can be used to pass arguments. Delegates to AAPCS for all other registers. Closes #87423
-
Jon Roelofs authored
Having the version in `get_run_handlers` meant that a RUN line without the version in it would not match, and therefore UTC would generate a useless catch-all check of the form: ``` ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: ; CHECK: {{.*}} ``` This patch also adds `arm64_32` as a base-level run handler, and assumes it will always apply to a darwin target (which is currently the case for all arm64_32-* triples I see in tree currently). -
Jon Roelofs authored
Since pointers in memory, as well as the index type are both 32 bits, but in registers pointers are 64 bits, the mask generated by llvm.ptrmask needs to be zero-extended. Fixes: #94075 Fixes: rdar://125263567
-