The C reproducers generated by gcc_jit_context_dump_reproducer_to_file contain numerous pointer values (from %p) to ensure uniqueness of the identifiers, but this makes them less readable than they could be.
This patch updates reproducer::make_identifier so that the pointer is only added if it's necessary for uniqueness.
- jit-recording.c (class gcc::jit::reproducer): Rename field "m_identifiers" to "m_map_memento_to_identifier". Add field "m_set_identifiers" and struct hash_traits for it. (gcc::jit::reproducer::reproducer): Update for above. (convert_to_identifier): New function. (gcc::jit::reproducer::ensure_identifier_is_unique): New method. (gcc::jit::reproducer::make_identifier): Avoid appending the %p unless necessary for uniqueness. Update for field renaming. (gcc::jit::reproducer::get_identifier): Update for field renaming.
e0d26ea jit: make simpler reproducers
gcc/jit/ChangeLog | 12 ++++++++++
gcc/jit/jit-recording.c | 62 +++++++++++++++++++++++++++++++++++++++----------
2 files changed, 62 insertions(+), 12 deletions(-)