[llvm] [BOLT] Improve DWARF CFI generation for pac-ret binaries (PR #163381)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 19 23:49:19 PST 2025


maksfb wrote:

> This patch is looking to address edge-cases, so the required tests should have predictable and constant input.

To make sure I understand correctly: when you take an assembly function from a test case and send it through a standard pipeline to BOLT, the state of that function immediately after the CFG construction, i.e. before any passes are run, should be stable. My suggestion was to run a pass of your interest (`InsertNegateRAState`) immediately after that. However, in testing, you want to cover certain scenarios that depend on one or more passes that run between `buildCFG` and `InsertNegateRAState` , and these passes are (understandably) considered unstable. Then, the function state, that you are interested in, is impossible to recreate in assembly, presumably because of the metadata attached to the instructions is modified in a way that is not controllable via assembly?

If that's the case, I think you got the right approach for testing. Alternative would be to make a serializable IR with metadata which falls well outside of the scope of this PR.

https://github.com/llvm/llvm-project/pull/163381


More information about the llvm-commits mailing list