[Bazel] Fixes for commit b8afba677502 (#227808)
Add missing //llvm:CodeGen, //llvm:Core, and //llvm:Demangle
dependencies to clang:codegen_utils, and add :codegen_utils to
clang:cir_frontend_action.
Flang improve fidelity of unformatted I/O endianness with FORT_CONVERT_UNIT (#223831)
Add further fidelity to specifying desired endianness of unformatted I/O
file on a per unit basis with the `FORT_CONVERT_UNIT` environment
variable.
To reviewers (friends) I'm not sure about:
1. The correct function prefixing for the FLANG runtime environment.
2. How to test/validate on Windows
3. How to test/validate with CUDA runtime support enabled
Thank you.
https://discourse.llvm.org/t/runtime-unformatted-i-o-conversion-between-big-and-little-endian-formats/91751
Documentation for new environment variable:
[85 lines not shown]
[Clang] Retain constructor/destructor variants when symbol must be kept (#226572)
With -mconstructor-aliases, complete constructor and destructor variants
with discardable-if-unused linkage can be silently replaced in the IR
(RAUW) rather than emitted as distinct symbols. This prevents
-fkeep-inline-functions and `__attribute__((used))` from retaining the
complete (C1/D1) variants.
Skip RAUW when the declaration requires its symbol to be kept by
introducing structorSymbolMustBeRetained(), which returns true when`
__attribute__((used)) `is present or -fkeep-inline-functions is active
for an inline definition that is not available_externally.
Assisted-by: IBM Bob
[RISC-V][MC] Reject x0 as the address/temporary register for load/store pseudos (#227512)
Using the zero register as the destination for integer load pseudos or as
the temporary register for floating-point load and store pseudos is
illegal since it is used to synthesize the target address, and using x0
would mean the auipc/qc.e.li result is ignored and we access an invalid
location.
This commit was created with the help of AI tools
Pull-Request: https://github.com/llvm/llvm-project/pull/227512
[InstCombine] Fold exp2(uitofp x) to ldexp(1.0, x) with ninf
`exp2(uitofp iN x) -> ldexp(1.0, zext x)` currently requires N to be
narrower than `int`, because `ldexp` takes a signed `int` exponent.
When N equals the width of `int`, the fold is still correct under `ninf`.
Every LLVM FP type has $E_{\max} \le 16383 < 2^{15} \le 2^{N-1}$, so:
- $x < 2^{N-1}$: signed and unsigned $x$ agree, so $\operatorname{ldexp}(1.0, x) = 2^{x} = \operatorname{exp2}(x)$.
- $x \ge 2^{N-1}$: $\operatorname{exp2}(x) \ge 2^{2^{N-1}} > 2^{E_{\max}}$ overflows to $+\infty$, which is poison under `ninf`.
This only applies to the intrinsic, since the `exp2` libcall may set
`errno` on overflow.
This also enables `pow(2.0, uitofp x) -> ldexp` via the existing
`pow(2^n, x) -> exp2(n * x)` fold.
[InstCombine] Pre-commit tests for exp2(uitofp) -> ldexp with ninf. NFC
Add baseline tests for folding `exp2(uitofp iN x)` to `ldexp(1.0, x)`
when N equals the width of C int, including negative tests (no ninf,
source wider than int, libcall).
[clang][CodeGen] Fix stack-use-after-return in deferred annotations (#226942)
CodeGenModule::DeferredAnnotations was keyed by StringRef, but not every
mangled name passed to GetOrCreateLLVMFunction outlives the call.
CodeGenVTables::maybeEmitThunk mangles the thunk name into a stack-local
SmallString and hands it to GetAddrOfThunk, so for an annotated virtual
function the map retained a reference into a frame that was gone by the
time EmitGlobalAnnotations looked the key up.
ASan reports this as a stack-use-after-return in EmitGlobalAnnotations,
with the freed frame being maybeEmitThunk's 'Name'. The user-visible
effect is that annotations silently disappear from the this-adjusting
thunks once the dead frame has been reused.
Make the key own its storage, using StringMap<unsigned> as the MapVector
map type so lookups still hash a StringRef without allocating.
The clang/test/CodeGenCXX/attr-annotate-member-functions.cpp test has
been created with help of an AI.
net-p2p/jackett: update to 0.24.2685 and narrow target framework to net9.0
Update to 0.24.2685 and narrow the TargetFrameworks to net9.0,
dropping net471 and netstandard2.0.
The port only ever publishes net9.0, but restore resolves every target
framework a project declares, so all dependencies for net2.0 and net471
were all being fetched and then ignored.
Rewriting TargetFrameworks takes distinfo from 287 packages to 51.
Changelog: https://github.com/Jackett/Jackett/releases
PR: 297824
Co-authored-by: Pete Diamond <lazeraman at gmail.com>