[lldb][test] Disable parallel module loading for TestNetBSDCore.py (#159395)
Since #157170 this test has been flakey on several LLDB buildbots. I
suspect it's to do with mutli-threading, there are more details in
#159377.
Disable parallel loading for now so we are not spamming people making
unrelated changes.
[SFrames] Emit and relax FREs (#158154)
This PR emits and relaxes the FREs generated in the previous PR.
After this change llvm emits usable sframe sections that can be
linked with the gnu linker. There are a few remaining cfi directives to
handle before they are generally usable, however.
The output isn't identical with gnu-gas in every case (this code
produces
fewer identical FREs in a row than gas), but I'm reasonably sure that
they are correct regardless. There are even more size optimizations that
can be done later.
Also, while working on the tests, I found a few bugs in older portions
and cleaned those up.
This is a fairly big commit, but I'm not sure how to make it smaller.
[clang] Do not diagnose conflicting types for cfi_unchecked_callee (#157762)
Clang would complain about conflicting types between a function
declaration and definition if the declaraion was marked with the
attribute but the definition wasn't. Do not treat this as an error. It
should only be necessary to mark the declaration with the attribute.
[analyzer] Prevent triplicate warnings for `sarif-html` (#158112)
When `-analyzer-output=sarif-html` is specified, the analyzer was
reporting each warning to the console three times. This is because the
code to create the diagnostic consumers for `sarif-html` was calling the
code for `sarif` and `html` separately, each of which also creates its
own console text consumer. Then the `sarif-html` code itself created a
third.
The fix is to factor out the creation of the SARIF and HTML consumers
from the text consumers, so `sarif-html` just calls the code to create
the SARIF and HTML consumers without the text consumers.
The same fix applies for `plist-html`.
I've updated one of the SARIF tests to specify `sarif-html`. This test
would fail in the regular `-verify` validation due to the triplicated
warnings, but now passes with my fix.
Fixes #158103
rdar://160383710
[AArch64][GlobalISel] Legalize more G_VECREDUCE_FMIN/FMAX operations. (#159082)
Enabling scalarisation for `G_VECREDUCE_FMIN` and `G_VECREDUCE_FMAX`
allows for more instructions to be handled such as `v2fp128`.
[flang][runtime] Fix bug with NAMELIST in child input (#159173)
Don't let "hitSlash_" flag in child input propagate back to the parent
input statement's state when the child input was NAMELIST and the
NAMELIST input has properly consumed the terminal '/' character. (It can
get set if NAMELIST item input ran into it.) The current failure to
reset that flag is causing list-directed parent input to stop early.
Fixes https://github.com/llvm/llvm-project/issues/159127.
[flang] Check I/O implied DO indices better (#159150)
We're not checking READ statement implied DO index variables at all, and
we're not checking them for definability.
[flang] Fix UTF-8 minimality checks (#159142)
UTF-8 encodings are required to be minimal, but the checks for
minimality of 3-byte and 4-byte sequences were incorrect. Fix.
[flang][runtime] Block bad left tabbing in child I/O (#158758)
Child I/O subroutines are not supposed to use T or TL control edit
descriptors in formats to move the position in the current record to a
point before where it stood at the time of their calls (F'2023
12.6.4.8.3 paragraph 18), but we should also guard against attempts to
do so, using the same means used to prevent such attempts in
non-advancing I/O.
Fixes https://github.com/llvm/llvm-project/issues/158723.
[flang] Allow for equivalent types in non-TBP defined I/O (#158755)
Non-extensible derived type -- those with SEQUENCE or BIND(C) -- are
allowed as monomorphic "dtv" dummy arguments to defined I/O subroutines.
Fortran's type rules admit structural equivalence for these types, and
it's possible that I/O might be attempted in a scope using a
non-extensible type that's equivalent to a non-type-bound generic
interface's specific procedure's "dtv" dummy argument's type, but not
defined in the same place.
Fixes https://github.com/llvm/llvm-project/issues/158673.
This is an IBM Fortran test case that doesn't need to be duplicated in
LLVM.
[sanitizer-common][Darwin] Improve mach_vm_region_recurse error handling (#158670)
Some sanitizers use mach_vm_region_recurse on macOS to find a
sufficiently large gap to allocate shadow memory. Some sandboxes do not
allow this.
When we get KERN_DENIED, we suggest to the user that it may have been
blocked by the sandbox.
For error codes other than KERN_INVALID_ADDRESS and KERN_DENIED, we make
sure to log a message and not use the address.
rdar://160625998
[flang] Fix crash in error recovery (#158750)
Code to attach a procedure's declaration to an error message did not
allow for ENTRY names, which can be in the global scope.
Fixes https://github.com/llvm/llvm-project/issues/158405.
[flang] Fix name resolution bug (#158749)
When the current scope is an implied DO loop nested within a derived
type declaration, it is possible for name resolution to mistakenly
resolve a name to a component rather than to a name in the outer scope.
Fix.
Fixes https://github.com/llvm/llvm-project/issues/158412.
[flang][runtime] Disable namelist storage sequence input when defined (#158708)
The runtime supports a near-universal extension to namelist input that
allows reading a sequence of values into a storage sequence beginning at
an array element, e.g. &NML A(2)=1. 2. 3. / .
Disable this extension when the type of the array has a defined
formatted READ subroutine defined. That defined input procedure may
itself not be using list-directed input, and might not notice a
following slash or new input item name as such.
Fixes https://github.com/llvm/llvm-project/issues/158496.
[AArch64] Remove dead vector.partial.reduce DAGCombine (NFC) (#159362)
This intrinsic is already lowered in SelectionDAGBuilder.cpp into
ISD::PARTIAL_REDUCE_UMLA, so the DAGCombine will never trigger. The
optimisations we were doing are also superseded by generic ones in
DAGCombiner.cpp.
[DAG] getNode() - reuse result type instead of calling getValueType again. NFC. (#159381)
We have assertions above confirming VT == N1.getValueType() for INSERT_VECTOR_ELT nodes.
[scudo] Move the trace point in releaseToOSMaybe (#159204)
Move the trace point until right before the mark free blocks call for
the primary. This avoids adding extra calculations on a fast path.
[CI] Test lit when it is changed (#159359)
This patch makes it so that we run the lit tests when lit is changed.
This can make it much easier to catch portability issues with the tests
(like tests not working properly on Windows). It's also helpful as we
spend time working on enabling the internal shell by default.