diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2025-06-10 00:11:58 -0700 |
---|---|---|
committer | Andrew Pinski <andrew.pinski@oss.qualcomm.com> | 2025-08-14 00:28:20 -0700 |
commit | ee67004474d521f7e107ec2795cfbb894a855c87 (patch) | |
tree | 748181a9f1a9801e08e1f141bfd3187f8bb9929a /libjava/java | |
parent | 82d1617551aad498957cbbc0558001e2b24dc2f9 (diff) | |
download | gcc-ee67004474d521f7e107ec2795cfbb894a855c87.zip gcc-ee67004474d521f7e107ec2795cfbb894a855c87.tar.gz gcc-ee67004474d521f7e107ec2795cfbb894a855c87.tar.bz2 |
forwprop: Copy prop aggregates into args
This implements the simple copy prop of aggregates into
arguments of function calls. This can reduce the number of copies
done. Just like removing of an extra copy in general, this can and
will help out SRA; since we might not need to do a full scalarization
of the aggregate now.
This is the simpliest form of this copy prop of aggregates into function arguments.
Changes since v1:
* v2: Merge in the changes of r16-3160-g2fe432175ef135.
Move the checks for assignment and call statement into optimize_agr_copyprop
rather than having it in optimize_agr_copyprop_1 and optimize_agr_copyprop_arg.
gcc/ChangeLog:
* tree-ssa-forwprop.cc (optimize_agr_copyprop_1): New function split out of ...
(optimize_agr_copyprop): Here. Also try calling optimize_agr_copyprop_arg.
(optimize_agr_copyprop_arg): New function.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/copy-prop-aggregate-arg-1.c: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'libjava/java')
0 files changed, 0 insertions, 0 deletions