[AArch64] Move branch relaxation after bbsection assignment
authorDaniel Hoekwater <hoekwater@google.com>
Tue, 27 Jun 2023 01:30:27 +0000 (01:30 +0000)
committerDaniel Hoekwater <hoekwater@google.com>
Fri, 21 Jul 2023 20:24:52 +0000 (20:24 +0000)
commit0315fca9120b84487870412adb8edc586eda704f
treebf9b3eeef2190a16d77be13db6a93ac4afc40cfc
parentf2e8b38fa51c9fbfc1e25a78f78122d6737b0c58
[AArch64] Move branch relaxation after bbsection assignment

Because branch relaxation needs to factor in if branches target
a block in the same section or a different one, it needs to run
after the Basic Block Sections / Machine Function Splitting passes.

Because Jump table compression relies on block offsets remaining
fixed after the table is compressed, we must also move the JT
compression pass.

The only tests affected are ones enforcing just the ordering and
the a few that have basic block ids changed because RenumberBlocks
hasn't run yet.

Differential Revision: https://reviews.llvm.org/D153829
llvm/include/llvm/CodeGen/TargetPassConfig.h
llvm/lib/CodeGen/TargetPassConfig.cpp
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/test/CodeGen/AArch64/O0-pipeline.ll
llvm/test/CodeGen/AArch64/O3-pipeline.ll
llvm/test/CodeGen/AArch64/arm64-opt-remarks-lazy-bfi.ll
llvm/test/CodeGen/AArch64/seh_funclet_x1.ll
llvm/test/CodeGen/AArch64/wineh-try-catch.ll
llvm/test/DebugInfo/AArch64/fallthrough-branch.ll