1. [ELF] --emit-relocs: fix a crash if .rela.dyn is an empty output section (details)
  2. [NFC] Use regex for code object version in hip tests (details)
  3. [LoopNest] Handle loop-nest passes in LoopPassManager (details)
  4. Revert "[PowerPC] Extend folding RLWINM + RLWINM to post-RA." (details)
  5. [AArch64InstPrinter] Change printADRPLabel to print the target address in hexadecimal form (details)
Commit 16cb7910f51f0c2570b1f3406bcd8d4069e52a3e by i
[ELF] --emit-relocs: fix a crash if .rela.dyn is an empty output section

Fix PR48357: If .rela.dyn appears as an output section description, its type may
be SHT_RELA (due to the empty synthetic .rela.plt) while there is no input
section. The empty .rela.dyn may be retained due to a reference in a linker
script. Don't crash.

Reviewed By: grimar

Differential Revision:
The file was addedlld/test/ELF/linkerscript/emit-relocs-rela-dyn.s
The file was modifiedlld/ELF/OutputSections.cpp
Commit c0619d3b21cd420b9faf15f14db0816787c44ded by jonathanchesterfield
[NFC] Use regex for code object version in hip tests

[NFC] Use regex for code object version in hip tests

Extracted from D93258. Makes tests robust to changes in default
code object version.

Reviewed By: t-tye

Differential Revision:
The file was modifiedclang/test/Driver/hip-rdc-device-only.hip
The file was modifiedclang/test/Driver/hip-code-object-version.hip
The file was modifiedclang/test/Driver/hip-toolchain-opt.hip
The file was modifiedclang/test/Driver/hip-host-cpu-features.hip
The file was modifiedclang/test/Driver/hip-device-compile.hip
The file was modifiedclang/test/Driver/hip-toolchain-rdc.hip
The file was modifiedclang/test/Driver/hip-toolchain-rdc-static-lib.hip
The file was modifiedclang/test/Driver/hip-toolchain-mllvm.hip
The file was modifiedclang/test/Driver/hip-target-id.hip
The file was modifiedclang/test/Driver/hip-autolink.hip
The file was modifiedclang/test/Driver/hip-toolchain-no-rdc.hip
The file was modifiedclang/test/Driver/hip-toolchain-rdc-separate.hip
Commit fa3693ad0b34ef1d64f49e3d3dd10865b9fb7a8b by whitneyt
[LoopNest] Handle loop-nest passes in LoopPassManager

Per, the goal of this
patch (and other following patches) is to create facilities that allow
implementing loop nest passes that run on top-level loop nests for the
New Pass Manager.

This patch extends the functionality of LoopPassManager to handle
loop-nest passes by specializing the definition of LoopPassManager that
accepts both kinds of passes in addPass.

Only loop passes are executed if L is not a top-level one, and both
kinds of passes are executed if L is top-level. Currently, loop nest
passes should have the following run method:

PreservedAnalyses run(LoopNest &, LoopAnalysisManager &,
LoopStandardAnalysisResults &, LPMUpdater &);

Reviewed By: Whitney, ychen
Differential Revision:
The file was modifiedllvm/lib/Transforms/Scalar/LoopPassManager.cpp
The file was modifiedllvm/unittests/IR/PassBuilderCallbacksTest.cpp
The file was modifiedllvm/include/llvm/Analysis/LoopNestAnalysis.h
The file was modifiedllvm/include/llvm/Transforms/Scalar/LoopPassManager.h
The file was modifiedllvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp
The file was modifiedllvm/lib/Analysis/LoopNestAnalysis.cpp
Commit 2ea7210e3946b25ea52af061e8ae45d26877507a by esme.yi
Revert "[PowerPC] Extend folding RLWINM + RLWINM to post-RA."

This reverts commit 1c0941e1524f499e3fbde48fc3bdd0e70fc8f2e4.
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCMIPeephole.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.h
The file was modifiedllvm/test/CodeGen/PowerPC/vsx_builtins.ll
The file was removedllvm/test/CodeGen/PowerPC/fold-rlwinm-after-ra.mir
The file was modifiedllvm/lib/Target/PowerPC/PPCPreEmitPeephole.cpp
Commit 66bcbdbc9c584becff35f6795cd2836a7a0141b2 by i
[AArch64InstPrinter] Change printADRPLabel to print the target address in hexadecimal form

Similar to D77853. Change ADRP to print the target address in hex, instead of the raw immediate.
The behavior is similar to GNU objdump but we also include `0x`.

Note: GNU objdump is not consistent whether or not to emit `0x` for different architectures. We try emitting 0x consistently for all targets.

GNU objdump:       adrp x16, 10000000
Old llvm-objdump:  adrp x16, #0
New llvm-objdump:  adrp x16, 0x10000000

`adrp Xd, 0x...` assembles to a relocation referencing `*ABS*+0x10000` which is not intended. We need to use a linker or use yaml2obj.
The main test is `test/tools/llvm-objdump/ELF/AArch64/pcrel-address.yaml`

Differential Revision:
The file was modifiedllvm/lib/Target/AArch64/
The file was modifiedlld/test/ELF/aarch64-tls-ie.s
The file was modifiedllvm/test/MC/AArch64/adr.s
The file was modifiedlld/test/ELF/aarch64-relocs.s
The file was modifiedlld/test/ELF/aarch64-copy.s
The file was modifiedlld/test/ELF/aarch64-feature-bti.s
The file was modifiedllvm/test/tools/llvm-objdump/ELF/AArch64/elf-aarch64-mapping-symbols.test
The file was modifiedlld/test/ELF/aarch64-condb-reloc.s
The file was modifiedlld/test/ELF/aarch64-ifunc-bti.s
The file was modifiedlld/test/ELF/aarch64-tls-gdie.s
The file was modifiedlld/test/ELF/aarch64-cortex-a53-843419-recognize.s
The file was modifiedlld/test/ELF/aarch64-undefined-weak.s
The file was modifiedlld/test/ELF/aarch64-gnu-ifunc-nonpreemptable.s
The file was modifiedlld/test/COFF/arm64-relocs-imports.test
The file was modifiedlld/test/ELF/aarch64-fpic-got.s
The file was addedllvm/test/tools/llvm-objdump/ELF/AArch64/pcrel-address.yaml
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.h
The file was modifiedlld/test/COFF/arm64-import2.test
The file was modifiedlld/test/ELF/aarch64-gnu-ifunc-address.s
The file was modifiedlld/test/COFF/arm64-thunks.s
The file was modifiedlld/test/ELF/aarch64-cortex-a53-843419-large.s
The file was modifiedlld/test/ELF/aarch64-plt.s
The file was modifiedlld/test/ELF/aarch64-gnu-ifunc2.s
The file was modifiedllvm/test/MC/AArch64/coff-relocations.s
The file was modifiedlld/test/COFF/arm64-delayimport.yaml
The file was modifiedlld/test/ELF/aarch64-thunk-pi.s
The file was modifiedlld/test/ELF/aarch64-feature-pac.s
The file was modifiedlld/test/ELF/aarch64-gnu-ifunc.s
The file was modifiedlld/test/ELF/aarch64-cortex-a53-843419-address.s
The file was modifiedlld/test/ELF/aarch64-tlsdesc.s
The file was modifiedlld/test/ELF/aarch64-tstbr14-reloc.s
The file was modifiedlld/test/ELF/aarch64-cortex-a53-843419-thunk.s
The file was modifiedlld/test/ELF/aarch64-gnu-ifunc-plt.s
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
The file was modifiedlld/test/ELF/aarch64-hi21-nc.s
The file was modifiedlld/test/ELF/aarch64-feature-btipac.s