- Jan 12, 2023
-
-
Fangrui Song authored
-
Fangrui Song authored
-
Francis Visoiu Mistrih authored
First, sink the transposes to the operands to simplify redudant ones. Then, lift them to reduce the number of realized transposes. ``` (A + B)^T -> A^T + B^T -> (A + B)^T ``` See tests for more examples. Differential Revision: https://reviews.llvm.org/D133657
-
Fangrui Song authored
-
Alex Brachet authored
-
Alexander Yermolovich authored
Changed contribution data structure to 64 bit. I added the 32bit and 64bit accessors to make it explicit where we use 32bit and where we use 64bit. Also to make sure sure we catch all the cases where this data structure is used. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D139379
-
Sami Tolvanen authored
With CONFIG_GCOV_KERNEL, the Linux kernel indirectly calls the __llvm_gcov_* functions generated by LLVM. With -fsanitize=kcfi, these calls are made from instrumented code and fail indirect call checks as they don't have !kcfi_type metadata. Similarly to D138945, set type metadata for these functions to allow GCOV and KCFI to be both enabled. Link: https://github.com/ClangBuiltLinux/linux/issues/1778 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D141444
-
Alexander Yermolovich authored
This reverts commit fa3fa4d0.
-
spupyrev authored
We want to use profile inference (profi) in BOLT for stale profile matching. This is the second change for existing usages of profi (e.g., CSSPGO): (i) Added the ability to provide (estimated) jump weights for the algorithm. The goal of the algorithm is to create a valid control flow for a given function (that is, one in which incoming counts equal outgoing counts for every basic block while minimally modifying the original input block and jump weights). The input jump weights will be provided based on collected LBR profiles in BOLT. (ii) Added the corresponding options to ProfiParams. (iii) Slightly modified / simplified the construction of the flow network in profi so as it utilizes fewer auxiliary nodes. This is done by introducing parallel edges to the network (which is supported by MMF) and reduces the size of the network from 3*|V| to 2*|V|, where |V| is the number of basic blocks in the function. **Inference (profile quality) impact:** The diff is supposed to be a no-op for the inferred counts. However, our implementation of MCF is not fully deterministic and might return different results depending on the input network model. Since we changed the model construction, there are a few differences in comparison to the original implementation. I checked manually on an internal benchmark and see a minor difference (+/- 1 count for certain basic blocks) in just a dozen of instances (out of 10000+ input functions). Hence, the diff is highly unlikely to have an impact for existing prod workloads. **Runtime impact:** I measure up to 10% speedup for block-only (ie CSSPGO/AutoFDO) inference and up to 50% speedup for block+jump inference (ie BOLT) in comparison to the original unoptimized version. Reviewed By: hoy Differential Revision: https://reviews.llvm.org/D139870
-
Stanislav Mekhanoshin authored
I do not believe any code can hit this, but these do not give a uniform answer with all unifirm sources. Differential Revision: https://reviews.llvm.org/D141544
-
Jez Ng authored
Skips the divide operation which is generally expensive. Not that it matters in this diff, the code changed is not particularly hot, but just for principle & consistency... Reviewed By: #lld-macho, oontvoo, MaskRay Differential Revision: https://reviews.llvm.org/D141461
-
Arthur O'Dwyer authored
Releasing the mutex before the call to notify_all is an optimization. This optimization cannot be used here. The thread waiting on the condition might destroy the associated resources — mutex + condition variable — and the notifier thread will access an destroyed variable — the condition variable. In fact, notify_all_at_thread_exit is meant exactly to join on detached threads, and the waiting thread doesn't expect for the notifier thread to access any further shared resources, making this scenario very likely to happen. The waiting thread might awake spuriously on the release of the mutex lock. The reorder is necessary to prevent this race. Further details can be found at https://cplusplus.github.io/LWG/issue3343. Differential Revision: https://reviews.llvm.org/D105758
-
Paul Kirth authored
In many cases, we can use an alias to avoid a symbolic relocations, instead of using the public, interposable symbol. When the instrumented function is in a COMDAT, we can use a hidden alias, and still avoid references to discarded sections. Previous versions of this patch allowed the compiler to name the generated alias, but that would only be valid when the functions were local. Since the alias may be used across TUs we use a more deterministic naming convention, and add a .local suffix to the alias name just as we do for relative vtables aliases. This should be safe to land after an incorrect LLD assertion was removed in https://reviews.llvm.org/rG20894a478da224bdd69c91a22a5175b28bc08ed9 which caused assertion failures in LLD on Mac. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D137982
-
Hanhan Wang authored
The tensor.pack ops have pad semantic, so we can fold pad + pack into pack when 1. They have the same padding values or the pack op does not have padding values. 2. The pad op does not have low paddings. The tensor.unpack ops have extract_slice semantic, so we can fold unpack + extract_slice into unpack when 1. All the offsets are 0s. 2. All the strides are 1s. Reviewed By: tyb0807 Differential Revision: https://reviews.llvm.org/D141099
-
Alex Langford authored
After an exec, the inferior is a new process and none of these memory regions are still allocated. Clear them out. Differential Revision: https://reviews.llvm.org/D140253
-
Owen Pan authored
-
Mitch Phillips authored
The GWP-ASan recoverable mode allows a process to continue to function after a GWP-ASan error is detected. The error will continue to be dumped, but GWP-ASan now has APIs that a signal handler (like the example optional crash handler) can call in order to allow the continuation of a process. When an error occurs with an allocation, the slot used for that allocation will be permanently disabled. This means that free() of that pointer is a no-op, and use-after-frees will succeed (writing and reading the data present in the page). For heap-buffer-overflow/underflow, the guard page is marked as accessible and buffer-overflows will succeed (writing and reading the data present in the now-accessible guard page). This does impact adjacent allocations, buffer-underflow and buffer-overflows from adjacent allocations will no longer touch an inaccessible guard page. This could be improved in future by having two guard pages between each adjacent allocation, but that's out of scope of this patch. Each allocation only ever has a single error report generated. It's whatever came first between invalid-free, double-free, use-after-free or heap-buffer-overflow, but only one. Reviewed By: eugenis, fmayer Differential Revision: https://reviews.llvm.org/D140173
-
James Y Knight authored
This requires the __builtin_source_location() builtin, as implemented by GCC and Clang. Fixes https://github.com/llvm/llvm-project/issues/56363 Differential Revision: https://reviews.llvm.org/D120634
-
Casey Carter authored
* Silence warnings for unused parameters / variables * There's no reason to output unexpected exceptions only for libc++ Differential Revision: https://reviews.llvm.org/D141453
-
Markus Böck authored
This code was accidently left over after https://reviews.llvm.org/D141349 and now leads to compilation failure due to missing declaration (since the class has been removed) Just migrate it by making use of `LLVM_THREAD_LOCAL` instead. Differential Revision: https://reviews.llvm.org/D141535
-
Markus Böck authored
-
Markus Böck authored
See https://discourse.llvm.org/t/psa-new-improved-fold-method-signature-has-landed-please-update-your-downstream-projects/67618 for context Differential Revision: https://reviews.llvm.org/D141529
-
Markus Böck authored
See https://discourse.llvm.org/t/psa-new-improved-fold-method-signature-has-landed-please-update-your-downstream-projects/67618 for context Similar to the patch for the arith dialect, the index dialects fold implementations make heavy use of generic fold functions, hence the change being comparatively mechanical and mostly changing the function signature. Differential Revision: https://reviews.llvm.org/D141502
-
Alex Langford authored
After an exec has occured, resources used to manage the state of a Process are cleaned up. One such resource is the AllocatedMemoryCache which keeps track of memory allocations made in the process for things like expression evaluation. After an exec is performed, the allocated memory regions in the process are gone, so it does not make sense to try to deallocate those regions. rdar://103188106 Differential Revision: https://reviews.llvm.org/D140249
-
Jeff Niu authored
This builder takes no successor arguments. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D141522
-
Thomas Raoux authored
matmul where the RHS operand is transposed allows better memory access patterns on several architectures including common GPUs. Having a named op for it allows to handle this kind of matmul in a more explicit way. Differential Revision: https://reviews.llvm.org/D141430
-
Nikolas Klauser authored
This makes it a lot easier to specialize traits types, like __segmented_iterator_traits. Reviewed By: var-const, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D140728
-
Thurston Dang authored
Fix build error in https://lab.llvm.org/buildbot/#/builders/57/builds/23839/steps/7/logs/stdio that I had introduced in https://reviews.llvm.org/D141445 Differential Revision: https://reviews.llvm.org/D141534
-
Caroline Tice authored
Commit b4477dd8, "[Bazel] Add //llvm:TargetParser depenendency to clang driver for RISCVTargetParserDef.inc", was missing a comma. This fixes that.
-
Caroline Tice authored
Recent update missed this dependency.
-
Haowei Wu authored
This change includes llvm-ml tool in Fuchsia toolchain. Differential Revision: https://reviews.llvm.org/D141448
-
Jakub Kuderski authored
Fixes: https://github.com/llvm/llvm-project/issues/59938 Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D141524
-
Florian Hahn authored
Those CPUs can benefit from additional interleaving. Reviewed By: jroelofs Differential Revision: https://reviews.llvm.org/D141499
-
Ed Maste authored
This matches the configuration used by the prospective FreeBSD CI runner. Remove the (unused) ABI list created in my local environment. This reverts commit eca9196d. Reviewed by: Mordante Differential Revision: https://reviews.llvm.org/D141496
-
Aaron Ballman authored
It seems that changing Format.h is insufficient to get the docs to rebuild? Changing the .rst file directly to at least see if that gets the bot back to green finally.
-
Slava Zakharin authored
These are experimental changes in Flang AA to provide at least some means to disambiguate memory accesses in some simple cases. This AA is still not used by any transformation, so the LIT tests are the only way to trigger it currently. I will further look into applying this AA within Flang to address some of the known performance issues in the benchmarks. Credits to @Renaud-K for the initial implementation. Differential Revision: https://reviews.llvm.org/D141410
-
Thurston Dang authored
This fills in a gap in the tsan_shadow_test coverage: it is possible that the meta regions are aliased (e.g., the heap meta region overlaps the high app meta region). Indeed, the Aarch64_39 mapping has been silently broken in this way for quite some time. This CL checks whether the individual meta regions (for low/mid/high/heap) overlap. Note that (!kBrokenAliasedMetas && !kBrokenLinearity) implies that MemToMeta is invertible; we cannot directly test MetaToMem because that function does not exist. Differential Revision: https://reviews.llvm.org/D141445
-
Aaron Ballman authored
This is another attempt at getting the Sphinx build back to green. It seems Sphinx on the build server does not like any of these, likely due to the digit separators.
-
Craig Topper authored
Use isPhysical/isVirtual methods.
-
Jay Foad authored
Enabling this feature exposed some incorrect codegen, where a workgroup- scope barrier fails to properly synchronise two waves from the same workgroup running on different SIMDs of the same CU. Disabling FeatureBackOffBarrier causes an s_waitcnt to be emitted before the barrier which works around the problem. Differential Revision: https://reviews.llvm.org/D141379
-