- Jul 07, 2023
-
-
Alex Brachet authored
-
-
Denis Revunov authored
The issue was caused by the absence of placement new definition. It worked for clang and thus passed Phabricator checks, but broke when compiled with GCC on buildbot. Full problem description: https://reviews.llvm.org/D153771#4468239 Original patch description: In absence of instrumentation-file-append-pid option, global allocator uses shared pages for allocation. However, since it is a global variable, it gets COW'd after fork if instrumentation-sleep-time is used, or if a process forks by itself. This means it handles the same pages to every process which causes hash table corruption. Thus, if we want shared pages, we need to put the allocator itself in a shared page, which we do in this commit in __bolt_instr_setup. I also added a couple of assertions to sanity-check the hash table. Reviewed By: rafauler, Amir Differential Revision: https://reviews.llvm.org/D153771
-
Matthias Springer authored
This transform op runs the verifier on the targeted payload ops. It is for debugging only. Differential Revision: https://reviews.llvm.org/D154711
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Matt Arsenault authored
This avoids computing the dominator tree by removing the simplifyInstruction use. This was applying simplification with some kind of questionable load-store forwarding and looking for the global. This had to have been an ancient hack copied from previous backends. In the OpenCL case, this is always emitted as required the direct global reference anyway.
-
Nikita Popov authored
We only catch this case on the second InstCombine iteration.
-
Joachim Jenke authored
The OpenMP specification mentions that omp_test_lock and omp_test_nest_lock dispatch OMPT callbacks with ompt_mutex_test_lock and ompt_mutex_test_nest_lock for their kind respectively. Previously, the values ompt_mutex_lock and ompt_mutex_nest_lock were used. This could cause issues in application relying on the kind to correctly determine lock states. This commit changes the kind to the expected ones. Also update callback.h and OMPT tests to reflect this change. Patch prepared by Thyre Differential Review: https://reviews.llvm.org/D153028 Differential Review: https://reviews.llvm.org/D153031 Differential Review: https://reviews.llvm.org/D153032
-
Felipe de Azevedo Piovezan authored
This function does a _lot_ of different things: 1. Parses a DIE, 2. Builds an ExpressionList 3. Figures out lifetime of variable 4. Remaps addresses for debug maps 5. Handles external variables 6. Figures out scope of variables A lot of this functionality is coded in a complex nest of conditions, variables that are declared and then initialized much later, variables that are updated in multiple code paths. All of this makes the code really hard to follow. This commit attempts to improve the state of things by factoring out (3), adding documentation on how the expression list is built, and by reducing the scope of variables. Differential Revision: https://reviews.llvm.org/D154513
-
Nikita Popov authored
-
Aaron Ballman authored
This removes links to rdar, which is an internal bug tracker that the community doesn't have visibility into. See further discussion at: https://discourse.llvm.org/t/code-review-reminder-about-links-in-code-commit-messages/71847
-
Renato Golin authored
I've been trying to come up with a simple and clean implementation for ReLU. TOSA uses `clamp` which is probably the goal, but that means table-gen to make it efficient (attributes, only lower `min` or `max`). For now, `max` is a reasonable named op despite ReLU, so we can start using it for tiling and fusion, and upon success, we create a more complete op `clamp` that doesn't need a whole tensor filled with zeroes or ones to implement the different activation functions. As with other named ops, we start "requiring" type casts and broadcasts, and zero filled constant tensors to a more complex pattern-matcher, and can slowly simplify with attributes or structured matchers (ex. PDL) in the future. Differential Revision: https://reviews.llvm.org/D154703
-
Sam McCall authored
This fixes -Werror -Wdeprecated builds See D153469
-
Matt Arsenault authored
The problem here is overflow or underflow which would have occurred in the inner operation, which the exponent offsetting avoids. We can do this if we know the two exponents are in the same direction, or reassoc flags allow unsafe reassociates.
-
Matt Arsenault authored
-
Matt Arsenault authored
Pass all the optional arguments to enable assumes.
-
iambrj authored
This patch implements range and domain composition for PresburgerRelations Reviewed By: Groverkss Differential Revision: https://reviews.llvm.org/D154444
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
Nico Weber authored
This reverts commit 460a2244. It breaks building on macOS, and it was landed with a review URL pointing to some Facebook-internal service. Also reverts a bunch of follow-ups: Revert "[BOLT][DWARF] Don't check string offsets" This reverts commit f9d6f48c. Revert "[BOLT][DWARF] Change to process and write out TUs first then CUs in batches" This reverts commit 88e95c1e. Revert "[BOLT][DWARF] Output DWO files as they are being processed" This reverts commit 46ca2e3f. Revert "[BOLT][DWARF] Don't check string offsets" This reverts commit cfe4a4b0. Revert "[BOLT][DWARF] Numerous fixes for a new DWARFRewriter" This reverts commit 2701a661.
-
Joachim Jenke authored
OpenMP 5.1 replaced callback ompt_callback_master_t by ompt_callback_masked_t. In order to stick to the standard, the implementation is updated accordingly. Patch prepared by Semih Burak Differential Revision: https://reviews.llvm.org/D112798
-
Joachim Jenke authored
In the functions ompt_multiplex_get_own_ompt_data and ompt_multiplex_get_client_ompt_data in addition to data being NULL, also the void pointer field "ptr" of "data" could be NULL, leading to a subsequent segfault. This patch add the corresponding checks. Patch prepared by Semih Burak Differential Revision: https://reviews.llvm.org/D112806
-
yronglin authored
[AST] Stop evaluate constant expression if the condition expression which in switch statement contains errors This fix issue: https://github.com/llvm/llvm-project/issues/63453 ``` constexpr int foo(unsigned char c) { switch (f) { case 0: return 7; default: break; } return 0; } static_assert(foo('d')); ``` Reviewed By: aaron.ballman, erichkeane, hokein Differential Revision: https://reviews.llvm.org/D153296
-
Joachim Jenke authored
The semantic of depend(out:omp_all_memory) is quite similar to taskwait in that it separates all tasks (with dependency) created before an all_memory-task from all tasks (with dependency) created after an all_memory-task. Only a single of such tasks can execute at a time. Similar to taskwait, we have a CV (AllMemory[1]) in the generating task to express the dependency sink semantic of an all_memory-task. In addition, AllMemory[0] describes the dependency source semantic of an all_memory-task. All tasks with dependency create an HB-arc towards the sink and terminate an HB-arc from the source. Since we expect that not many applications will use such dependency, the support for handling the synchronization semantic is off by default and can be turned on using ARCHER_OPTION="all_memory=1". The most costly part is the precautionary posting of an HB-arc towards the sink, which represents a potentially contentious write from all concurrently executing sibling tasks. A warning is printed at runtime, when the option is off while such dependency is observed. In most cases the lazy activation will still lead to false alerts. Differential Revision: https://reviews.llvm.org/D111895
-
Balazs Benics authored
-
Joachim Jenke authored
omp_all_memory currently has no representation in OMPT. Adding new dependency flags as suggested by omp-lang issue #3007. Differential Revision: https://reviews.llvm.org/D111788
-
Matt Arsenault authored
-
Matt Arsenault authored
Makes assumes work.
-
Lucas Prates authored
This implements the new value for the `__ARM_FEATURE_RCPC` feature macro, which was introduced to the ACLE to indicate the availability of FEAT_LRCPC3. More details can be found on: https://github.com/ARM-software/acle/blob/main/main/acle.md#rcpc Reviewed By: tmatheson Differential Revision: https://reviews.llvm.org/D153130
-
Lucas Prates authored
This implements the DAG patterns to enable instruction selection for the LDAP1 and STL1 instructions from FEAT_LRCPC3. The instructions should match the following combinations: * Aqcuiring atomic load + vector insert element for LDAP1. * Vector extract element + releasing atomic store for STL1. Patterns have also been added to cope with the DAG structure found when dealing with 1-lane sub-vectors. Reviewed By: tmatheson, efriedma Differential Revision: https://reviews.llvm.org/D153129
-
Lucas Prates authored
This adds new intrisics to support the LDAP1 and STL1 Advanced SIMD (Neon) instructions introduced as part of FEAT_LRCPC3. The new intrinsics `vldap1(q)_lane`/`vstl1(q)_lane` generate IR code similar to the existing `vld1(q)_lane/st1(q)_lane` ones, but capturing the difference in the atomic release/acquire memory model. The LLVM code generation changes to ensure that this instruction pair is lowered to the correct LDAP1/STL1 instructions will be covered in a separate commit. Based on a patch by Sam Elliott. Reviewed By: tmatheson Differential Revision: https://reviews.llvm.org/D153128
-
Corentin Jabot authored
This patch proposes to handle in an uniform fashion the parsing of strings that are never evaluated, in asm statement, static assert, attrributes, extern, etc. Unevaluated strings are UTF-8 internally and so currently behave as narrow strings, but these things will diverge with D93031. The big question both for this patch and the P2361 paper is whether we risk breaking code by disallowing encoding prefixes in this context. I hope this patch may allow to gather some data on that. Future work: Improve the rendering of unicode characters, line break and so forth in static-assert messages Reviewed By: aaron.ballman, shafik Differential Revision: https://reviews.llvm.org/D105759
-
Balazs Benics authored
The `consider-single-element-arrays-as-flexible-array-members` analyzer option was deprecated in clang-16, and now removed from clang-17 as promised in https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html#static-analyzer This shouldn't change observable behavior. Differential Revision: https://reviews.llvm.org/D154481
-
David Sherwood authored
In the LTO pipeline we run InstCombine after LICM, which is different to what we normally do without LTO. This has the effect of undoing all the great work done by LICM to reduce the cost of the loop when it hoists the fdiv out and replaces it with fmul. When InstCombine runs after LICM it puts the fdiv straight back which, on AArch64 at least, is darn expensive. You can observe this problem in the SPEC2017 benchmark parest if you build with "-Ofast -flto" and the loop-vectoriser uses an unroll factor of 1, which is what often happens when tail-folding is enabled. This is also a problem for scalar loops, or indeed any loop where there is only one use of the preheader fdiv result in the loop. See InstCombinerImpl::visitFMul for the code that sinks the fdiv. I've attempted to fix this by adding another LICM pass for Full LTO after InstCombine. The alternative is to stop InstCombine from sinking the fdiv into loops. See D87479 for a previous discussion on this issue. Differential Revision: https://reviews.llvm.org/D143631
-
David Spickett authored
This seems to fail every time there is some change in MLIR, but not always. For example: https://lab.llvm.org/buildbot/#/builders/65/builds/10415
-
Guillaume Chatelet authored
For machines with a lot of cores, hardware prefetchers can saturate the memory bus when utilization is high. In this case it is desirable to turn off the hardware prefetcher completely. This has a big impact on the performance of memory functions such as `memcpy` that rely on the fact that the next cache line will be readily available. This patch adds the 'LIBC_COPT_MEMCPY_X86_USE_SOFTWARE_PREFETCHING' compile time option that generates a version of memcpy with software prefetching. While not fully restoring the original performances it mitigates the impact to an acceptable level. Reviewed By: rtenneti Differential Revision: https://reviews.llvm.org/D154494
-
Florian Hahn authored
This patch prevents invalid load groups from being formed, where a load needs to be moved across a conflicting store. Once we hit a store that conflicts with a load with an existing interleave group, we need to stop adding earlier loads to the group, as this would force hoisting the previous stores in the group across the conflicting load. To detect such cases, add a new CompletedLoadGroups set, which is used to keep track of load groups to which no earlier loads can be added. Fixes https://github.com/llvm/llvm-project/issues/63602 Reviewed By: anna Differential Revision: https://reviews.llvm.org/D154309
-
Sam McCall authored
This reverts commit 7a72ce98. Test problems were due to unspecified order of function arg evaluation. Reland "[dataflow] Replace most BoolValue subclasses with references to Formula (and AtomicBoolValue => Atom and BoolValue => Formula where appropriate)" This properly frees the Value hierarchy from managing boolean formulas. We still distinguish AtomicBoolValue; this type is used in client code. However we expect to convert such uses to BoolValue (where the distinction is not needed) or Atom (where atomic identity is intended), and then fold AtomicBoolValue into FormulaBoolValue. We also distinguish TopBoolValue; this has distinct rules for widen/join/equivalence, and top-ness is not represented in Formula. It'd be nice to find a cleaner representation (e.g. the absence of a formula), but no immediate plans. For now, BoolValues with the same Formula are deduplicated. This doesn't seem desirable, as Values are mutable by their creators (properties). We can probably drop this for FormulaBoolValue immediately (not in this patch, to isolate changes). For AtomicBoolValue we first need to update clients to stop using value pointers for atom identity. The data structures around flow conditions are updated: - flow condition tokens are Atom, rather than AtomicBoolValue* - conditions are Formula, rather than BoolValue Most APIs were changed directly, some with many clients had a new version added and the existing one deprecated. The factories for BoolValues in Environment keep their existing signatures for now (e.g. makeOr(BoolValue, BoolValue) => BoolValue) and are not deprecated. These have very many clients and finding the most ergonomic API & migration path still needs some thought. Differential Revision: https://reviews.llvm.org/D153469
-
Yeting Kuo authored
This constructs a proper memory operand for riscv_vsoxei_mask and riscv_vsuxei_mask. I think they are missed in D147119. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D154694
-