- Aug 06, 2021
-
-
Jessica Paquette authored
This simplifies our existing G_EXTRACT rules and adds some test coverage. Mostly changing this because it should make it easier to improve legalization for instructions which use G_EXTRACT as part of the legalization process. This also adds support for legalizing some weird types. Similar to other recent legalizer changes, this changes the order of widening/clamping. There was some dead code in our existing rules (e.g. the p0 case would never get hit), so this knocks those out and makes the types we want to handle explicit. This also removes some checks which, nowadays, are handled by the MachineVerifier. Differential Revision: https://reviews.llvm.org/D107505
-
Vitaly Buka authored
Origin::CreateHeapOrigin is not async-signal-safe and can deadlock. Differential Revision: https://reviews.llvm.org/D107431
-
Nico Weber authored
It hasn't had an effect since https://reviews.llvm.org/rG7b968969db. No behavior change. Differential Revision: https://reviews.llvm.org/D107446
-
Nathan Lanza authored
Deduplicate some code and add an additional test to verify that the sprintf->stpcpy optimization still works on android21 (which properly supports it). This follows up 58481663. Differential Revision: https://reviews.llvm.org/D107526
-
Nico Weber authored
They used to be referenced from the .xcodeproj files, but those are long gone. No behavior change. Differential Revision: https://reviews.llvm.org/D107444
-
Nico Weber authored
-
Michael Kruse authored
Add unittests for IslMaxOperationsGuard and the behaviour of the isl-noexception.h wrapper under exceeded max_operations. Reviewed By: patacca Differential Revision: https://reviews.llvm.org/D107401
-
Michael Kruse authored
The foreach callback wrappers tests check the return values of isl::stat:ok() and isl::stat::error() separately. However, due to the the container they are iterating over containing just one element, they are actually not testing the difference between them. This patch changes to set to be iterated over to contain 2 element to make returning sl::stat:ok (continue iterating the next element) and isl::stat::error (break after current element) have different effects other than the return value of the foreach itself. Reviewed By: patacca Differential Revision: https://reviews.llvm.org/D107395
-
Matt Morehouse authored
-
Fangrui Song authored
GCC supports multiple forms of -falign-loops=. -falign-loops= is currently ignored in Clang. This patch implements the simplest but the most useful form where N is a power of 2. The underlying implementation uses a `llvm::TargetOptions` option for now. Bitcode generation ignores this option. Differential Revision: https://reviews.llvm.org/D106701
-
Bill Wendling authored
Some tools may want to use the LLVM "diff" code. Move the code into a library for easy use. No functionality change intende. Differential Revision: https://reviews.llvm.org/D107392
-
Jon Roelofs authored
This is re-landing the same patch again, but without the changes to LegalizerHelper that regressed the Mips test: test/CodeGen/Mips/GlobalISel/llvm-ir/ctpop.ll Differential revision: https://reviews.llvm.org/D106494
-
Matt Morehouse authored
- Enable extra coverage counters on Windows. - Update extra_counters.test to run on Windows also. - Update TableLookupTest.cpp to include the required pragma/declspec for the extra coverage counters. Patch By: MichaelSquires Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D106676
-
Arthur O'Dwyer authored
Differential Revision: https://reviews.llvm.org/D107583
-
Chris Jackson authored
The SCEV-based salvaging method caches dbg.value information pre-LSR so that salvaging may be attempted post-LSR. If the dbg.value are already undef pre-LSR then a salvage attempt would be fruitless, so avoid caching them. Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D107448
-
Matt Morehouse authored
This reverts commit 9854f2f3 since it broke all the builds.
-
Dimitry Andric authored
Recently in 0da172b1 thread safety warnings-as-errors were enabled. However, googletest is currently not compatible with thread safety annotations. On FreeBSD, which has the pthread functions marked with such annotations, this results in errors when building the compiler-rt tests: In file included from compiler-rt/lib/interception/tests/interception_test_main.cpp:15: In file included from llvm/utils/unittest/googletest/include/gtest/gtest.h:62: In file included from llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h:40: llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h:1636:3: error: mutex 'mutex_' is still held at the end of function [-Werror,-Wthread-safety-analysis] } ^ llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h:1633:32: note: mutex acquired here GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_)); ^ llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h:1645:32: error: releasing mutex 'mutex_' that was not held [-Werror,-Wthread-safety-analysis] GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_)); ^ 2 errors generated. At some point googletest will hopefully be made compatible with thread safety annotations, but for now add corresponding `-Wno-thread-*` flags to `COMPILER_RT_GTEST_CFLAGS` to silence these warnings-as-errors. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D107491
-
Geoffrey Martin-Noble authored
Updates the Bazel build for https://github.com/llvm/llvm-project/commit/9854f2f30f by extracting a library from llvm-diff. Note that this does not include the new llvm-livepatch binary, for which the CMake file was added accidentally and reverted in https://github.com/llvm/llvm-project/commit/fec8f1a008. Differential Revision: https://reviews.llvm.org/D107586
-
Hedin Garca authored
Comparing the run time of math functions from LLVM libc with the MSVCRT libc: |function |perf-LLVM libc |perf-MSVCRT |ceilf |2.36 mins (141491389600 ns)|47.10 sec (47100940100 ns) |exp2f |6.37 mins (358441794700 ns)|12.39 mins (719404388300 ns) |expf |6.35 mins (381204661800 ns)|6.17 mins (346150163200 ns) |fabsf |1.18 mins (78425546600 ns) |53.75 sec (53745301900 ns) |floorf |3.15 mins (164770963800 ns)|45.94 sec (45935988400 ns) |logbf |4.38 mins (262508058800 ns)|55.47 sec (55466377700 ns) |nearbyintf |3.20 mins (167972868000 ns)|9.13 mins (523822963600 ns) |rintf |3.20 mins (168001498700 ns)|22.35 mins (1341266448800 ns) |roundf |2.35 mins (141151500600 ns)|1.42 mins (85326429800 ns) |truncf |2.31 mins (114846424000 ns)|59.41 sec (59414309100 ns) Evaluating the number of differing results in Windows: |function |diff |ceilf |8388606 differing results |exp2f |213303887 differing results |expf |193922 differing results |fabsf |8388606 differing results |floorf |8388606 differing results |logbf |0 differing results |nearbyintf |0 differing results |rintf |0 differing results |roundf |0 differing results |truncf |0 differing results Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D107462
-
Bill Wendling authored
-
Jon Chesterfield authored
Asm is a gnu extension for C, so at present -fopenmp -std=c99 and similar fail to compile on nvptx, bug 51344 Changing to `__asm__` or `__asm` works for openmp, all three appear to work for cuda. Suggesting `__asm__` here as `__asm` is used by MSVC with different syntax, so this should make for better error diagnostics if the header is passed to a compiler other than clang. Reviewed By: tra, emankov Differential Revision: https://reviews.llvm.org/D107492
-
Roman Lebedev authored
Having `NewMask` outside of an if and rebinding `BaseMask` `ArrayRef` to it is confusing. Instead, just move the `Mask` vector higher up, and change the code that earlier had no access to it but now does to use `Mask` instead of `BaseMask`. This has no other intentional changes. This is a recommit of 35c0848b, that was reverted to simplify reversion of an earlier change.
-
Roman Lebedev authored
From Benjamin Kramer @ https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20210802/945642.html
-
Bill Wendling authored
Some tools may want to use the LLVM "diff" code. Move the code into a library for easy use. No functionality change intende. Differential Revision: https://reviews.llvm.org/D107392
-
Fangrui Song authored
Copy relocation on a non-default version symbol is unsupported and can crash at runtime. Fortunately there is a one-line fix which works for most cases: ensure `getSymbolsAt` unconditionally returns `ss`. If two non-default version symbols are defined at the same place and both are copy relocated, our implementation will copy relocated them into different addresses. The pointer inequality is very unlikely an issue. In GNU ld, copy relocating version aliases seems to create more pointer inequality problems than us. ( In glibc, sys_errlist@GLIBC_2.2.5 sys_errlist@GLIBC_2.3 sys_errlist@GLIBC_2.4 are defined at the same place, but it is unlikely they are all copy relocated in one executable. Even if so, the variables are read-only and pointer inequality should not be a problem. ) Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D107535
-
Jonas Devlieghere authored
This patch refactors IRExecutionUnit::FindInSymbols. It eliminates a few potential pitfalls and tries to be more explicit about the state carried between symbol resolution attempts. Differential revision: https://reviews.llvm.org/D107206
-
Jonas Devlieghere authored
Rather than passing two booleans around, which is especially error prone with them being next to each other, use a struct with named fields instead. Differential revision: https://reviews.llvm.org/D107295
-
Dan Liew authored
02243993 added code that is only enabled when COMPILER_RT_DEBUG is enabled. This code doesn't build on targets that don't support thread local storage because the code added uses the THREADLOCAL macro. Consequently the COMPILER_RT_DEBUG build broke for some Apple targets (e.g. 32-bit iOS simulators). ``` /Volumes/user_data/dev/llvm/llvm.org/main/src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mutex.cpp:216:8: error: thread-local storage is not supported for the current target static THREADLOCAL InternalDeadlockDetector deadlock_detector; ^ /Volumes/user_data/dev/llvm/llvm.org/main/src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:227:24: note: expanded from macro 'THREADLOCAL' # define THREADLOCAL __thread ^ 1 error generated. ``` To fix this, this patch introduces a `SANITIZER_SUPPORTS_THREADLOCAL` macro that is `1` iff thread local storage is supported by the current target. That condition is then added to `SANITIZER_CHECK_DEADLOCKS` to ensure the code is only enabled when thread local storage is available. The implementation of `SANITIZER_SUPPORTS_THREADLOCAL` currently assumes Clang. See `llvm-project/clang/include/clang/Basic/Features.def` for the definition of the `tls` feature. rdar://81543007 Differential Revision: https://reviews.llvm.org/D107524
-
Ramesh Peri authored
WHen thin archives are created which have symbol table of type SYM64 then all the tools will not work since they cannot read the files properly. One can reproduce the problem as follows: 1. Take a hello world program and create an archive out of it. The SYM64_THRESHOLD=0 will force the generation of SYM64 symbol table. clang -c hello.cpp SYM64_THRESHOLD=0 llvm-ar crsT mylib.a hello.o 2. Now try to use any of the tools on this mylib.a and it will fail. llvm-nm -M mylib.a THis fix will eliminate these failures. A regression test is created in llvm/test/Object/archive-symtab.test Reviewed By: MaskRay, Ramesh Differential Revision: https://reviews.llvm.org/D107322 -
Jon Roelofs authored
-
Benjamin Kramer authored
This reverts commits f819e4c7 and 35c0848b. It triggers an infinite loop during compilation. $ cat t.ll target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" define void @MaxPoolGradGrad_1.65() local_unnamed_addr #0 { entry: %wide.vec78 = load <64 x i32>, <64 x i32>* null, align 16 %strided.vec83 = shufflevector <64 x i32> %wide.vec78, <64 x i32> poison, <8 x i32> <i32 4, i32 12, i32 20, i32 28, i32 36, i32 44, i32 52, i32 60> %0 = lshr <8 x i32> %strided.vec83, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16> %1 = add <8 x i32> zeroinitializer, %0 %2 = shufflevector <8 x i32> %1, <8 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> %3 = shufflevector <16 x i32> %2, <16 x i32> undef, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31> %interleaved.vec = shufflevector <32 x i32> undef, <32 x i32> %3, <64 x i32> <i32 0, i32 8, i32 16, i32 24, i32 32, i32 40, i32 48, i32 56, i32 1, i32 9, i32 17, i32 25, i32 33, i32 41, i32 49, i32 57, i32 2, i32 10, i32 18, i32 26, i32 34, i32 42, i32 50, i32 58, i32 3, i32 11, i32 19, i32 27, i32 35, i32 43, i32 51, i32 59, i32 4, i32 12, i32 20, i32 28, i32 36, i32 44, i32 52, i32 60, i32 5, i32 13, i32 21, i32 29, i32 37, i32 45, i32 53, i32 61, i32 6, i32 14, i32 22, i32 30, i32 38, i32 46, i32 54, i32 62, i32 7, i32 15, i32 23, i32 31, i32 39, i32 47, i32 55, i32 63> store <64 x i32> %interleaved.vec, <64 x i32>* undef, align 16 unreachable } $ llc < t.ll -mcpu=skylake <hang>
-
Jessica Paquette authored
G_CONCAT_VECTORS shows up from time to time when legalizing other instructions. We actually import patterns for the v16s8 <- v8s8, v8s8 case so marking it as legal gives us selection for free. Differential Revision: https://reviews.llvm.org/D107512
-
Daniele Vettorel authored
The `llvm-stress` binary is currently missing from the Bazel `BUILD` file for llvm. This patch adds it. Reviewed By: GMNGeoffrey Differential Revision: https://reviews.llvm.org/D107571
-
Florian Hahn authored
-
- Aug 05, 2021
-
-
Jennifer Yu authored
The root problem is a null pointer is accessed during the call to checkOpenMPLoop, because loop up bound expr is an error expression due to error diagnostic was emit early. To fix this, in setLCDeclAndLB, setUB and setStep instead return false, return true when LB, UB or Step contains Error, so that the checking is stopped in checkOpenMPLoop. Differential Revision: https://reviews.llvm.org/D107385
-
Kazu Hirata authored
Identified with readability-const-return-type.
-
Alexey Bataev authored
If the vectorized insertelements instructions form indentity subvector (the subvector at the beginning of the long vector), it is just enough to extend the vector itself, no need to generate inserting subvector shuffle. Differential Revision: https://reviews.llvm.org/D107494
-
Craig Topper authored
[DAGCombiner][RISCV][AMDGPU] Call SimplifyDemandedBits at the end of visitMULHU to enable known bits contant folding. We don't have real demanded bits support for MULHU, but we can still use the known bits based constant folding support at the end of SimplifyDemandedBits to simplify a MULHU. This helps with cases where we know the LHS and RHS have enough leading zeros so that the high multiply result is always 0. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D106471
-
David Sherwood authored
-
Sander de Smalen authored
Since all operands to ExtractValue must be loop-invariant when we deem the loop vectorizable, we can consider ExtractValue to be uniform. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D107286
-