There are a bunch of functions in compile.c that expose data from pycore_opcode_metadata.h as private C API. These are only used in Modules/_opcode.c.
However, Modules/_opcode.c can just include pycore_opcode_metadata.h and pycore_opcode_utils.h, and access this data directly.
Linked PRs