> 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.
> 
> Bootstrapped and tested and LTO bootstrapped on x86_64-linux. OK for
> master?
> 
> Thanks,
> 
> Martin
> 
> 
> gcc/ChangeLog:
> 
> 2025-03-20  Martin Jambor  <mjam...@suse.cz>
> 
>       PR ipa/118097
>       PR ipa/118785
>       PR ipa/119318
>       * ipa-prop.h (ipa_pass_through_data): New field op_type.
>       (ipa_get_jf_pass_through_op_type): New function.
>       * ipa-prop.cc (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.

I wonder if we can force variably modified types this way into the
global stream?  All other types are in global stream anyway, but
streaming VLAs may lead to bit of a surprises.

Honza

Reply via email to