[MC] Change MCContext::getTargetOptions to return a reference. NFC (#194112)
Since #180464, MCAsmInfo stores a non-null MCTargetOptions pointer set
by
TargetRegistry::createMCAsmInfo, and MCContext's constructor asserts
that
MAI->getTargetOptions() is non-null. Return the options by reference
instead of by pointer so callers can drop the null handling.
[Clang][CodeGen] Report when an alias points to an incompatible target (#192397)
Add checks to ensure that an alias and its target have compatible types:
- Generate an error if a function alias points to a variable or vice
versa.
- Issue a warning for mismatches in function types.
- Ignore type discrepancies for variables.
This behavior aligns with similar diagnostics in GCC.
Resolves: #47301
[DataLayout] Add null pointer value infrastructure
Add support for specifying the null pointer bit representation per address space
in DataLayout via new pointer spec flags:
- 'z': null pointer is all-zeros
- 'o': null pointer is all-ones
When neither flag is present, the address space inherits the default set by the
new 'N<null-value>' top-level specifier ('Nz' or 'No'). If that is also absent,
the null pointer value is unknown and LLVM will not fold based on it.
No target DataLayout strings are updated in this change. This is pure
infrastructure for a future ConstantPointerNull semantic change to support
targets with non-zero null pointers (e.g. AMDGPU).
[LoongArch] Type legalize v2f32 loads by using an f64 load and a scalar_to_vector.
On 64-bit targets the generic legalize will use an i64 load and a
scalar_to_vector for us. But on 32-bit targets i64 isn't legal and the
generic legalizer will end up emitting two 32-bit loads.
[compiler-rt][WebAssembly] Use an int as CMP_RESULT (#194093)
LLVM uses an i32 as the default for `getCmpLibcallReturnType`, but
compiler-rt uses a word-sized integer by default. On most physical
hardware this happens to work because `i32` is largely ABI-compatible
with a word. On wasm64, however, they are not compatible so this causes
problems.
Resolve this by using `int` as the comparison result in compiler-rt.
Closes: https://github.com/llvm/llvm-project/issues/75302
Closes: https://github.com/llvm/llvm-project/issues/192416