- Jan 06, 2021
-
-
Yang Fan authored
In implicitly movable test, a two-stage overload resolution is performed. If the first overload resolution selects a deleted function, Clang directly performs the second overload resolution, without checking whether the deleted function matches the additional criteria. This patch fixes the above problem. Reviewed By: Quuxplusone Differential Revision: https://reviews.llvm.org/D92936
-
-
Julian Lettner authored
Suppress the warning: ``` 'fake_shared_weak_count' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor] ``` The warning has been recently enabled [1], but the associated cleanup missed this instance in Darwin code [2]. [1] 9c31e126 [2] d48f2d7c Differential Revision: https://reviews.llvm.org/D94139
-
Jorge Gorbe Moya authored
In split DWARF v5 files, the DWO id is no longer in the DW_AT_GNU_dwo_id attribute. It's in the CU header instead. This change makes lldb look in both places. Differential Revision: https://reviews.llvm.org/D93444
-
David Blaikie authored
Given the ability provided by DWARFv5 rnglists to reuse addresses in the address pool, it can be advantageous to object file size to use range encodings even when the range could be described by a direct low/high pc. Add a flag to allow enabling this in DWARFv5 for the purpose of experimentation/data gathering. It might be that it makes sense to enable this functionality by default for DWARFv5 + Split DWARF at least, where the tradeoff/desire to optimize for .o file size is more explicit and .o bytes are higher priority than .dwo bytes.
-
Fangrui Song authored
Reland D93848 "[sanitizer] Define SANITIZER_GLIBC to refine SANITIZER_LINUX feature detection and support musl"" Several `#if SANITIZER_LINUX && !SANITIZER_ANDROID` guards are replaced with the more appropriate `#if SANITIZER_GLIBC` (the headers are glibc extensions, not specific to Linux (i.e. if we ever support GNU/kFreeBSD or Hurd, the guards may automatically work)). Several `#if SANITIZER_LINUX && !SANITIZER_ANDROID` guards are refined with `#if SANITIZER_GLIBC` (the definitions are available on Linux glibc, but may not be available on other libc (e.g. musl) implementations). This patch makes `ninja asan cfi msan stats tsan ubsan xray` build on a musl based Linux distribution (apk install musl-libintl) Notes about disabled interceptors for musl: * `SANITIZER_INTERCEPT_GLOB`: musl does not implement `GLOB_ALTDIRFUNC` (GNU extension) * Some ioctl structs and functions operating on them. * `SANITIZER_INTERCEPT___PRINTF_CHK`: `_FORTIFY_SOURCE` functions are GNU extension * `SANITIZER_INTERCEPT___STRNDUP`: `dlsym(RTLD_NEXT, "__strndup")` errors so a diagnostic is formed. The diagnostic uses `write` which hasn't been intercepted => SIGSEGV * `SANITIZER_INTERCEPT_*64`: the `_LARGEFILE64_SOURCE` functions are glibc specific. musl does something like `#define pread64 pread` * Disabled `msg_iovlen msg_controllen cmsg_len` checks: musl is conforming while many implementations (Linux/FreeBSD/NetBSD/Solaris) are non-conforming. Since we pick the glibc definition, exclude the checks for musl (incompatible sizes but compatible offsets) Pass through LIBCXX_HAS_MUSL_LIBC to make check-msan/check-tsan able to build libc++ (https://bugs.llvm.org/show_bug.cgi?id=48618). Many sanitizer features are available now. ``` % ninja check-asan (known issues: * ASAN_OPTIONS=fast_unwind_on_malloc=0 odr-violations hangs ) ... Testing Time: 53.69s Unsupported : 185 Passed : 512 Expectedly Failed: 1 Failed : 12 % ninja check-ubsan check-ubsan-minimal check-memprof # all passed % ninja check-cfi ( all cross-dso/) ... Testing Time: 8.68s Unsupported : 264 Passed : 80 Expectedly Failed: 8 Failed : 32 % ninja check-lsan (With GetTls (D93972), 10 failures) Testing Time: 4.09s Unsupported: 7 Passed : 65 Failed : 22 % ninja check-msan (Many are due to functions not marked unsupported.) Testing Time: 23.09s Unsupported : 6 Passed : 764 Expectedly Failed: 2 Failed : 58 % ninja check-tsan Testing Time: 23.21s Unsupported : 86 Passed : 295 Expectedly Failed: 1 Failed : 25 ``` Used `ASAN_OPTIONS=verbosity=2` to verify there is no unneeded interceptor. Partly based on Jari Ronkainen's https://reviews.llvm.org/D63785#1921014 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D93848
-
George Rokos authored
Differential Revision: https://reviews.llvm.org/D94095
-
Tres Popp authored
This was added without full specification like other generated methods. This then leads to other downstream dialects failing to compile the generated code when they are not in the mlir namespace. Differential Revision: https://reviews.llvm.org/D94132
-
Richard Smith authored
attribute. This was intended to work, but didn't match the checks because these types are modeled as TemplateSpecializationTypes not TypedefTypes.
-
Aart Bik authored
Nicolas changed the tensor abstraction so that every output has its own shape definition. This simplifies the "inference" that was used in the sparse compiler. Reviewed By: penpornk Differential Revision: https://reviews.llvm.org/D94119
-
Roman Lebedev authored
[SimplifyCFG] SimplifyEqualityComparisonWithOnlyPredecessor(): really don't delete DomTree edges multiple times
-
Roman Lebedev authored
[NFC][SimplifyCFG] Add a test where SimplifyEqualityComparisonWithOnlyPredecessor() deletes existing edge
-
Roman Lebedev authored
... which requires not deleting a DomTree edge that we just deleted.
-
Roman Lebedev authored
-
Roman Lebedev authored
If the predecessor is a switch, and BB is not the default destination, multiple cases could have the same destination. and it doesn't make sense to re-process the predecessor, because we won't make any changes, once is enough. I'm not sure this can be really tested, other than via the assertion being added here, which fires without the fix.
-
Roman Lebedev authored
... which requires not adding a DomTree edge that we just added.
-
Roman Lebedev authored
One would hope that it would have been already canonicalized into an unconditional branch, but that isn't really guaranteed to happen with SimplifyCFG's visitation order.
-
Roman Lebedev authored
Reported by Mikael Holmén as post-commit feedback on https://reviews.llvm.org/rG2d07414ee5f74a09fb89723b4a9bb0818bdc2e18#968162
-
Roman Lebedev authored
... which requires not removing a DomTree edge if the switch's default still points at that destination, because it can't be removed; ... and not processing the same predecessor more than once.
-
Changpeng Fang authored
Summary: This is to avoid unnecessary analysis since amdgpu.noclobber is only used for globals. Reviewers: arsenm Fixes: SWDEV-239161 Differential Revision: https://reviews.llvm.org/D94107
-
Sanjay Patel authored
We can get both (vector/scalar) costs in a single switch instead of sequentially.
-
Mircea Trofin authored
More patches to follow. Differential Revision: https://reviews.llvm.org/D94121
-
Mircea Trofin authored
This is part of the pertinent tests, more to follow in subsequent patches. Differential Revision: https://reviews.llvm.org/D94114
-
Stephen Kelly authored
Differential Revision: https://reviews.llvm.org/D94031
-
Arthur Eubanks authored
A function is noreturn if all blocks terminating with a ReturnInst contain a call to a noreturn function. Skip looking at naked functions since there may be asm that returns. This can be further refined in the future by checking unreachable blocks and taking into account recursion. It looks like the attributor pass does this, but that is not yet enabled by default. This seems to help with code size under the new PM since PruneEH does not run under the new PM, missing opportunities to mark some functions noreturn, which in turn doesn't allow simplifycfg to clean up dead code. https://bugs.llvm.org/show_bug.cgi?id=46858. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D93946
-
Roland McGrath authored
Linux-specific aarch64 code was deconditionalized in commit dfa40840. This broke builds for non-Linux aarch64 platforms. Reviewed By: cryptoad Differential Revision: https://reviews.llvm.org/D94108
-
Mircea Trofin authored
Differential Revision: https://reviews.llvm.org/D94099
-
Mitch Phillips authored
Some tests are broken at API level 30 on AOSP-master devices. When we change the buildbuit to API level 30, the following tests get enabled. They're currently broken due to various issues, and so fix up those issues. Reviewed By: oontvoo, eugenis Differential Revision: https://reviews.llvm.org/D94100
-
Alan Phipps authored
Fix test failures with Branch Coverage tests from commit rG9f2967bc that failed build on builder clang-x64-windows-msvc while building llvm: http://lab.llvm.org:8011/#/builders/123/builds/2162
-
Kazu Hirata authored
This patch teaches the inliner to compute the full cost for a call site where the newly introduced cost benefit analysis is enabled. Note that the cost benefit analysis requires the full cost to be computed. However, without this patch or the -inline-cost-full option, the early termination logic would kick in when the cost exceeds the threshold, so we don't get to perform the cost benefit analysis. For this reason, we would need to specify four clang options: -mllvm -inline-cost-full -mllvm -inline-enable-cost-benefit-analysis This patch eliminates the need to specify -inline-cost-full. Differential Revision: https://reviews.llvm.org/D93658
-
Craig Topper authored
This looks to have been done to save some duplicated code under two different if statements, but it ends up being harmful to D94073. This speculative constant can be called on a scalable vector type with i64 element size when i64 scalars aren't legal. The code tries and fails to find a vector type with i32 elements that it can use. So only create the node when we know it will be used.
-
Sanjay Patel authored
This should be no-functional-change because the reduction kind opcodes are 1-for-1 mappings to the instructions we are matching as reductions. But we want to remove the need for the `OperationData` opcode field because that does not work when we start matching intrinsics (eg, maxnum) as reduction candidates.
-
Sanjay Patel authored
-
Krzysztof Parzyszek authored
-
Whitney Tsang authored
Differential Revision: https://reviews.llvm.org/D93665
-
- Jan 05, 2021
-
-
Atmn Patel authored
From C11 and C++11 onwards, a forward-progress requirement has been introduced for both languages. In the case of C, loops with non-constant conditionals that do not have any observable side-effects (as defined by 6.8.5p6) can be assumed by the implementation to terminate, and in the case of C++, this assumption extends to all functions. The clang frontend will emit the `mustprogress` function attribute for C++ functions (D86233, D85393, D86841) and emit the loop metadata `llvm.loop.mustprogress` for every loop in C11 or later that has a non-constant conditional. This patch modifies LoopDeletion so that only loops with the `llvm.loop.mustprogress` metadata or loops contained in functions that are required to make progress (`mustprogress` or `willreturn`) are checked for observable side-effects. If these loops do not have an observable side-effect, then we delete them. Loops without observable side-effects that do not satisfy the above conditions will not be deleted. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D86844
-
- Jan 06, 2021
-
-
Craig Topper authored
ComplexPatterns are kind of weird, they don't call any of the predicates on their operands. And their "complexity" used for tablegen ordering purposes in the matcher table is hand specified. This started as an attempt to just use sext_inreg + SLOIPat to implement SLOIW just to have one less Select function. The matching for the or+shl is the same as long as you know the immediate is less than 32 for SLOIW. But that didn't work out because using uimm5 with SLOIPat didn't do anything if it was a ComplexPattern. I realized I could just use a PatFrag with the opcodes I wanted to match and an immediate predicate would then evaluate correctly. This also computes the complexity just like any other pattern does. Then I just needed to check the constraints on the immediates in the predicate. Conveniently the predicate is evaluated after the fragment has been matched. So the structure has already been checked, we just need to find the constants. I'll note that this is unusual, I didn't find any other targets looking through operands in PatFrag predicate. There is a PredicateCodeUsesOperands feature that can be used to collect the operands into an array that is used by AMDGPU/VOP3Instructions.td. I believe that feature exists to handle commuted matching, but since the nodes here use constants, they aren't ever commuted Differential Revision: https://reviews.llvm.org/D91901
-
Alan Phipps authored
Fix test failures with Branch Coverage tests from commit rG9f2967bc that failed build on builder clang-x64-windows-msvc while building llvm: http://lab.llvm.org:8011/#builders/123/builds/2155
-
Thomas Lively authored
As proposed in https://github.com/WebAssembly/simd/pull/352 and using the opcodes used in the V8 prototype: https://chromium-review.googlesource.com/c/v8/v8/+/2543167. These instructions are only usable via intrinsics and clang builtins to make them opt-in while they are being benchmarked. Differential Revision: https://reviews.llvm.org/D93883
-
Jan Svoboda authored
This fixes an issue where large integer values were rejected as invalid. Reviewed By: arphaman Differential Revision: https://reviews.llvm.org/D94101
-