- Jul 15, 2023
-
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Reported by SeeSpring - it looks like when the numbers were copied from the znver3 model, the resources were altered when it should have just been the latency. Now matches uops.info / Agner / AMD SoG Fixes #63877
-
Mark de Wever authored
It turns out D153336 needs a new include. This should fix the broken LLVM CI runners.
-
Piotr Fusik authored
Reviewed By: #libc, Mordante Differential Revision: https://reviews.llvm.org/D155360
-
Mark de Wever authored
Based on the review comments in D153201 this combines the string and c-string constructors. The common constructor is using a string_view: - it allows propagating the _Traits, which are required to be used for comparison. - it avoids allocating - libc++ supports it in C++03 Reviewed By: philnik, #libc, ldionne Differential Revision: https://reviews.llvm.org/D154860
-
zhongyunde authored
This patch is separated from D154953 to see what tests are affected by this change alone according comment. Depend on the related updating of LangRef on D155193. Reviewed By: paulwalker-arm, nikic, david-arm Differential Revision: https://reviews.llvm.org/D155350
-
zhongyunde authored
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D155363
-
Edoardo Sanguineti authored
Adding assertions will aid users that have bugs in their code to receive better error messages. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D154626
-
Mark de Wever authored
@EricWF spotted this issue in the post-commit review comments of D134742. However the suggestion to just use chrono calculations can result in similar issues when using small fractional seconds. Reviewed By: EricWF, #libc Differential Revision: https://reviews.llvm.org/D138826
-
Mark de Wever authored
The output of template<class charT, class traits> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& out, thread::id id); is affected by the state of out. The wording states [thread.thread.id]/2 The text representation for the character type charT of an object of type thread::id is an unspecified sequence of charT such that, for two objects of type thread::id x and y, if x == y is true, the thread::id objects have the same text representation, and if x != y is true, the thread::id objects have distinct text representations. [thread.thread.id]/9 template<class charT, class traits> basic_ostream<charT, traits>& operator<< (basic_ostream<charT, traits>& out, thread::id id); Effects: Inserts the text representation for charT of id into out. This wording changed in C++23 due to adding a formatter specialization for thread::id. However the requirement was the same in older versions of C++. This issue is that thread::id is an integral or pointer and affected by the formatting manipulators for them. Thus the text representation can differ if x == y which violates the requirements. The fix has to hard-code some formatting style for the text representation. It uses the Standard specified default values Table 124: basic_ios::init() effects [tab:basic.ios.cons] flags() flags() skipws | dec Fixes PR: https://llvm.org/PR62073 Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D153336 -
Nikolas Klauser authored
-
khei4 authored
Revert "Revert "[MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas"" This reverts commit 36a6eb7d. [MemCpyOpt] check that load/store and dest/src alloca are all in the same bb Differential Revision: https://reviews.llvm.org/D153453 Co-authored-by:
serge-sans-paille <sguelton@mozilla.com>
-
khei4 authored
[MemCpyOpt] precommit tests to add multi-BB stack-move optimization to check crash for D153453 (NFC) Differential Revision: https://reviews.llvm.org/D155179 Co-authored-by:
serge-sans-paille <sguelton@mozilla.com>
-
Kun Wu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D155351
-
NAKAMURA Takumi authored
-
NAKAMURA Takumi authored
Revert D150338, "[-Wunsafe-buffer-usage] Improving insertion of the [[clang::unsafe_buffer_usage]] attribute" clangAnalysis should not depend on clangSema. This reverts commit 5b012bf5.
-
Craig Topper authored
This removes another use of 'long' to mean xlen from builtins. I've also converted the types to unsigned as proposed in D154616. clmul_32 is available to RV64 as its emulation is clmul+sext.w clmulh_32 and clmulr_32 are not available on RV64 as their emulation is currently 6 instructions in the worst case.
-
Advenam Tacet authored
This commit deprecates `std::basic_string::__grow_by`, which is part of ABIv1. The function is replaced by `std::basic_string:__grow_by_without_replace`, which is not part of ABI. - The original function `__grow_by` is deprecated because it does not set the string size, therefore it may not update the size when the size is changed, and it may also not set the size at all when the string was short initially. This leads to unpredictable size value. It is not removed or changed to avoid breaking the ABI. - The commit adds `_LIBCPP_HIDE_FROM_ABI` guarded by `_LIBCPP_ABI_VERSION >= 2` to `__grow_by`. This allows the function to be used in the dylib in ABIv1 without raising the `[abi:v170000]` error and removes it from future ABIs. `_LIBCPP_HIDE_FROM_ABI_AFTER_V1` cannot be used. - Additionally, `__grow_by` has been removed from `_LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST` in `libcxx/include/__string/extern_template_lists.h`. This bugfix is necessary to implement string ASan annotations, because it mitigates the problems encountered in D132769. Reviewed By: ldionne, #libc, philnik Differential Revision: https://reviews.llvm.org/D148693
-
Nitin John Raj authored
For rv32, we test the legalization of i8, i16 and i32. For rv64, we additionally test the legalization of i64. This is the first of a series of commits aiming to legalize arithmetic instructions for RISCV. Reviewed By: craig.topper, arsenm Differential Revision: https://reviews.llvm.org/D154978
-
Jeff Niu authored
It was forgetting commas. Reviewed By: rriddle, jpienaar Differential Revision: https://reviews.llvm.org/D155348
-
Zhongyunde authored
According the discuss on D154953, we need to make the LangRef change before the optimization relied on the new behaviour: vscale_range implies vscale is a power-of-two value, parse of the attribute to reject values that are not a power-of-two. Thanks nikic for the wonderful summary of discussing on D154953: To provide a bit more context here. We would like to have power of two vscale exposed in a target-independent way, so we can make use of this in places like ValueTracking, just like we currently do the vscale range. Some options that have been discussed are: - Remove support for non-power-of-two vscales entirely. (This is my personal preference, but this is hard to undo if it turns out someone does need them.) - Add an extra attribute vscale_pow2, or a data layout property. - Make vscale_range imply power-of-two vscale, as a compromise solution (what this patch does). This would be relatively easy to turn into one of the two above at a later point. Reviewed By: paulwalker-arm, nikic, efriedma Differential Revision: https://reviews.llvm.org/D155193 -
Chris Bieneman authored
This change enables the LLDB project to begin experimenting with pull-request workflows to help identify issues was we move toward adopting pull requests. Reviewed By: tstellar, JDevlieghere Differential Revision: https://reviews.llvm.org/D155315
-
Johannes Doerfert authored
This showed up when we started to deduce readnone for the argument of __kmpc_global_thread_num. The known attributes for "getters" did not allow to read arguments, but that is sometimes the case.
-
varconst authored
`_LIBCPP_ENABLE_ASSERTIONS` was used to enable the "safe" mode in libc++. Libc++ now provides the hardened mode and the debug mode that replace the safe mode. For backward compatibility, enabling `_LIBCPP_ENABLE_ASSERTIONS` now enables the hardened mode. Note that the hardened mode provides a narrower set of checks than the previous "safe" mode (only security-critical checks that are performant enough to be used in production). Differential Revision: https://reviews.llvm.org/D154997
-
tomnatan authored
This feature was introduced in `D123492`. Doing equivalence on pointers to sort operands of commutative operations is incorrect when checking equivalence of ops in separate regions (where the lhs and rhs operands are marked as equivalent but are not the same value). It was also discussed in `D123492` and `D129480` that the correct solution would be to stable sort the operands in canonicalization (based on some numbering in the region maybe), but until that lands, reverting this change will unblock us and other users. An example of a pass that might not work properly because of this is `DuplicateFunctionEliminationPass`. Reviewed By: mehdi_amini, jpienaar Differential Revision: https://reviews.llvm.org/D154699
-
Peter Hawkins authored
[MLIR:Python] Make DenseElementsAttr.get() only request a buffer format if no explicit type was provided. Not every NumPy type (e.g., the `ml_dtypes.bfloat16` NumPy extension type) has a type in the Python buffer protocol, so exporting such a buffer with `PyBUF_FORMAT` may fail. However, we don't care about the self-reported type of a buffer if the user provides an explicit type. In the case that an explicit type is provided, don't request the format from the buffer protocol, which allows arrays whose element types are unknown to the buffer protocol to be passed. Reviewed By: jpienaar, ftynse Differential Revision: https://reviews.llvm.org/D155209
-
Shafik Yaghmour authored
In C++ we are not allowed to use designated initializers to initialize fields out of order. In some cases when diagnosing this we are crashing because we are not indexing correctly and therefore going out of bounds. This fixes: https://github.com/llvm/llvm-project/issues/63605 Differential Revision: https://reviews.llvm.org/D154675
-
Matt Arsenault authored
- Switch to generated checks - Use a different run line per denormal mode to reduce test duplication - Add test coverage for rsqrt cases - Add test coverage for repeated arcp denominator - Fix the optnone test
-
Eli Friedman authored
There was a copy-paste of the wrong field width, so the nanoseconds weren't correctly padded with zeros. Found by inspection.
-
Matt Arsenault authored
OpenCL and HIP have -cl-fp32-correctly-rounded-divide-sqrt and -fno-hip-correctly-rounded-divide-sqrt. The corresponding fpmath metadata was only set on fdiv, and not sqrt. The backend is currently underutilizing sqrt lowering options, and the responsibility is split between the libraries and backend and this metadata is needed. CUDA/NVCC has -prec-div and -prev-sqrt but clang doesn't appear to be aiming for compatibility with those. Don't know if OpenMP has a similar control.
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Nick Desaulniers authored
Update the code to more modern C++ style. Reviewed By: void, MaskRay Differential Revision: https://reviews.llvm.org/D155336
-
ziqingluo-90 authored
For a fix-it that inserts the `[[clang::unsafe_buffer_usage]]` attribute, it will lookup existing macros defined for the attribute and use the (last defined such) macro directly. Fix-its will use raw `[[clang::unsafe_buffer_usage]]` if no such macro is defined. The implementation mimics how a similar machine for the `[[fallthrough]]` attribute was implemented. Reviewed by: NoQ (Artem Dergachev) Differential revision: https://reviews.llvm.org/D150338
-
Joseph Huber authored
This is the only place that defines this prefix in a header file and was thus overriding and redefining other users of it. If we must use it in a header file, at least repsect its old values. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D155316
-
Johannes Doerfert authored
If the function is non-IPO amendable we do skip most attributes/AAs. However, if an AA has a isImpliedByIR that can deduce the attribute from other attributes, we can run those. For now, we manually enable them, if we have more later we can use some automation/flag.
-
Johannes Doerfert authored
Three tests needed manual adjustment after https://reviews.llvm.org/D148216 got reverted. See https://github.com/llvm/llvm-project/issues/63746.
-
Johannes Doerfert authored
This reverts commit 8a3fdf7b as it is broken. See https://github.com/llvm/llvm-project/issues/63746. Effectively fixes: https://github.com/llvm/llvm-project/issues/63746
-
Johannes Doerfert authored
This reverts commit 6d64faf3, as it is built on top of https://reviews.llvm.org/D148216 which is broken. See also https://github.com/llvm/llvm-project/issues/63746
-