]> gcc.gnu.org Git - gcc.git/commit
expand: constify sepops operand to expand_expr_real_2 and expand_widen_pattern_expr...
authorAndrew Pinski <quic_apinski@quicinc.com>
Thu, 13 Jun 2024 20:07:10 +0000 (13:07 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Fri, 14 Jun 2024 03:10:53 +0000 (20:10 -0700)
commitd8a6de9e2b850b71712e89e8e6026e4ae6284766
tree187772fe33cdb7733e35c52d99a1f107e7da29e8
parent028cd77db322d21312680c9a0a7c30565854f577
expand: constify sepops operand to expand_expr_real_2 and expand_widen_pattern_expr [PR113212]

While working on an expand patch back in January I noticed that
the first argument (of sepops type) of expand_expr_real_2 could be
constified as it was not to be touched by the function (nor should it be).
There is code in internal-fn.cc that depends on expand_expr_real_2 not touching
the ops argument so constification makes this more obvious.

Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

PR middle-end/113212
* expr.h (const_seqpops): New typedef.
(expand_expr_real_2): Constify the first argument.
* optabs.cc (expand_widen_pattern_expr): Likewise.
* optabs.h (expand_widen_pattern_expr): Likewise.
* expr.cc (expand_expr_real_2):  Likewise
(do_store_flag): Likewise. Remove incorrect store to ops->code.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/expr.cc
gcc/expr.h
gcc/optabs.cc
gcc/optabs.h
This page took 0.064377 seconds and 6 git commands to generate.