- Sep 23, 2021
-
-
Simon Pilgrim authored
Avoid unnecessary copies, reported by MSVC static analyzer.
-
Piotr Sobczak authored
The pass amdgpu-propagate-attributes ("Early/Late propagate attributes from kernels to functions") is currently run also for shaders, where it does nothing. Modify the check so the pass only processes functions for kernels. Differential Revision: https://reviews.llvm.org/D109961 -
Haojian Wu authored
Differential Revision: https://reviews.llvm.org/D110315
-
Stefan Gränitz authored
Issue reported during review D110260
-
Christian Kandeler authored
... in textDocument/references. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D110324
-
Simon Pilgrim authored
Only the most recent cpus support really 1cy 64-bit multiplies, and the X64 cost table represents a realistic worst case. The 1cy value was also discouraging vectorization when most vXi64 PMULDQ expansions aren't actually slower than scalarization. Noticed while investigating PR51436.
-
Sanjay Patel authored
The 1st try at this was reverted because it caused an infinite loop in instcombine. That should be fixed after: 1cd6b44f (masked) trunc (lshr X, C) --> (masked) lshr (trunc X), C Narrowing the shift should be better for analysis and can lead to follow-on transforms as shown. Attempt at a general proof in Alive2: https://alive2.llvm.org/ce/z/tRnnSF Here are a couple of the specific tests: https://alive2.llvm.org/ce/z/bCnTp- https://alive2.llvm.org/ce/z/TfaHnb Differential Revision: https://reviews.llvm.org/D110170
-
LLVM GN Syncbot authored
-
Nico Weber authored
-
Nico Weber authored
-
Sanjay Patel authored
Clang regression tests should not break when changes are made to the LLVM optimizer. This file broke on the 1st attempt at D110170, so I'm trying to prevent that on another try. Similar to other files in this directory, we make a compromise and run -mem2reg to reduce noise by about 1000 lines out of 5000+ CHECK lines.
-
Louis Dionne authored
All supported compilers provide support for variable templates now. Differential Revision: https://reviews.llvm.org/D110284
-
Dmitry Vyukov authored
Remove nmissed_expected variable. It's a leftover from removed "expected race" feature and is never incremented. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D110321
-
Florian Hahn authored
At the moment, DSE only considers whether a pointer may be captured at all in a function. This leads to cases where we fail to remove stores to local objects because we do not check if they escape before potential read-clobbers or after. Doing context-sensitive escape queries in isReadClobber has been removed a while ago in d1a1cce5 to save compile-time. See PR50220 for more context. This patch introduces a new capture tracker, which keeps track of the 'earliest' capture. An instruction A is considered earlier than instruction B, if A dominates B. If 2 escapes do not dominate each other, the terminator of the common dominator is chosen. If not all uses cannot be analyzed, the earliest escape is set to the first instruction in the function entry block. If the query instruction dominates the earliest escape and is not in a cycle, then pointer does not escape before the query instruction. This patch uses this information when checking if a load of a loaded underlying object may alias a write to a stack object. If the stack object does not escape before the load, they do not alias. I will share a follow-up patch to also use the information for call instructions to fix PR50220. In terms of compile-time, the impact is low in general, NewPM-O3: +0.05% NewPM-ReleaseThinLTO: +0.05% NewPM-ReleaseLTO-g: +0.03 with the largest change being tramp3d-v4 (+0.30%) http://llvm-compile-time-tracker.com/compare.php?from=1a3b3301d7aa9ab25a8bdf045c77298b087e3930&to=bc6c6899cae757c3480f4ad4874a76fc1eafb0be&stat=instructions Compared to always computing the capture information on demand, we get the following benefits from the caching: NewPM-O3: -0.03% NewPM-ReleaseThinLTO: -0.08% NewPM-ReleaseLTO-g: -0.04% The biggest speedup is tramp3d-v4 (-0.21%). http://llvm-compile-time-tracker.com/compare.php?from=0b0c99177d1511469c633282ef67f20c851f58b1&to=bc6c6899cae757c3480f4ad4874a76fc1eafb0be&stat=instructions Overall there is a small, but noticeable benefit from caching. I am not entirely sure if the speedups warrant the extra complexity of caching. The way the caching works also means that we might miss a few cases, as it is less precise. Also, there may be a better way to cache things. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D109844
-
Jim Lin authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D110307
-
Simon Pilgrim authored
Avoid unnecessary copies, reported by MSVC static analyzer.
-
Simon Pilgrim authored
Avoid unnecessary copies, reported by MSVC static analyzer.
-
Bjorn Pettersson authored
The NFC commit e5692a56 changed the logic for DomTreeUpdates to use the range [succ_begin, succ_begin) when looking for SuccsOfPredBB rather than using [succ_begin, succ_end). As the commit was NFC this is identified as a typo (it has been discussed briefly in phabricator). The typo was found when inspecting the code, so I've got no idea if changing back to the old range has any significant impact (such as solving any PR:s or causing some new problems). But at least this restores the code to the originally indented behavior.
-
Pavel Labath authored
getpeername will return addrlen = 2 (sizeof sa_family_t) for unnamed sockets (those not assigned a name with bind(2)). This is typically true for client sockets as well as those created by socketpair(2). This GetSocketName used to crash for sockets which were connected to these kinds of sockets. Now it returns an empty string.
-
Fraser Cormack authored
This patch adds codegen support for lowering the vector-predicated reduction intrinsics to RVV instructions. The process is similar to that of the other reduction intrinsics, save for the fact that every VP reduction has a start value. We reuse the existing custom "VL" nodes, adding extra patterns where required to handle non-true masks. To support these nodes, the `RISCVISD::VECREDUCE_*_VL` nodes have been given an explicit "merge" operand. This is to faciliate the VP reductions, where we must be careful to ensure that even if no operation is performed (when VL=0) we still produce the start value. The RVV reductions don't update the destination register under these conditions, so we tie the splatted start value to the output register. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D107657
-
Valentin Clement authored
This patch is part of the upstreaming effort from fir-dev branch and sync changes. Inline trival `isa_<type>` functions. Co-authored-by: schweitzpgi Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D110233
-
Dmitry Vyukov authored
tsan_rtl.h is very huge and contains too many things. Move FastState and Shadow types into a new tsan_shadow.h file. This also allows to use FastState/Shadow in other header files without creating circular dependencies (which most likely will happen today). Reviewed By: melver Differential Revision: https://reviews.llvm.org/D110272
-
Dmitry Vyukov authored
Fix few remaining cases where we use u64 instead of the new RawShadow type. Depends on D110265. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D110266
-
Dmitry Vyukov authored
Add a test for a trace corner case that lead to a bug in experimental runtime replacement. Since it passes with the current runtime it makes sense to submit it on its own. Depends on D110264. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D110265
-
Dmitry Vyukov authored
DontDumpShadow is used only in InitializeShadowMemory which is Go-only. Depends on D110263. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D110264
-
Dmitry Vyukov authored
Remove unnecessary enum values in the memory profiler. There is no point in spelling them, it can only lead to bugs and larger diffs when values are added/removed. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D110263
-
Alex Richardson authored
I noticed this while working on a (ptrtoint (gep null, x)) -> x fold. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D110168
-
Andre Vieira authored
Differential Revision: https://reviews.llvm.org/D107848
-
Petr Hosek authored
This reverts commit 5e28c892 as the linker on the clang-ppc64le-rhel bot doesn't seem to support --push-state/--pop-state.
-
Petr Hosek authored
When statically linking C++ standard library, we shouldn't add -Bdynamic after including the library on the link line because that might override user settings like -static and -static-pie. Rather, we should surround the library with --push-state/--pop-state to make sure that -Bstatic only applies to C++ standard library and nothing else. This has been supported since GNU ld 2.25 (2014) so backwards compatibility should no longer be a concern. Differential Revision: https://reviews.llvm.org/D110128
-
Jay Foad authored
This simplifies the API and addresses a FIXME in TwoAddressInstructionPass::convertInstTo3Addr. Differential Revision: https://reviews.llvm.org/D110229
-
Bjorn Pettersson authored
Differential Revision: https://reviews.llvm.org/D110062
-
Bjorn Pettersson authored
Bisecting and reducing opt pipelines that includes the ModuleInlinerWrapperPass has turned out to be a bit problematic. This is far from perfect (it still lacks information about inline advisor params etc.), but it should give some kind of hint to what the wrapped pipeline looks like when using -print-pipeline-passes. Reviewed By: aeubanks, mtrofin Differential Revision: https://reviews.llvm.org/D109878
-
Nathan Ridge authored
Prior to this patch, CollectExtraHighlightings would incorrectly produce a token for the init-capture's type which overlapped the name and resulted in both being dropped. Fixes https://github.com/clangd/clangd/issues/868 Differential Revision: https://reviews.llvm.org/D110130
-
Tharindu Rusira authored
Current warning message in method `addAffineForOpDomain` of mlir/lib/Analysis/AffineStructures.cpp is being printed to the stdout/stderr. This patch redirects the warning with LLVM_DEBUG following standard llvm practice. Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D108340
-
Mike Hommey authored
Without such wrapping, linking lld fails with missing symbols because of C++ symbol mangling with older versions of the MacOSX SDK, in which xar.h doesn't have an extern "C" block itself. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D110224
-
Liu, Chen3 authored
This patch is to support transform something like _mm512_add_ph(acc, _mm512_fmadd_pch(a, b, _mm512_setzero_ph())) to _mm512_fmadd_pch(a, b, acc). Differential Revision: https://reviews.llvm.org/D109953
-
Jan Svoboda authored
This patch uses a different command-line arguments to test `clang::tooling::ToolInvocation` that are not specific to Darwin. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D110160
-
Diana Picus authored
clang-cl errors out while handling the templated version of tgfmt. This patch works around the issue by explicitly choosing the non-templated version of tgfmt, which takes an ArrayRef<std::string>. More details in this thread: https://lists.llvm.org/pipermail/cfe-dev/2021-September/068936.html Thanks @Mehdi Amini for suggesting the fix :) Differential Revision: https://reviews.llvm.org/D110223
-
Mikael Holmen authored
-