- Mar 25, 2024
-
-
David Stuttard authored
Added more buffer instruction merging support
-
Tom Honermann authored
Lifetime extended temporary objects that are bound to references with static storage duration may have external linkage and therefore require mangled symbol names. Clang uses an extension of the Microsoft ABI to give these symbols an implicit name of '$RT' followed by a discriminator and then mangles them similarly to the variable they are bound to. Clang's mangling scheme differs from the one used by MSVC. Previously, the `$RT<discriminator>` portion of the name was not registered as a back reference candidate and this resulted in incorrect back references for enclosing class and/or namespace scopes that might be referenced in the type of the object. This is an ABI change and has the potential to cause backward compatibility issues with previous Clang releases. Since MSVC uses a different mangling scheme, this change does not affect compatibility with MSVC. This fixes one of the name mangling concerns reported in #85423.
-
OverMighty authored
Fixes #85279. cc @lntue
-
Balazs Benics authored
When debugging CSA issues, sometimes it would be useful to have a dedicated note for the analysis entry point, aka. the function name you would need to pass as "-analyze-function=XYZ" to reproduce a specific issue. One way we use (or will use) this downstream is to provide tooling on top of creduce to enhance to supercharge productivity by automatically reduce cases on crashes for example. This will be added only if the "-analyzer-note-analysis-entry-points" is set or the "analyzer-display-progress" is on. This additional entry point marker will be the first "note" if enabled, with the following message: "[debug] analyzing from XYZ". They are prefixed by "[debug]" to remind the CSA developer that this is only meant to be visible for them, for debugging purposes. CPP-5012
-
Chris B authored
This change just enables the SPIR-V target by default in the HLSL build configurations. Since SPIR-V support is something we expect from the full HLSL compiler releases for pairity with DXC we should enable it in the default developer workflow.
-
Michael Maitland authored
This PR is stacked on #76186. This PR keeps the default strategy as top-down since that is what existing targets expect. It can be enabled using `-misched-postra-direction=bidirectional`. It is up to targets to decide whether they would like to enable this option for themselves.
-
Andrzej Warzyński authored
Buffers are no longer deallocated by One-Shot Bufferize - this is now done by a separate buffer deallocation pass. In order to see the leaks in SVE integration tests, use the following CMake flags (enables the address sanitizer and SVE integration tests): -DLLVM_USE_SANITIZER="Address" -DMLIR_INCLUDE_INTEGRATION_TESTS=On -DMLIR_RUN_ARM_SVE_TESTS=On Follow-up for #85366 -
Jie Fu authored
llvm-project/flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp:157:12: error: unused variable 'it' [-Werror,-Wunused-variable] auto it = convertedTypes.try_emplace(ty, rec); ^ 1 error generated. -
alx32 authored
In a previous PR: https://github.com/llvm/llvm-project/pull/83878, the intent was to make no functional changes, just refactor out the code for reuse. However, by creating `ObjCSelRefsSection` as a `SyntheticSection` - this slightly changed the functionality of the application as the `SyntheticSection` constructor registers the `SyntheticSection` as a functional one - with an associated `SyntheticInputSection`. With this change we remove this unintended consequence by making the code not use a `SyntheticSection` as base, but just by having it be a static helper.
-
martinboehme authored
We only ever intended to support C++, but the condition we were testing allowed Objective-C++ code by mistake.
-
Jianbang Yang authored
fix a crash when fold tensor.dim with out-of-bound index. Fixes: https://github.com/llvm/llvm-project/issues/70183
-
Joseph Huber authored
Summary: The patch https://github.com/llvm/llvm-project/pull/80847 introduced some changes to how we build tablegen. Some files weren't build included properly on my build. We don't need to fish out the objects directly from an object library build, we can simply add it to the link libraries and CMake will include them for you. This fixed the issue of missings defs for me and is more canonical.
-
Dmitri Gribenko authored
-
Leandro Lupori authored
Iteration variables of non-associated loops may be listed in DSA clauses. Fixes https://github.com/llvm/llvm-project/issues/78938
-
Christian Sigg authored
-
NagyDonat authored
This reapplies 80ab8234 again, after fixing a name collision warning in the unit tests (see the revert commit 13ccaf9b for details). In addition to the previously applied changes, this commit also clarifies the code in MallocChecker that distinguishes POSIX "getline()" and C++ standard library "std::getline()" (which are two completely different functions). Note that "std::getline()" was (accidentally) handled correctly even without this clarification; but it's better to explicitly handle and test this corner case. --------- Co-authored-by:
Balazs Benics <benicsbalazs@gmail.com>
-
Florian Hahn authored
CanonicalIVIncrementForPart uses VPIteration(0, 0) of the IV (first operand), mark it as only using part 0. This avoids generating redundant IV increments per part.
-
David Green authored
Fixes #86102
-
Tobias Gysi authored
This revision makes the subprogramFlags field in the DISubprogrammAttr optional. This is necessary since the DISubprogram attached to a declaration may have none of the subprogram flags set.
-
Stefan Gränitz authored
-
AtariDreams authored
-
jeanPerier authored
This patch speeds up the compilation time of the example in https://github.com/llvm/llvm-project/issues/76478#issuecomment-2011023289 from 2 minutes with my builds to about 2 seconds. MLIR timers showed more than 98% of the time was spend in BoxedProcedure trying to figure out if a type needs to be converted. This is because walking the fir.type members is very expansive for types containing many components and/or components with many sub-components. Increase the caching time of visited types from "the type being visited" to "the whole pass". Use DenseMap since it is not ok anymore to assume this container will only have a few elements.
-
Nathan Gauër authored
Add support to generate valid SPIR-V for the WaveGetLaneIndex() HLSL builtin. To implement this, I had to fix a few small issues in the backend, like the i8* pointer type being emitted, even if we have the type information elsewhere. Signed-off-by:Nathan Gauër <brioche@google.com>
-
Discookie authored
The checker finds a type of undefined behavior, where if the type of a pointer to an object-array is different from the objects' underlying type, calling `delete[]` is undefined, as the size of the two objects might be different. The checker has been in alpha for a while now, it is a simple checker that causes no crashes, and considering the severity of the issue, it has a low result-count on open-source projects (in my last test-run on my usual projects, it had 0 results). This commit cleans up the documentation and adds docs for the limitation related to tracking through references, in addition to moving it to `cplusplus`. --------- Co-authored-by:
Balazs Benics <benicsbalazs@gmail.com> Co-authored-by:
whisperity <whisperity@gmail.com>
-
Mariusz Sikora authored
-
Matthias Springer authored
This commit adds the `BufferOriginAnalysis`, which can be queried to check if two buffer SSA values originate from the same allocation. This new analysis is used in the buffer deallocation pass to fold away or simplify `bufferization.dealloc` ops more aggressively. The `BufferOriginAnalysis` is based on the `BufferViewFlowAnalysis`, which collects buffer SSA value "same buffer" dependencies. E.g., given IR such as: ``` %0 = memref.alloc() %1 = memref.subview %0 %2 = memref.subview %1 ``` The `BufferViewFlowAnalysis` will report the following "reverse" dependencies (`resolveReverse`) for `%2`: {`%2`, `%1`, `%0`}. I.e., all buffer SSA values in the reverse use-def chain that originate from the same allocation as `%2`. The `BufferOriginAnalysis` is built on top of that. It handles only simple cases at the moment and may conservatively return "unknown" around certain IR with branches, memref globals and function arguments. This analysis enables additional simplifications during `-buffer-deallocation-simplification`. In particular, "regular" scf.for loop nests, that yield buffers (or reallocations thereof) in the same order as they appear in the iter_args, are now handled much more efficiently. Such IR patterns are generated by the sparse compiler. -
Martin Storsjö authored
This fixes a typo from 2ef61205, which broke the build with errors like: ld.lld: error: undefined symbol: LoadBitcodeIntoNewDbgInforFormat >>> referenced by verify-uselistorder.cpp >>> tools/verify-uselistorder/CMakeFiles/verify-uselistorder.dir/verify-uselistorder.cpp.o:(main) >>> did you mean: LoadBitcodeIntoNewDbgInfoFormat >>> defined in: lib/libLLVMBitReader.a(BitcodeReader.cpp.o) collect2: error: ld returned 1 exit status
-
Alexandros Lamprineas authored
This was a limitation which has now been lifted. Please read the thread below for more details: https://github.com/llvm/llvm-project/pull/84405#discussion_r1525583647 Basically it allows to separate versioned implementations across different TUs without having to share private header files which contain the default declaration. The ACLE spec has been updated accordingly to make this explicit: "Each version declaration should be visible at the translation unit in which the corresponding function version resides." https://github.com/ARM-software/acle/pull/310 If a resolver is required (because there is a caller in the TU), then a default declaration is implicitly generated.
-
Orlando Cazalet-Hyams authored
Directly load all bitcode into the new debug info format in llvm-link. This means that new-mode bitcode no longer round-trips back to old-mode after parsing, and that old-mode bitcode gets auto-upgraded to new-mode debug info (which is the current in-memory default in LLVM).
-
Orlando Cazalet-Hyams authored
This is NFC right now, as the global default behaviour is also "do not load into the new debug info format by default", but we want to change that soon. Additionally unconditionally convert from the new debug info format into if we've loaded into it (e.g., if the bitcode file loaded was already in the new format). The latter change is needed because verify-uselistorder doesn't yet understand DbgRecords (it doesn't know how to map them). The former change is needed because if we load from an old debug format bitcode file but load directly into the new format _and then convert back to the old mode after_, the use-lists of the debug intrinsic functions (the functions' global value uses) change.
-
Orlando Cazalet-Hyams authored
Directly load all bitcode into the new debug info format in llvm-dis. This means that new-mode bitcode no longer round-trips back to old-mode after parsing, and that old-mode bitcode gets auto-upgraded to new-mode debug info (which is the current in-memory default in LLVM).
-
Shih-Po Hung authored
The ‘llvm.vector.reduce.fmaximum/fminimum.*’ intrinsics propagate NaNs if any element of the vector is a NaN. Following #79402, the patch adds the cost for NaN check (vmfne + vcpop)
-
Orlando Cazalet-Hyams authored
Follow on from #83251. This patch simply enables the behaviour by default in order to provide an easily revertible capstone.
-
Vyacheslav Levytskyy authored
[SPIR-V] Fix illegal OpConstantComposite instruction with non-const constituents in SPIR-V Backend (#86352) This PR fixes illegal use of OpConstantComposite with non-constant constituents. The test attached to the PR is able now to satisfy `spirv-val` check. Before the fix SPIR-V Backend produced for the attached test case a pattern like ``` %a = OpVariable %_ptr_CrossWorkgroup_uint CrossWorkgroup %uint_123 %11 = OpConstantComposite %_struct_6 %a %a ``` so that `spirv-val` complained with ``` error: line 25: OpConstantComposite Constituent <id> '10[%a]' is not a constant or undef. %11 = OpConstantComposite %_struct_6 %a %a ```
-
Vyacheslav Levytskyy authored
This PR improves type inference in SPIR-V Backend for opaque pointers, accounting or a case when there is a chain of function calls that allows to deduce formal parameter types from actual arguments. The attached test demonstrates the case.
-
Vyacheslav Levytskyy authored
[SPIR-V] Introduce a command line option to support compatibility with Khronos SPIRV Translator (#86101) SPIRV-LLVM-Translator project (https://github.com/KhronosGroup/SPIRV-LLVM-Translator) from Khronos Group is a tool and a library for bi-directional translation between SPIR-V and LLVM IR. In its backward translation from SPIR-V to LLVM IR SPIRV-LLVM-Translator isn't necessarily able to cover the same SPIR-V patterns/instructions set that SPIRV Backend produces, even if we target the same SPIR-V version in both SPIRV-LLVM-Translator and SPIRV Backend projects. To improve interoperability and ability to apply SPIRV Backend output in different products this PR introduces a notion of a mode of SPIR-V output that is compatible with a subset of SPIR-V supported by SPIRV-LLVM-Translator. This includes a new command line option that doesn't influence default behavior of SPIRV Backend and one test case that demonstrates how this command line option may be used to get a practical benefit of producing that one of two possible and similar output options that can be understood by SPIRV-LLVM-Translator.
-
David Stuttard authored
buffer_load instructions that use TFE also need to zero initialize return values similar to how the image instructions currently work. Add support for this with standard zero init of all results + zero init of just TFE flag when enable-prt-strict-null subtarget feature is disabled.
-
Stefan Gränitz authored
The LLJITBuilder interface provides a very convenient way to configure the ORCv2 JIT engine. IncrementalExecutor already used it internally to construct the JIT, but didn't provide external access. This patch lifts control of the creation process to the Interpreter and allows injection of a custom instance through the extended interface. The Interpreter's default behavior remains unchanged and the IncrementalExecutor remains an implementation detail.
-
Stefan Gränitz authored
Signedness of unqualified `char` is unspecified and varies between platforms. This patch adds `Char_U` in `REPL_BUILTIN_TYPES` to account for platforms that default to `unsigned char`.
-