diff options
author | Martin Jambor <mjambor@suse.cz> | 2025-04-14 14:21:14 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2025-04-14 14:33:37 +0200 |
commit | f33d2e6b532304d487193667e6b5d8f8d7df2bf4 (patch) | |
tree | f9f18d70978804578fd57eeea92b112253b2ed5f /gcc/rust/rust-gcc.cc | |
parent | dd35f66287b7cca196a720c9641e463255dceb1c (diff) | |
download | gcc-f33d2e6b532304d487193667e6b5d8f8d7df2bf4.zip gcc-f33d2e6b532304d487193667e6b5d8f8d7df2bf4.tar.gz gcc-f33d2e6b532304d487193667e6b5d8f8d7df2bf4.tar.bz2 |
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 <mjambor@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.
Diffstat (limited to 'gcc/rust/rust-gcc.cc')
0 files changed, 0 insertions, 0 deletions