https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119318
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Jambor <jamb...@gcc.gnu.org>: https://gcc.gnu.org/g:f33d2e6b532304d487193667e6b5d8f8d7df2bf4 commit r15-9426-gf33d2e6b532304d487193667e6b5d8f8d7df2bf4 Author: Martin Jambor <mjam...@suse.cz> Date: Mon Apr 14 14:21:14 2025 +0200 ipa: Record and stream result types of arithemetic jump functions In order to replace the use of somewhat unweildy expr_type_first_operand_type_p we need to record and stream the types of results of operations recorded in arithmetic jump functions. This is necessary so that we can then simulate them at the IPA stage with the corresponding precision and signedness. This patch does the recorsing and streaming, the following one adds the use of the date. Per Honza's request this version also checks that we do not put VLA types into the global LTO stream, even though I was not able to actually craft a test-case that would do that without them. gcc/ChangeLog: 2025-04-11 Martin Jambor <mjam...@suse.cz> PR ipa/118097 PR ipa/118785 PR ipa/119318 * lto-streamer.h (lto_variably_modified_type_p): Declare. * ipa-prop.h (ipa_pass_through_data): New field op_type. (ipa_get_jf_pass_through_op_type): New function. * ipa-prop.cc: Include lto-streamer.h. (ipa_dump_jump_function): Dump also pass-through operation types, if any. Dump pass-through operands only if not NULL. (ipa_set_jf_simple_pass_through): Set op_type accordingly. (compute_complex_assign_jump_func): Set op_type of arithmetic pass-through jump_functions. (analyze_agg_content_value): Update lhs when walking assighment copies. Set op_type of aggregate arithmetic pass-through jump_functions. (update_jump_functions_after_inlining): Also transfer the operation type from the source arithmentic pass-through jump function to the destination jump function. (ipa_write_jump_function): Stream also the op_type when necessary. (ipa_read_jump_function): Likewise. (ipa_agg_pass_through_jf_equivalent_p): Also compare operation types. * lto-streamer-out.cc (lto_variably_modified_type_p): Make public.