[PowerPC][AIX] Reject .weak_definition like ELF (#156072)
weak_definition is a Mach-O-specific directive and is not supported on
XCOFF. Previously it crashed the XCOFF streamer via report_fatal_error
in emitSymbolAttribute. Return false for MCSA_WeakDefinition like
MCELFStreamer does, so the parser rejects it with the same diagnostic as
ELF.
Revert "[libc] Add realpath to linux entrypoints" (#215156)
Reverts llvm/llvm-project#212925, the tests assume that `/tmp` is a
real, valid directory on the system, which is not true for all
buildbots. `libc-riscv32-qemu-yocto-fullbuild-dbg` in particular seems
to have a symlink or similar from `/tmp` to `/var/volatile/tmp`. See
https://github.com/llvm/llvm-project/pull/212925#issuecomment-5234167255.
[VPlan] Don't classify irregular element types as contiguous. (#215121)
Before classifying an access as continuous, check if it has an irregular
type. If so, do not widen incorrectly. This matches the logic of the
inner loop code path.
[BFI] Extract computeMassInIrreducibleLoop. NFC (#215137)
This is a load-bearing irreducible loop extension of the Wu-larus
algorithm.
Give it its own function.
[Clang] Fix -Wunused-variable in #211482 (#215134)
This is only used in asserts, so fails in a release build without
asserts with -Werror -Wunused-variable with the latest clang.
[BOLT] Relax conditional tail calls in non-simple functions (#214400)
In compact code model relaxLocalBranches() skipped non-simple functions
that may have conditional tail calls targeting symbols in other far away
functions, which could fail during JITLink because the targets are out
of range.
Fix this by having relaxLocalBranches() process non-simple functions,
for which trampolines are added at the end of function body using
unconditional branches (128MB range) to reach far away targets.
[BFI] Detect irreducible SCC from CycleInfo instead of by failing. NFC (#214941)
BFI computes block frequencies with the Wu-Larus algorithm, extended (in
2014) to irreducible SCCs by modelling each one as a loop with multiple
headers.
Irreducible SCCs are detected by failing: mass distribution runs until
`addToDist` hits a retreating local edge to a non-header, then aborts,
packages the SCCs it found, and reruns.
CycleInfo already reports reducibility, so mark the innermost enclosing
loop (or the top level) while initializeLoops walks the cycle forest,
and package the marked regions before distributing any mass. The abort
paths and both undo sites become asserts.
Aided by Claude Opus 5
[DomTree] Store immediate dominator as DFS number. NFC (#215059)
Replace the local variable `IDoms` and the pointer `InfoRec::IDom` with
a DFS number member.
Since `attachNewSubtree` and `reattachExistingSubtree` walk NumToNode in
DFS order, they can index IDom directly. Replace an always-false `if
(DT.getNode(W))` condition with an assert.
[sanitizer-common][rtsan] Mark unsupported tests (#213404)
From #213170, turning that PR into separate commits as suggested.
To enable rtsan in sanitizer common, first disable the tests that are
not trivially fixable (or will remain permanently unsupported).
Quoting from that other review, assuming all of these are merged and
rtsan is enabled for sanitizer-common
---
Darwin:
New tests that run and pass: 249
UNSUPPORTED: 26
Total: 275
UNSUPPORTED percentage: 9.5%
Linux is about the same, few additional unsupported:
New tests that run and pass: 249
[6 lines not shown]