[lldb] Fix TestIvarProtocols to use +new instead of +alloc (NFC) (#172740)
A test failure on green dragon shows the ivars with unexpected values.
This makes the test us an explicit `+new` instead of `+alloc` (which is
missing an `-init` call).
[LLD] [COFF] Fix implicit DLL entry point for MinGW (#171680)
Previously, LLD would always set the implicit entry point for DLLs to
the symbol that is prefixed with an underscore. However, mingw-w64
defines it without that underscore.
This change fixes that by adding a special branch for MinGW. Also, it
simplifies tests that use MinGW style DLL entry symbol by skipping the
entry point argument.
Note, tests that use MSVC style DLL entry symbol and LLD in MinGW mode,
will now require using explicit entry point. I believe this is sensible.
When an explicit entry point is passed, i.e. LLD is called by Clang or
GCC, there will be no observable difference.
Fixes https://github.com/llvm/llvm-project/issues/171441
Make STLExtras's (all|any|none)_of() Utility Functions Constexpr-Friendly (#172536)
This patch replaces the implementation of `llvm::all_of`,
`llvm::any_of`, and `llvm::none_of` with simple loops instead of their
corresponding `std` versions. This makes them possible to be evaluated
at compile time for the time being. We can revisit once the C++ version
of LLVM is promoted to C++20.
https://en.cppreference.com/w/cpp/algorithm/all_any_none_of.html
This refactor was brought up in the context of this PR:
https://github.com/llvm/llvm-project/pull/172062#discussion_r2615331513
fix `llvm.fma.f16` double rounding issue when there is no native support (#171904)
fixes https://github.com/llvm/llvm-project/issues/98389
As the issue describes, promoting `llvm.fma.f16` to `llvm.fma.f32` does
not work, because there is not enough precision to handle the repeated
rounding. `f64` does have sufficient space. So this PR explicitly
promotes the 16-bit fma to a 64-bit fma.
I could not find examples of a libcall being used for fma, but that's
something that could be looked in separately to work around code size
issues.
[ORC] Rename WrapperFunctionResult to WrapperFunctionBuffer. NFCI. (#172633)
Also renames CWrapperFunctionResult to CWrapperFunctionBuffer.
These types are used as argument buffers, as well as result buffers. The
new name better reflects their purpose, and is consistent with naming in
the new ORC runtime (llvm-project/orc-rt).
Revert "[flang][cuda] Add support for derived-type initialization on device" (#172737)
Reverts llvm/llvm-project#172568 this cause some build bots failures.
[SPIRV] Add support for non-interposable function aliases
This patch implements support for calling functions through
non-interposable aliases in the SPIRV backend. When a call target
is a GlobalAlias, the alias is resolved to its underlying aliasee
object before code generation (when possible).
Interposable aliases are explicitly not supported yet and will cause
compilation to fail. This was not supported prior to this patch.
Tests added for both the supported non-interposable case and the
unsupported interposable case.
Reapply "[LV] Mark checks as never succeeding for high cost cutoff."
Reapply 8a115b6934a90441 with an update to tests handling remarks.
The patch now directly emits a clear remark when we bail out
due to the memory check threshold.
Original message:
When GeneratedRTChecks::create bails out due to exceeding the cost
threshold, no runtime checks are generated and we must not proceed
assuming checks have been generated.
Mark the checks as never succeeding, to make sure we don't try to
vectorize assuming the runtime checks hold. This fixes a case where we
previously incorrectly vectorized assuming runtime checks had been
generated when forcing vectorization via metadate.
Fixes the mis-compile mentioned in
https://github.com/llvm/llvm-project/pull/166247#issuecomment-3631471588
[clang] Remove pointless `hasDiagnostics()` checks (#172705)
Calling `CompilerInstance::hasDiagnostics()` after
`CompilerInstance::createDiagnostics()` is pointless, since the creation
step cannot fail. This removes such calls.