[CodeGen] Remove extraneous ArrayRef (NFC) (#90423)
We don't need to explicitly create an instance of ArrayRef here
because getIndexedOffsetInType takes ArrayRef, and ArrayRef can be
implicitly constructed from a C array.
[libc][math] Adds entrypoint and tests for nearbyintf128,scalbnf128 (#88443)
Closes #84689.
Adding @lntue for review.
I was curious about the implementation of
`round_using_current_rounding_mode` used for the `nearbyint` functions.
It has one of the rounding modes as unreachable
([here](https://github.com/llvm/llvm-project/blob/main/libc/src/__support/FPUtil/NearestIntegerOperations.h#L243)),
and I was wondering if this was okay for the `nearbyint` functions.
---------
Co-authored-by: Michael Flanders <mkf727 at cs.washington.edu>
[BOLT] Use heuristic for matching split local functions (#90424)
Use known order of BOLT split function symbols: fragment symbols
immediately precede the parent fragment symbol.
Depends On: https://github.com/llvm/llvm-project/pull/89648
Test Plan: Added register-fragments-bolt-symbols.s
Skip various tests under ASAN on green dragon (#90531)
using the macOS version as a proxy. I can't reproduce any of these
failures locally, but the tests all use pexpect and probably have bad
timeout behavior under high load.
[Clang] Handle structs with inner structs and no fields (#89126)
A struct that declares an inner struct, but no fields, won't have a
field count. So getting the offset of the inner struct fails. This
happens in both C and C++:
struct foo {
struct bar {
int Quantizermatrix[];
};
};
Here 'struct foo' has no fields.
Closes: https://github.com/llvm/llvm-project/issues/88931
Fix Objective-C++ Sret of non-trivial data types on Windows ARM64 (#88671)
Linked to https://github.com/gnustep/libobjc2/pull/289.
More information can be found in issue: #88273.
My solution involves creating a new message-send function for this
calling convention when targeting MSVC. Additional information is
available in the libobjc2 pull request.
I am unsure whether we should check for a runtime version where
objc_msgSend_stret2_np is guaranteed to be present or leave it as is,
considering it remains a critical bug. What are your thoughts about this
@davidchisnall?
(cherry picked from commit 3dcd2cca7777b338d87deb1ca506df1376123667)
[mlir-lsp] Support outgoing requests (#90078)
Add support for outgoing requests to `lsp::MessageHandler`. Much like
`MessageHandler::outgoingNotification`, this allows for the message
handler to send outgoing messages via its JSON transport, but in this
case, those messages are requests, not notifications.
Requests receive responses (also referred to as "replies" in
`MLIRLspServerSupportLib`). These were previously unsupported, and
`lsp::MessageHandler` would log an error each time it processed a JSON
message that appeared to be a response (something with an "id" field,
but no "method" field). However, the `outgoingRequest` method now
handles response callbacks: an outgoing request with a given ID is set
up such that a callback function is invoked when a response with that ID
is received.
Make minor improvements to the creduce wrapper script
Use shlex.quote instead of pipes.quote. We don't need to support Python
2.7 anymore.
Remove -fcolor-diagnostics first, because that can sometimes interfere
with the interestingness test.
[CodeGen][i386] Move -mregparm storage earlier and fix Runtime calls (#89707)
When building the Linux kernel for i386, the -mregparm=3 option is
enabled. Crashes were observed in the sanitizer handler functions, and
the problem was found to be mismatched calling convention.
As was fixed in commit c167c0a4dcdb ("[BuildLibCalls] infer inreg param
attrs from NumRegisterParameters"), call arguments need to be marked as
"in register" when -mregparm is set. Use the same helper developed there
to update the function arguments.
Since CreateRuntimeFunction() is actually part of CodeGenModule, storage
of the -mregparm value is also moved to the constructor, as doing this
in Release() is too late.
Fixes: https://github.com/llvm/llvm-project/issues/89670
[BOLT] Add support for BOLT-reserved space in a binary (#90300)
Allow the user to allocate space in a binary that could be used by BOLT
for allocating new sections. The reservation is specified by two special
symbols recognizable by BOLT: __bolt_reserved_{start,end}.
The reserved space will be useful for optimizing the Linux kernel where
we cannot allocate a new executable segment. However, the support is not
limited to kernel binaries as some user-space application may find it
useful too.
[WebAssembly] Enable multivalue and reference-types in generic CPU config (#80923)
This enables multivalue and reference-types in `-mcpu=generic`
configuration. These proposals have been standardized and supported in
all major browsers for several years at this point:
https://github.com/WebAssembly/proposals/blob/main/finished-proposals.md
[clang][NFC] Repair tests for __builtin_convertvector on big-endian
Previously, the macro expansion to be explicit for the test cases had
unintentionally forced the tests to always run in little-endian mode.
This change restores the tests' endianness switch, and ensures that
the tests always run on both a little- and big-endian platform.
[driver] Allow `ld` as a driver alias to lld (#90515)
This adds a "hidden" alias kind that allows using LLD when symlinked as
`ld`; however, it does not install `ld` as a symlink. This is to allow
either using a mixed toolchain with both LLD and GNU ld, or a pure LLD
toolchain where LLD has been installed (or symlinked) to `ld` for
compatibility w/ older tools that expect `ld`.
Add a new SBExpressionOptions::SetLanguage() API (NFCI) (#89981)
that separates out language and version. To avoid reinventing the wheel
and introducing subtle incompatibilities, this API uses the table of
languages and versiond defined by the upcoming DWARF 6 standard
(https://dwarfstd.org/languages-v6.html). While the DWARF 6 spec is not
finialized, the list of languages is broadly considered stable.
The primary motivation for this is to allow the Swift language plugin to
switch between language dialects between, e.g., Swift 5.9 and 6.0 with
out introducing a ton of new language codes. On the main branch this
change is considered NFC.
Depends on https://github.com/llvm/llvm-project/pull/89980
[Driver] Clean up denormal handling with fast-math-related options (#89477)
This change cleans up the clang driver handling of umbrella options like
-ffast-math, -funsafe-math-optimizations, and -ffp-model, and aligns the
behavior of -ffp-model=fast with -ffast-math with regard to the linking
of crtfastmath.o.
We agreed in a previous review that the fast-math options should not
attempt to change the -fdenormal-fp-math option, which is inherently
target-specific.
The clang user's manual claims that -ffp-model=fast "behaves identically
to specifying both -ffast-math and -ffp-contract=fast." Since
-ffast-math causes crtfastmath.o to be linked if it is available, that should
also happen with -ffp-model=fast.
I am going to be proposing further changes to -ffp-model=fast,
decoupling it from -ffast-math and introducing a new
-ffp-model=aggressive that matches the current behavior, but I wanted
to solidfy the current behavior before I do that.
[NFC] Fix hasQualifier comment (#90485)
operator bool from NestedNameSpecifierLoc and
member function hasQualifier both do the same thing, returning true if
the private data member Qualifier is not nullptr, so clearly one of the
comments is wrong, and in this case it is the second one.
fixes https://github.com/llvm/llvm-project/issues/90472
[BinaryFormat] Adjust OSABI functions and add unittests
Adjust #89280:
* ELFOSABI_LINUX is a historical alias that should not be used in new
code. readelf -h displays "UNIX - GNU" instead of "Linux".
* "OS" is inappropriate. Some values are architecture-specific, e.g.
ELFOSABI_ARM.
* Drop lowercase, which seems a job of the caller.
Add some unittests.
Pull Request: https://github.com/llvm/llvm-project/pull/90270