- Jan 26, 2024
-
-
Simon Pilgrim authored
-
David Spickett authored
Compiling with -DCMAKE_CXX_STANDARD=20 produces 228 warnings from this file due to: ``` LVOptions.h:515:16: warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture] ``` So I've changed these to explicitly list the captures, including `this`. As llvm requires at least c++17, I think we could use `[=, *this]` instead. However when I did so I got a lot of errors about const. So on balance, explicitly listing the captures seems better than adding some kind of const cast to each one. These and other warnings can be seen on the c++20 buildbot https://lab.llvm.org/buildbot/#/builders/249.
-
Danial Klimkin authored
-
Shimin Cui authored
Currently if the merged string is used by metadata, its metadata uses are not replaced if the string is merged. This is to add code support for the metadata use replacement.
-
Tom Eccles authored
The intrinsic is defined as a GNU extension here: https://gcc.gnu.org/onlinedocs/gfortran/SIGNAL.html And as an IBM extension here: https://www.ibm.com/docs/en/xffbg/121.141?topic=procedures-signali-proc-extension The IBM version provides a compatible subset of the functionality offered by the GNU version. This patch supports most of the GNU features, but not calling SIGNAL as a function. We don't currently support intrinsics being both subroutines AND functions and this changed seemed too large to be justified by a non-standard intrinsic. I cannot point to open source code Fortran using this intrinsic. This is needed for a proprietary code base.
-
Guillaume Chatelet authored
This patch provides specific test macros to deal with `errno`. This will help abstract away the differences between unit test and integration/hermetic tests in #79319. In one case we use `libc_errno` which is a struct, in the other case we deal directly with `errno`.
-
Shengchen Kan authored
-
Kai Nacke authored
The LegalizerHelper only has support to lower G_SELECT with vector operands. The approach is the same for scalar arguments, which this PR adds.
-
David Spickett authored
clang's -Wdtor name is correct, but the standard may have not intended that meaning, according to https://bugs.llvm.org/show_bug.cgi?id=46979#c1. Some of the wording may have changed in 20/23, but we of course need to support c++17 as well as that's our default. One workaround would be to explicitly open the namespaces, then declare the destructor inside that. Another as shown in the bug report is to repeat the class name, without the template arguments, before the ::~. For example `Bar::Foo<T>::Foo::~Foo`. (this extra Foo is the injected class name https://en.cppreference.com/w/cpp/language/injected-class-name) I chose to do this because it's the smallest change. It works with gcc-13 and clang in c++17 and 20 modes (https://godbolt.org/z/fqs4fGE7T).
-
Han-Chung Wang authored
-
Andrei Golubev authored
GEPArg can only be constructed from int32_t and mlir::Value. Explicitly cast other types (e.g. unsigned, size_t) to int32_t to avoid narrowing conversion warnings on MSVC. Some recent examples of such are: ``` mlir\lib\Dialect\LLVMIR\Transforms\TypeConsistency.cpp: error C2398: Element '1': conversion from 'size_t' to 'T' requires a narrowing conversion with [ T=mlir::LLVM::GEPArg ] mlir\lib\Dialect\LLVMIR\Transforms\TypeConsistency.cpp: error C2398: Element '1': conversion from 'unsigned int' to 'T' requires a narrowing conversion with [ T=mlir::LLVM::GEPArg ] ``` Co-authored-by:Nikita Kudriavtsev <nikita.kudriavtsev@intel.com>
-
Luke Lau authored
This fixes a miscompile from #79072 where we were taking the wrong SrcVec to do the M1 shuffle. E.g. if the SrcVecIdx was 2 and we had 2 VRegsPerSrc, we ended up taking it from V1 instead of V2.
-
Luke Lau authored
-
Florian Hahn authored
After 0ab539fd, the canonical IV in the epilogue vector loop may be used by a trunc. Relax the corresponding assert. This should fix some build-bot failures, including https://lab.llvm.org/buildbot/#/builders/187/builds/14113 https://lab.llvm.org/buildbot/#/builders/98/builds/32350 https://lab.llvm.org/buildbot/#/builders/239/builds/5473
-
Dmitriy Smirnov authored
This PR adds a check for IsTerminator trait to prevent deletion of ops like gpu.terminator as a "simple op" by RemoveDeadValues pass.
-
lifengxiang1025 authored
Fix assert in `MemProfContextDisambiguation::applyImport` when exists direct recursion.
-
Shengchen Kan authored
[NFC] Rename TargetInstrInfo::FoldImmediate to TargetInstrInfo::foldImmediate and simplify implementation for X86
-
David Spickett authored
This reverts commit 5e9f0e37 because it creates a new warning from clang: ``` NSDictionary.cpp:1063:14: warning: ISO C++ requires the name after '::~' to be found in the same scope as the name before '::~' [-Wdtor-name] D32, D64>::~GenericNSDictionaryMSyntheticFrontEnd() { ~~~~~~~~~^~ ::GenericNSDictionaryMSyntheticFrontEnd ``` If you remove the template arguments from before the `::`, you then get: ``` NSDictionary.cpp:1062:27: error: use of class template 'lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd' requires template arguments lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::~GenericNSDictionaryMSyntheticFrontEnd() { ^ ``` And I'm not aware of a way to fix that.
-
David Spickett authored
When compiling with gcc 11+ and -DCMAKE_CXX_STANDARD=20, errors like the following happened: ``` llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp:1063:5: error: template-id not allowed for destructor 1063 | ~GenericNSDictionaryMSyntheticFrontEnd<D32,D64>() { | ^ ``` This appears to be something only gcc enforces and only from 11 and beyond. This changes fixes all the instances of this pattern by removing the template arguments. -
Shih-Po Hung authored
It is split off from #77342. InstCombine transform min/max reduction with i1 into arithmetic reduction, so this patch reuses the cost logic in arithmetic reduction cost function.
-
Graham Hunter authored
Currently when interleaving vector calls with linear arguments, the Part is ignored and all vector calls use the initial value from the first lane of the current iteration. Fix this to extract from the correct part of the linear vector.
-
Danial Klimkin authored
-
Florian Hahn authored
Add a new recipe to model scalar cast instructions, without relying on an underlying instruction. This allows creating scalar casts, without relying on an underlying instruction (like the current VPReplicateRecipe). The new recipe is used to explicitly model both truncating the induction step and the VPDerivedIVRecipe, thus simplifying both the recipe and code needed to introduce it. Truncating VPWidenIntOrFpInductionRecipes should also be modeled using the new recipe, as follow-up. PR: https://github.com/llvm/llvm-project/pull/78113
-
Tom Eccles authored
This intrinsic is a gnu extension. See https://gcc.gnu.org/onlinedocs/gfortran/SLEEP.html This intrinsic is used in minighost: https://github.com/Mantevo/miniGhost/blob/c2102b521568a74862fa5abb074b1fc8041fc222/ref/MG_UTILS.F#L606
-
David Spickett authored
-
Diana Picus authored
-
Shengchen Kan authored
-
David Spickett authored
-
Jeremy Morse authored
The utility functions this patch modifies are part of cleanly transitioning from a context where we use dbg.value intrinsics to one where we use DPValue objects to record debug-info, and back again. However, this is a waste of time in non-debug builds (i.e. no -g on the command line). We still have to call the function on all blocks though to set the IsNewDbgInfoFormat flag. To reduce the overhead of this, test whether there's any debug-info in the function by checking whether the function has a DISubprogram, and pass a flag down to the utility functions indicating whether they can skip the scan. It feels a bit dumb to me now that we're scanning and setting a flag in a load of blocks when we don't have to -- however it's been really valuable during development for working out where spurious dbg.value intrinsics leak into a RemoveDIs context. Happily we'll be able to just delete this flag entirely when RemoveDIs lands and sticks, and the conversion routines will eventually be pushed down into the debug-info autoupgrade path.
-
Matthias Springer authored
This change makes the callback consistent with `notifyOperationInserted`: both now notify about IR insertion, not IR creation. See also #78988. This change also simplifies the dialect conversion: it is no longer necessary to override the `inlineRegionBefore` method. All information that is necessary for rollback is provided with the `notifyBlockInserted` callback.
-
Benjamin Maxwell authored
Previously, for masked tile loads/stores we directly used the dimension size from the `vector.create_mask` operation as the upper bound of the `scf.for` over the tile slices. This was not correct, as `create_mask` allows operands to be greater than the size of the vector dimension, in which case the for loop bounds should be clamped to the number of tile slices.
-
Alexandros Lamprineas authored
Adds tests showing that we select function version according to the highest feature priority. This will make the changes introduced by #79316 more evident.
-
Shengchen Kan authored
-
Shengchen Kan authored
-
David Green authored
-
paperchalice authored
-
AtariDreams authored
As of 5aea839a, this FIXME has been resolved. So we can remove this comment.
-
袁銓嶽 authored
This patch avoids adding redundant vcreate_v intrinsics to the RISCV IntrinsicList. Since vcreate_v uses LFixedLog2LMUL, I believe we can simply set Log2LMUL to the smallest value (-3) to prevent the creation of redundant vcreate_v instances with the same intrinsic name and prototype in the IntrinsicList when clang creates it.
-