- Jan 25, 2023
-
-
Jean Perier authored
Use runtime Assign to deal with the copy (and the temporary creation, so that this code can deal with polymorphic temps without any change). Using Assign for the copy is desired here since the copy happens when the data is not contiguous, and it happens inside an if/then which makes it hard to optimize. See https://github.com/llvm/llvm-project/commit/2b60ed405b8110b20ab2e383839759ea34003127 for more details (note that, contrary to this last commit, the code at hand is only dealing with copy-in/copy-out, it is not intended to deal with preparing VALUE arguments). Differential Revision: https://reviews.llvm.org/D142475
-
David Sherwood authored
Adds intrinsics for the following SME2 instructions: * fclamp (2 and 4 vectors) * sclamp (2 and 4 vectors) * uclamp (2 and 4 vectors) I've added these new instructions to the existing sve2p1-* tests because although they are included as part of SME2 they are still SVE-like, in that they only operate on SVE vectors. NOTE: These intrinsics are still in development and are subject to future changes. Differential Revision: https://reviews.llvm.org/D142355
-
Timm Bäder authored
Implement mul, div, rem, etc. compound assign operators. Differential Revision: https://reviews.llvm.org/D137071
-
Timm Bäder authored
Just like we do (or will do) for floating types, we need to take into acocunt that the LHSComputationType, ResultType and type of the expression (what we ultimately store) might be different. Do this by emitting cast ops before and after doing the computation. This fixes the test failures introduced by 490e8214 on big endian machines. Differential Revision: https://reviews.llvm.org/D142328
-
Nicolai Hähnle authored
Remove global_ir_{prefix,prefix_regexp} (one of which is misnamed), since they are really quite redundant with ir_{prefix,regexp} and default the is_before_functions argument, which basically just adds noise to the table of NamelessValues. Differential Revision: https://reviews.llvm.org/D142451 -
Nicolai Hähnle authored
It's not clear to me how to write a test for this. The tests run in an environment where the tools may not be in PATH, and so the existing custom-tool.test needs to use --tool-binary when invoking update_test_checks.py. But it can't do so without also using --tool. This change does fix a problem though with using update_any_test_checks.py in an environment where the tools *are* available in PATH. Differential Revision: https://reviews.llvm.org/D142450
-
Pavel Kosov authored
Commit 92f0e4cc introduced test file with name TestChangeValue.py, which leads to test failure because there already is a test files with the same name In this commit a newly added file is renamed to fix this failure
-
Nikita Popov authored
As promised, typed pointers are no longer supported on the main branch, as a matter of policy.
-
Piotr Sobczak authored
- Simplify concatenation - Common up expressions
-
Jean Perier authored
These operations implement the optional copy of a non contiguous variable into a temporary before a call, and the copy back from the temporary after the call. Differential Revision: https://reviews.llvm.org/D142342
-
Matthias Springer authored
This can be a pre-processing for bufferization and allows for more efficient lowerings without an alloc. Differential Revision: https://reviews.llvm.org/D142206
-
Valentin Clement authored
`PointerAssociateRemapping` expect a descriptor holding a newRank x 2 array of int64. The previous lowering was wrong. Adapt the lowering to fit the expectation of the runtime. Use the `bounds` to get the rank. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D142487
-
Siva Chandra Reddy authored
-
Pavel Kosov authored
Currently in some cases lldb reports stop reason as "step out" or "step over" (from thread plan completion) instead of "breakpoint", if the user breakpoint happens to be set on the same address. The part of https://github.com/llvm/llvm-project/commit/f08f5c99262ff9eaa08956334accbb2614b0f7a2 seems to overwrite internal breakpoint detection logic, so that only the last breakpoint for the current stop address is considered. Together with step-out plans not clearing its breakpoint until they are destrouyed, this creates a situation when there is a user breakpoint set for address, but internal breakpoint makes lldb report a plan completion stop reason instead of breakpoint. This patch reverts that internal breakpoint detection logic to consider all breakpoints Reviewed By: jingham Differential Revision: https://reviews.llvm.org/D140368
-
Kazu Hirata authored
The arguments to PowerOf2Ceil in this patch are all known to be nonzero, so we can safely use llvm::bit_ceil here.
-
Guillaume Chatelet authored
This implements the same behavior as D141997 but makes sure that the same detection mechanism is used between CMake and source code. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D142108
-
Pavel Kosov authored
Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D140624
-
Max Kazantsev authored
The motivation is that 'createInvariantCond' unconditionally builds icmp in the loop block, while it could always do it in preheader. Build it in preheader instead. Patch by Aleksandr Popov! Differential Revision: https://reviews.llvm.org/D141994 Reviewed By: nikic
-
Pavel Kosov authored
Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D140623
-
Arsen Arsenović authored
GCC rejects ABI tags on non mangled functions, as they would otherwise be a no-op. This commit replaces such instances with equivalent _LIBCPP_HIDE_FROM_ABI constants but without ABI tags attached. .../include/c++/v1/__support/musl/xlocale.h:28:68: error: 'abi_tag' attribute applied to extern "C" declaration 'long long int strtoll_l(const char*, char**, int, locale_t)' 28 | strtoll_l(const char *__nptr, char **__endptr, int __base, locale_t) { | ^ Bug: https://bugs.gentoo.org/869038 Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D142415 -
Kazu Hirata authored
At the call site of findFirstSet, ZMask | (1 << DstIdx) always have exactly 3 bits set, and they are all among the 4 least significant bits, so (ZMask | (1 << DstIdx)) ^ 15 has exactly one bit set. Since the argument to findFirstSet is nonzero, we can safely switch to llvm::countr_zero.
-
Andrew Young authored
This patch adds three functions to the C API: - mlirAttributeIsALocation: returns true if the attribute is a LocationAttr, false otherwise. - mlirLocationGetAttribute: returns the underlying LocationAttr of a Location. - mlirLocationFromAttribute: gets a Location from a LocationAttr. Reviewed By: mikeurbach, Mogball Differential Revision: https://reviews.llvm.org/D142182
-
Siva Chandra Reddy authored
Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D142509
-
Tom Stellard authored
-
Kazu Hirata authored
If we know that x is nonzero and not a power of 2, then llvm::findLastSet(x) + 1 is the index of the bit just above the highest set bit in x. That is, 1 << (llvm::findLastSet(x) + 1) is the same as llvm::bit_ceil(x). Since llvm::bit_ceil is a nop on a power of 2, we can unconditionally call llvm::bit_ceil. The end result actually matches the comment.
-
Kazu Hirata authored
If x is known to be nonzero, findLastSet(x) returns the index of the highest set bit counting from the LSB, so 1 << findLastSet(x) is the same as llvm::bit_floor(x).
-
Min-Yih Hsu authored
Sometimes memory addresses are treated as immediate values. Thus immediate operands have to be relocatable. Differential Revision: https://reviews.llvm.org/D137902
-
Min-Yih Hsu authored
32-bit immediates require special cares because they go across the normal word (16 bits) boundaries. This patch also fixes some incorrect disassembler test cases. Differential Revision: https://reviews.llvm.org/D142080
-
Min-Yih Hsu authored
Just like the encoder directive for variable-length instructions, this patch adds a new decoder directive to allow custom decoder function on an operand. Right now, due to the design of DecoderEmitter each operand can only have a single custom decoder in a given instruction. Differential Revision: https://reviews.llvm.org/D142079
-
Shivam Gupta authored
zero-call-used-regs pass generate an xor instruction to help mitigate return-oriented programming exploits via zeroing out used registers. But in this below test case with -g option there is dbg.value instruction associating the register with the debug-info description of the formal parameter d, which makes the register appear used, therefore it zero the register edi in -g case and makes binary different from without -g option. The pass should be looking only at the non-debug uses. $ cat test.c char a[]; int b; __attribute__((zero_call_used_regs("used"))) char c(int d) { *a = ({ int e = d; b; }); } This fixes https://github.com/llvm/llvm-project/issues/57962. Differential Revision: https://reviews.llvm.org/D138757 -
Douglas Yung authored
This reverts commit de122cb9. This change causes assertion failures in many of our internal tests. I have filed #60280 for this issue.
-
Carlos Galvez authored
This reverts commit 4240c914. The current solution won't work since getLocalOrGlobal does not support returning a vector. More work needs to be put into ensuring both the local and global way of setting the options are available during the transition period.
-
Mehdi Amini authored
-
Peter Rong authored
This rewrite fixes https://github.com/llvm/llvm-project/issues/59316. Previously LowerSwitch uses int64_t, which will crash on case branches using integers with more than 64 bits. Using APInt fixes this problem. This patch also includes a test Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D140747
-
Joshua Cao authored
As discussed in https://github.com/llvm/llvm-project/issues/59901 This change is not NFC. There is one SCEV and EarlyCSE test that have an improved analysis/optimization case. Rest of the tests are not failing. I've mostly only added cleanup to SCEV since that is where this issue started. As a follow up, I believe there is more cleanup opportunity in SCEV and other affected passes. There could be cases where there are missed registerAssumption of guards, but this case is not so bad because there will be no miscompilation. AssumptionCacheTracker should take care of deleted guards. Differential Revision: https://reviews.llvm.org/D142330
-
Shilei Tian authored
In Clang, in order to determine the type of `omp_allocator_handle_t`, Clang checks the type of those predefined allocators. The first one it checks is `omp_null_allocator`. If the language is C, and the system is 64-bit, what Clang gets is a `int`, instead of an enum of size 8, given the fact how we define `omp_allocator_handle_t` in `omp.h`. If the allocator is captured by a region, let's say a parallel region, the allocator will be privatized. Because Clang deems `omp_allocator_handle_t` as an `int`, it will first cast the value returned by the runtime library (for `libomp` it is a `void *`) to `int`, and then in the outlined function, it casts back to `omp_allocator_handle_t`. This two casts completely shaves the first 32-bit of the pointer value returned from `libomp`, and when the private "new" pointer is fed to another runtime function `__kmpc_allocate()`, it causes segment fault. That is the root cause of PR54082. I have no idea why `-fno-pic` could hide this bug. In this patch, we detect `omp_allocator_handle_t` using roughly the same method as `omp_event_handle_t`, by looking it up into the identifier table. Fix #54082. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D142297
-
Jordan Rupprecht authored
LLDB only supports Python3 now, so the `six` shim for Python2 is no longer necessary. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D142140
-
Arthur Eubanks authored
Otherwise we may be inserting a decl into a DeclContext that's not fully defined yet. This simplifies/removes some clang AST node creation code. Instead, use clang::printTemplateArgumentList(). Reviewed By: Michael137 Differential Revision: https://reviews.llvm.org/D142413
-
Joseph Huber authored
Summary: This test has a negative check for an extra file. it turns out that sometimes the temp name can match it. Be more specific with it.
-
Shilei Tian authored
When `libomp` is initialized, it creates a temp file in `/dev/shm` to store registration flag. Some systems, like Android, don't have `/dev/shm`, then this feature is disabled by the macro `KMP_USE_SHM`, though most Linux distributions have that. However, some customized distribution, such as the one reported in https://github.com/llvm/llvm-project/issues/53955, doesn't support it either. It causes a core dump. In this patch, if it is the case, we will try to create a temporary file in `/tmp`, and if it still doesn't make it, then we error out. Note that we don't consider in this patch if the temporary directory has been set to `TMPDIR` in this patch. If `/tmp` is not accessible, we error out. Fix #53955. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D142175
-