[mlir][ROCDL] Annotate lane ID functions with noundef, ranges (#151396)
Now that we have general support for setting argument and result
attributes on LLVM intrinsics, extend the definitions of mbcnt.lo and
mbcnt.hi to carry such attributes. With that, update the construction of
the mbcnt.lo/mbcnt.hi calls used to get the lane ID to be `noundef`
(since the lane ID is always defined) and to be annotated with the
correct ranges (so that generic LLVM passes can correctly optimized
based on the fact that there are never more than 32/64 lanes).
(Also, handle a pattern that wasn't using getLaneId() and get rid of a
dead argument)
[lldb] refactor PlatformAndroid and make threadsafe (#145382)
## Problem
When the new setting
```
set target.parallel-module-load true
```
was added, lldb began fetching modules from the devices from multiple
threads simultaneously. This caused crashes of lldb when debugging on
android devices.
The top of the stack in the crash look something like this:
```
#0 0x0000555aaf2b27fe llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/llvm/bin/lldb-dap+0xb87fe)
#1 0x0000555aaf2b0a99 llvm::sys::RunSignalHandlers() (/opt/llvm/bin/lldb-dap+0xb6a99)
#2 0x0000555aaf2b2fda SignalHandler(int, siginfo_t*, void*) (/opt/llvm/bin/lldb-dap+0xb8fda)
#3 0x00007f9c02444560 __restore_rt /home/engshare/third-party2/glibc/2.34/src/glibc-2.34/signal/../sysdeps/unix/sysv/linux/libc_sigaction.c:13:0
[30 lines not shown]
[clang][PAC] Disallow -pedantic-errors in conjunction with pointer authentication
The __has_extension query for the __ptrauth qualifier returns false
when -pedantic-errors is specified by the developer, which results
in ABI mismatches and potentially ODR violations as well.
The only way to resolve this is to to make it an error to attempt to
use the -pedantic-errors option when targeting a platform where
pointer authentication is present. This may cause compilation issues
for some projects but is better than bad codegen.
certctl: Reimplement in C
Notable changes include:
* We no longer forget manually untrusted certificates when rehashing.
* Rehash will now scan the existing directory and progressively replace
its contents with those of the new trust store. The trust store as a
whole is not replaced atomically, but each file within it is.
* We no longer attempt to link to the original files, but we don't copy
them either. Instead, we write each certificate out in its minimal
form.
* We now generate a trust bundle in addition to the hashed diretory.
This also contains only the minimal DER form of each certificate.
* The C version is approximately two orders of magnitude faster than the
sh version, with rehash taking ~100 ms vs ~5-25 s depending on whether
[9 lines not shown]
[clang][PAC] Disallow -pedantic-errors in conjunction with pointer authentication
The __has_extension query for the __ptrauth qualifier returns false
when -pedantic-errors is specified by the developer, which results
in ABI mismatches and potentially ODR violations as well.
The only way to resolve this is to to make it an error to attempt to
use the -pedantic-errors option when targeting a platform where
pointer authentication is present. This may cause compilation issues
for some projects but is better than bad codegen.
[clang][PAC] Disallow -pedantic-errors in conjunction with pointer authentication
The __has_extension query for the __ptrauth qualifier returns false
when -pedantic-errors is specified by the developer, which results
in ABI mismatches and potentially ODR violations as well.
The only way to resolve this is to to make it an error to attempt to
use the -pedantic-errors option when targeting a platform where
pointer authentication is present. This may cause compilation issues
for some projects but is better than bad codegen.
simd_stat: expose availability of VAES and VPCLMULQDQ
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Joel Low <joel at joelsplace.sg>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Attila Fülöp <attila at fueloep.org>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17058
crypto_test: include AVX2 GCM implementation in tests
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Joel Low <joel at joelsplace.sg>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Attila Fülöp <attila at fueloep.org>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17058
[flang/flang-rt] Add -isysroot flag only to tests really requiring (#152914)
-isysroot flag was added to all tests, but it makes
Driver/darwin-version.f90 failed.
In fact, only a few tests regarding interoperability with C need
-isysroot flag to search for headers and libraries. So, -isysroot flag
is now eliminated from the substitution `%flang`, and a new substitution
`%isysroot` has been introduced.
Moreover, Integration/iso-fortran-binding.cpp invokes clang++ via a
shell script, which makes it hard to add -isysroot flag. So, it is
refactored.
Fixes #150765
[flang][runtime][NFC] Add a comment to intrinsic assignment (#153260)
Add a comment explaining why intrinsic derived type assignment
unconditionally deallocates all allocated allocatable subobject
components of the left-hand side variable, so that I won't forget the
reasoning here the next time this comes into question.
[flang][runtime] Handle NAN(...) in namelist input (#153101)
The various per-type functions for list-directed (including namelist)
input editing all call a common function to detect whether the next
token of input is the name of a namelist item. This check simply
determines whether this next token looks like an identifier followed by
'=', '(', or '%', and this fails when the next item of input is a NAN
with parenthesized stuff afterwards. Make the check smarter so that it
ensures that any upcoming possible identifier is actually the name of an
item in the namelist group. (And that's tricky too when the group has an
array item named "nan" and the upcoming input is "nan("; see the
newly-added unit test case.)
Fixes https://github.com/llvm/llvm-project/issues/152538.
more
[ADT] Add signed and unsigned mulExtended to APInt (#153399)
Adds `mulsExtended` and `muluExtended` methods to `APInt`, as suggested
in #153293.
These are based on the `MULDQ` and `MULUDQ` x86 intrinsics.
[flang][NFC] Document ALLOCATE/DEALLOCATE error semantics (#153027)
This compiler stops an ALLOCATE/DEALLOCATE statement with multiple
variables after encountering a recoverable error to avoid the risk of
ambiguity in the case of multiple errors. Document.
[flang] Warn about inexact real literal implicit widening pitfall (#152799)
When a REAL or COMPLEX literal appears without an explicit kind suffix
or a kind-determining exponent letter, and the conversion of that
literal from decimal to binary is inexact, emit a warning if that
constant is later implicitly widened to a more precise kind, since it
will have a different value than was probably intended.
Values that convert exactly from decimal to default real, e.g. 1.0 and
0.125, do not elicit this warning.
There are many contexts in which Fortran implicitly converts constants.
This patch covers name constant values, variable and component
initialization, constants in expressions, structure constructor
components, and array constructors.
For example, "real(8) :: tenth = 0.1" is a common Fortran bug that's
hard to find, and is one that often trips up even experienced Fortran
programmers. Unlike C and C++, the literal constant 0.1 is *not* double
[2 lines not shown]
[GlobalISel] Fix bitcast fewerElements with scalar narrow types. (#153364)
For a <8 x i32> -> <2 x i128> bitcast, that under aarch64 is split into
two halfs, the scalar i128 remainder was causing problems, causing a
crash with invalid vector types. This makes sure they are handled
correctly in fewerElementsBitcast.
[lldb][test] Make TestFindRangesInMemory.py more robust (#152817)
`GetHeapRanges()` could return two overlapping ranges because it did not
check whether `heap_pointer1` lies within the range returned for
`heap_pointer2`. This could result in a test failure in
`test_find_ranges_in_memory_two_matches` when
`process.FindRangesInMemory()` returned 3 instead of 2.
The patch ensures that `GetHeapRanges()` returns either two
non-overlapping ranges or one range covering both heap pointers.
The issue was probably introduced in #111951