- Jan 20, 2022
-
-
David Spickett authored
Although the memory tag commands use a memory tag manager to handle addresses, that only removes the top byte. That top byte is 4 bits of memory tag and 4 free bits, which is more than it should strictly remove but that's how it is for now. There are other non-address bit uses like pointer authentication. To ensure the memory tag manager only has to deal with memory tags, use the ABI plugin to remove the rest. The tag access test has been updated to sign all the relevant pointers and require that we're running on a system with pointer authentication in addition to memory tagging. The pointers will look like: <4 bit user tag><4 bit memory tag><signature><bit virtual address> Note that there is currently no API for reading memory tags. It will also have to consider this when it arrives. Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D117672
-
David Spickett authored
This better describes the intent of the method. Which for AArch64 is removing the top byte which includes the memory tags. It does not include pointer signatures, for those we need to use the ABI plugin. The rename makes this a little more clear. It's a bit awkward that the memory tag manager is removing the whole top byte not just the memory tags but it's an improvement for now. Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D117671
-
Florian Hahn authored
Similar to the migration of or-folding to FoldOr, there are a few cases where the fold in IRBuilder::CreateAnd triggered directly. Those have been updated. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D117431
-
Valentin Clement authored
-
Casey Carter authored
... rather than using `__has_builtin` directly. This both (1) allows a compiler that doesn't speak `__has_builtin` to workaround with preprocessor magic, and (2) avoids diagnostics about things that look like function like macros after `#if` but are not.
-
eopXD authored
Under ASTContext, clang only copies the features from the options with Target->initFeatureMap, and no implications is done there. This makes clang_cc1 fail to imply into `zve32x` for the vector extension, and test cases will have to add ` -target-feature +experimental-zve32x` in order to work. This patch fixes it. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D113336
-
Valentin Clement authored
Fix header guard to fit other files. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D117662
-
Matthias Springer authored
This commit is the first step towards unifying core bufferization and One-Shot Bufferize. This commit does not move over the implementations of BufferizableOpInterface yet. This will be done in separate commits. This change does also not move the unit tests yet. The tests will be moved together with op interface implementations and split into separate files. Differential Revision: https://reviews.llvm.org/D117641
-
David Spickett authored
Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D117693
-
Victor Perez authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D117557
-
Marek Kurdej authored
Also, add test case from https://github.com/llvm/llvm-project/issues/33044. This was actually fixed in https://github.com/llvm/llvm-project/commit/480a1fab72f4e367a5986d572914d252c318431d, but there were no tests for delete.
-
Nikita Popov authored
This is a recommit of the patch without changes. The reason for the revert has been addressed in D117679. ----- The user scanning loop above looks through pointer casts, so we also need to strip pointer casts in the capture check. Previously the source was incorrectly considered not captured if a bitcast was passed to the call.
-
Nikita Popov authored
This is a recommit of the patch without changes. The reason for the revert has been addressed in D117679. ----- Call slot optimization is currently supposed to be prevented if the call can capture the source pointer. Due to an implementation bug, this check currently doesn't trigger if a bitcast of the source pointer is passed instead. I'm somewhat afraid of the fallout of fixing this bug (due to heavy reliance on call slot optimization in rust), so I'd like to strengthen the capture reasoning a bit first. In particular, I believe that the capture is fine as long as a) the call itself cannot depend on the pointer identity, because neither dest has been captured before/at nor src before the call and b) there is no potential use of the captured pointer before the lifetime of the source alloca ends, either due to lifetime.end or a return from a function. At that point the potentially captured pointer becomes dangling. Differential Revision: https://reviews.llvm.org/D115615
-
Richard authored
Restore a fix to the list of checks that was undone by a recent commit.
-
Chenbing.Zheng authored
RV32: fsl, fsr, fsri RV64: fsl, fsr, fsri, fslw, fsrw, fsriw Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D117468
-
Nikita Popov authored
Call slot optimization currently merges the metadata between the call and the load. However, we also need to merge in the metadata of the store. Part of the reason why we might have gotten away with this previously is that usually the load and the store are the same instruction (a memcpy), this can only happen if call slot optimization occurs on an actual load/store pair. This addresses the issue reported in https://reviews.llvm.org/D115615#3251386. Differential Revision: https://reviews.llvm.org/D117679
-
Nikita Popov authored
The memory returned by the Allocate() function is also otherwise accessible -- and is indeed accessed by the DestroyAll() method of SpecificBumpPtrAlloactor. This is a violation of the noalias return contract. This should address the issue reported in https://reviews.llvm.org/D116728#3252464. Differential Revision: https://reviews.llvm.org/D117664
-
Jez Ng authored
-
Jino Park authored
Fixes https://github.com/llvm/llvm-project/issues/44601. This patch handles a bug when parsing a below example code : ``` template <class> class S; template <class T> bool operator<(S<T> const &x, S<T> const &y) { return x.i < y.i; } template <class T> class S { int i = 42; friend bool operator< <>(S const &, S const &); }; int main() { return S<int>{} < S<int>{}; } ``` which parse `< <>` as `<< >`, not `< <>` in terms of tokens as discussed in discord. 1. Add a condition in `tryMergeLessLess()` considering `operator` keyword and `>` 2. Force to leave a whitespace between `tok::less` and a template opener 3. Add unit test Reviewed By: MyDeveloperDay, curdeius Differential Revision: https://reviews.llvm.org/D117398
-
eopXD authored
`zve` is the new standard vector extension to specify varying degrees of vector support for embedding processors. The `zve` extension is related to the `zvl` extension and other updates that are added in v1.0. According to https://github.com/riscv-non-isa/riscv-c-api-doc/pull/21, Clang defines macro `__riscv_v_max_elen`, `__riscv_v_max_elen_fp` for `zve` and it can be used by applications that uses the vector extension. Authored by: Zakk Chen <zakk.chen@sifive.com> @khchen Co-Authored by: Eop Chen <eop.chen@sifive.com> @eopXD Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D112408
-
Lang Hames authored
-
Lang Hames authored
-
Lang Hames authored
Calls to JITDylib's getDFSLinkOrder and getReverseDFSLinkOrder methods (both static an non-static versions) are now valid to make on defunct JITDylibs, but will return an error if any JITDylib in the link order is defunct. This means that platforms can safely lookup link orders by name in response to jit-dlopen calls from the ORC runtime, even if the call names a defunct JITDylib -- the call will just fail with an error.
-
Fangrui Song authored
-
Jonas Devlieghere authored
If we have no timestamp (0), don't print the corresponding warning. The binary holder already successfully ignores these cases, but the warning for swift interface files was lacking it. rdar://86036385 Differential revision: https://reviews.llvm.org/D117333
-
Johannes Doerfert authored
Once we linked in math files, potentially even if we link in only other "system libraries", we want to optimize the code again. This is not only reasonable but also helps to hide various problems with the missing attribute annotations in the math libraries. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D116906
-
Jim Lin authored
It seems that implementation of Bt refered from x86. In M68k, Bt(BT) should be renamed to Btst(BTST). Reviewed By: myhsu Differential Revision: https://reviews.llvm.org/D117534
-
Johannes Doerfert authored
In the OpenMC app we saw `omp target update` spending an awful lot of time in the shadow map traversal without ever doing any update there. There are two cases that allow us to avoid the traversal completely. The simplest thing is that small updates cannot (reasonably) contain an attached pointer part. The other case requires to track in the mapping table if an entry might contain an attached pointer as part. Given that we have a single location shadow map entries are created, the latter is actually fairly easy as well. Differential Revision: https://reviews.llvm.org/D113124
-
Johannes Doerfert authored
Atomic handling of map clauses was introduced to comply with the OpenMP standard (see D104418). However, many apps won't need this feature which can be costly in certain situations. To allow for applications to opt-out we now introduce the `LIBOMPTARGET_MAP_FORCE_ATOMIC` environment flag that voids the atomicity guarantee of the standard for map clauses again, shifting the burden to the user. This patch also de-duplicates the code that introduces the events used to enforce atomicity as a cleanup. Differential Revision: https://reviews.llvm.org/D117627
-
Heejin Ahn authored
D108960 added support for SjLj using Wasm EH instructions, which we call Wasm SjLj going forward. (We call the old SjLj Emscripten SjLj) But it did not support using Wasm EH and Wasm SjLj together. So far users of Wasm EH had to use Wasm EH with Emscripten SjLj, which had a certain limitation and it suffered from bigger code size increases as well. This enables using Wasm EH and Wasm SjLj together. 1. This redirects `catchswitch` and `cleanupret` that unwind to caller to `catch.dispatch.longjmp` BB, which is a `catchswitch` BB that handles longjmps. 2. D108960 converted all longjmpable `call`s to `invokes` that unwind to `catch.dispatch.longjmp`. This CL checks if the `call` is embedded within another `catchpad`, and if so, makes it unwind to its nearest parent's unwind destination, rather than `catch.dispatch.longjmp`. This is necessary to preserve the scoping structure. Reviewed By: dschuff Differential Revision: https://reviews.llvm.org/D117610
-
Fangrui Song authored
StringRefZ does not improve performance. Non-local symbols always have eagerly computed nameSize. Most local symbols's lengths will be updated in either: * shouldKeepInSymtab * SymbolTableBaseSection::addSymbol Its benefit is offsetted by strlen in every call site (sums up to 5KiB code in a release x86-64 build), so using StringRefZ may be slower. In a -s link (uncommon) there is minor speedup, like ~0.3% for clang and chrome. Reviewed By: alexander-shaposhnikov Differential Revision: https://reviews.llvm.org/D117644
-
River Riddle authored
-
Luo, Yuanke authored
Differential Revision: https://reviews.llvm.org/D116363
-
Ben Shi authored
Reviewed By: aykevl Differential Revision: https://reviews.llvm.org/D116493
-
Ben Shi authored
Reviewed By: aykevl Differential Revision: https://reviews.llvm.org/D115987
-
Hsiangkai Wang authored
The bug is reported in https://github.com/llvm/llvm-project/issues/53016 . Authored-by:
Kito Cheng <kito.cheng@sifive.com> Differential Revision: https://reviews.llvm.org/D117738
-
Nico Weber authored
-
minglotus-6 authored
-
Mircea Trofin authored
-
Adrian Tong authored
AArch64 supports unsigned shift right and accumulate. In case we see a unsigned shift right followed by an OR. We could turn them into a USRA instruction, given the operands of the OR has no common bits. Differential Revision: https://reviews.llvm.org/D114405
-