- Mar 02, 2024
-
-
erichkeane authored
Exception handling SHOULD be possible depending on codegen (and if not, we can make it trap and add a warning when we make that decision), but throwing out of a compute construct is ill formed. This patch adds an error for a 'throw' that isn't in a 'try' scope. This error is imperfect as it won't diagnose a 'throw' that escapes its 'try', or one in a separate function, but it catches the obvious mistakes. The other cases will need to be handled as runtime failures.
-
Peter Klausler authored
When the result of real input editing underflows to zero, return -0. when the input field had a minus sign.
-
alx32 authored
Move symbol names from directly under `objc` scope to `objc::symbol_names`. Ex: `objc::klass` -> `objc::symbol_names::klass` Co-authored-by:Alex B <alexborcan@meta.com>
-
Peter Klausler authored
f18's module files are Fortran with a leading header comment containing the module file format version and a hash of the following contents. This hash is currently used only to protect module files against corruption and truncation. Extend the use of these hashes to catch or avoid some error cases. When one module file depends upon another, note its hash in additional module file header comments. This allows the compiler to detect when the module dependency is on a module file that has been updated. Further, it allows the compiler to find the right module file dependency when the same module file name appears in multiple directories on the module search path. The order in which module files are written, when multiple modules appear in a source file, is such that every dependency is written before the module(s) that depend upon it, so that their hashes are known. A warning is emitted when a module file is not the first hit on the module file search path. Further work is needed to add a compiler option that emits (larger) stand-alone module files that incorporate copies of their dependencies rather than relying on search paths. This will be desirable for application libraries that want to ship only "top-level" module files without needing to include their dependencies. Another future work item would be to admit multiple modules in the same compilation with the same name if they have distinct hashes.
-
Joseph Huber authored
Summary: We use `add_llvm_library` as a shorthand for setting up all the dependencies and libraries we need for the OpenMP offloading runtime as they depend on a lot of the LLVM utilities. However, we always explicitly installed these manually. Behind the scenes the function would then install it again. This was unnoticed because until now the destinations matched. Now that we want it to optionally go into the other directory it is duplicating them. Fix this by stating that this is a build tree only library so we can handle it ourselves.
-
Noah Goldstein authored
It makes sense to split if the cost of computing `cond1` is high (proportionally to how likely `cond0` is), but it doesn't really make sense to introduce a second branch if its only a few instructions. Splitting can also get in the way of potentially folding patterns. This patch introduces some logic to try to check if the cost of computing `cond1` is relatively low, and if so don't split the branches. Modest improvement on clang bootstrap build: https://llvm-compile-time-tracker.com/compare.php?from=79ce933114e46c891a5632f7ad4a004b93a5b808&to=978278eabc0bafe2f390ca8fcdad24154f954020&stat=cycles Average stage2-O3: 0.59% Improvement (cycles) Average stage2-O0-g: 1.20% Improvement (cycles) Likewise on llvm-test-suite on SKX saw a net 0.84% improvement (cycles) There is also a modest compile time improvement with this patch: https://llvm-compile-time-tracker.com/compare.php?from=79ce933114e46c891a5632f7ad4a004b93a5b808&to=978278eabc0bafe2f390ca8fcdad24154f954020&stat=instructions%3Au Note that the stage2 instruction count increases is expected, this patch trades instructions for decreasing branch-misses (which is proportionately lower): https://llvm-compile-time-tracker.com/compare.php?from=79ce933114e46c891a5632f7ad4a004b93a5b808&to=978278eabc0bafe2f390ca8fcdad24154f954020&stat=branch-misses NB: This will also likely help for APX targets with the new `CCMP` and `CTEST` instructions. Closes #81689
-
Noah Goldstein authored
-
Alexandros Lamprineas authored
This patch allows using the name "rdma" as an alias for "rdm". The name makes its way to target attributes as well as the command line via the -march and -mcpu options. The motivation was originally to support this in Function Multi Versioning but it also makes sense to align with GCC on the command line.
-
rayroudc authored
Multiple formatting operator tests are commented. This change enables them again. [PR506629](https://llvm.org/PR50629) fixed by [D153798](https://reviews.llvm.org/D153798). Tests in `ConfigurableSpaceBeforeParens` have the same behavior as before [D110833](https://reviews.llvm.org/D110833). Update the test for function declaration and definition, as changed in [D114696](https://reviews.llvm.org/D114696).
-
Florian Hahn authored
This is in preparation for https://github.com/llvm/llvm-project/pull/77790 and makes it easy to add other, non-power-of-2 VFs for processing. PR: https://github.com/llvm/llvm-project/pull/82793
-
Fangrui Song authored
-
Fangrui Song authored
-
Fangrui Song authored
The code suggestion was neglected when the patch landed.
-
Fabian Schiebel authored
Previously, the function `install_bad_alloc_error_handler` was asserting that a bad_alloc error handler was not already installed. However, it was actually checking for the fatal-error handler, not for the bad_alloc error handler, causing an assertion failure if a fatal-error handler was already installed. Fixes #83040
-
Hui authored
As discussed in https://github.com/llvm/llvm-project/pull/81427/files#r1509266817 rename the variable as a separate commit
-
Michael Liao authored
- Add 'Init Undef Pass', which is target-independent now.
-
Florian Hahn authored
Exit early if MaxVF < MinVF. In that case, the loop body below will never get entered. Note that this adjusts the condition from MaxVF <= MinVF. If MaxVF == MinVF, vectorization may still be feasible (and the loop below gets entered). PR: https://github.com/llvm/llvm-project/pull/83283
-
yelleyee authored
Blank comment line afer \endverbatim malfunctions the doxygen parser. Check the "Detailed Description" section on https://llvm.org/doxygen/classllvm_1_1vfs_1_1RedirectingFileSystem.html Screenshot is attached below 
-
Simon Pilgrim authored
Equivalent to "umax(A, B) - umin(A, B)" This is just an initial correctness implementation, hopefully we can make this optimal in the future.
-
Simon Pilgrim authored
Shows cases where logical shifts of allsignbits values can be profitably converted to masks
-
Simon Pilgrim authored
-
Fangrui Song authored
g++ -flto has a diagnostic `-Wodr` about mismatched redeclarations, which even apply to `enum`. Fix #83529 Reviewers: thesamesam Reviewed By: thesamesam Pull Request: https://github.com/llvm/llvm-project/pull/83604
-
Jonas Devlieghere authored
The help output for `thread backtrace` specifies that you can pass -1 to `--count` to display all the frames. ``` -c <count> ( --count <count> ) How many frames to display (-1 for all) ``` However, that doesn't work: ``` (lldb) thread backtrace --count -1 error: invalid integer value for option 'c' ``` The problem is that we store the option value as an unsigned and the code to parse the string correctly rejects it. There's two ways to fix this: 1. Make `m_count` a signed value so that it accepts negative values and appease the parser. The function that prints the frames takes an unsigned so a negative value will just become a really large positive value, which is what the current implementation relies on. 2. Keep `m_count` unsigned and instead use 0 the magic value to show all frames. I don't really see a point in not showing any frames at all, plus that's already broken (`error: error displaying backtrace for thread: "0x0001"`). This patch implements (2) and at the same time improve the error reporting so that we print the invalid value when we cannot parse it. rdar://123881767 -
Joseph Huber authored
Summary: These functions were implemented via builtins that aren't acually supported. See https://godbolt.org/z/Wq6q6T1za. This caused the build to crash if they were included. Remove these and replace with correct implementations.
-
Alexey Bataev authored
-
Chelsea Cassanova authored
This commit adds the functionality to broadcast events using the `Debugger::eBroadcastProgressCategory` bit (https://github.com/llvm/llvm-project/pull/81169) by keeping track of these reports with the `ProgressManager` class (https://github.com/llvm/llvm-project/pull/81319). The new bit is used in such a way that it will only broadcast the initial and final progress reports for specific progress categories that are managed by the progress manager. This commit also adds a new test to the progress report unit test that checks that only the initial/final reports are broadcasted when using the new bit.
-
Alexey Bataev authored
Masked gather is very expensive operation and sometimes better to represent it as a serie of consecutive/strided loads + insertsubvectors sequences. Patch adds some basic estimation and if loads+insertsubvector is cheaper, decides to represent it in this way rather than masked gather. Reviewers: RKSimon Reviewed By: RKSimon Pull Request: https://github.com/llvm/llvm-project/pull/83481
-
sylvain-audi authored
This is in preparation for PR https://github.com/llvm/llvm-project/pull/82533. Here we Introduce a test for asan instrumentation where invalid code is output (see bug https://github.com/llvm/llvm-project/issues/64990) The `CHECK` lines are generated using `update_test_checks.py` script. The actual fix PR will udpate this test to highlight the changes in the generated code.
-
Changpeng Fang authored
WaveSizePredicate is copied from pseudo to real
-
Farzon Lotfi authored
This change adds lowering for HLSL's frac intrinsic to DXIL. This change should complete #70099
-
Alexey Bataev authored
If the graph incudes only single "gather" node with only extractelements/undefs, which used only in insertelement-based buildvector sequences, it still might be profitable to vectorize it. Need to rely on the cost model, not throw this graph away immediately. Reviewers: RKSimon Reviewed By: RKSimon Pull Request: https://github.com/llvm/llvm-project/pull/83581
-
Mircea Trofin authored
Similar to PR #83364.
-
Francesco Petrogalli authored
-
Slava Zakharin authored
For denormals we have to account for the exponent coming from the significand.
-
Farzon Lotfi authored
hlsl_intrinsics.h - add the round api DXIL.td add the llvm intrinsic to DXIL lowering mapping This change reuses llvm's existing intrinsic `__builtin_elementwise_round`\ `int_round` This change implements: #70077
-
Jay Foad authored
-
Kirill Stoimenov authored
Broke a build bot: https://lab.llvm.org/buildbot/#/builders/124/builds/9846 This reverts commit e7c3cd24.
-
Craig Topper authored
We can support these by changing the sext promotion to -zext(-C) and replacing a sgt check with ugt. Reframing the logic in terms of how the unsigned range are affected. More comments in the patch. The new cases check isLegalAddImmediate to avoid some regressions in lit tests.
-
Timm Bäder authored
If they are captured by value.
-
Fangrui Song authored
[Sema] -Wpointer-bool-conversion: suppress lambda function pointer conversion diagnostic during instantiation (#83497) I have seen two internal pieces of code that uses a template type parameter to accept any callable type (function pointer, std::function, closure type, etc). The diagnostic added in #83152 would require adaptation to the template, which is difficult and also seems unnecessary. Example: ```cpp template <typename... Ts> static bool IsFalse(const Ts&...) { return false; } template <typename T, typename... Ts, typename = typename std::enable_if<std::is_constructible<bool, const T&>::value>::type> static bool IsFalse(const T& p, const Ts&...) { return p ? false : true; } template <typename... Args> void Init(Args&&... args) { if (IsFalse(absl::implicit_cast<const typename std::decay<Args>::type&>( args)...)) { // A callable object convertible to false is either a null pointer or a // null functor (e.g., a default-constructed std::function). empty_ = true; } else { empty_ = false; new (&factory_) Factory(std::forward<Args>(args)...); } } ```
-