diff options
author | Richard Biener <rguenther@suse.de> | 2019-03-14 13:25:27 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-03-14 13:25:27 +0000 |
commit | baa09dc5c951213452446689466ad889656b9936 (patch) | |
tree | db95685f90a8eeb45ae9b08911a3d046e8db2389 /gcc/tree-into-ssa.c | |
parent | 27814aed3462d6bdce3c653e5e66d5e58cf4a5e7 (diff) | |
download | gcc-baa09dc5c951213452446689466ad889656b9936.zip gcc-baa09dc5c951213452446689466ad889656b9936.tar.gz gcc-baa09dc5c951213452446689466ad889656b9936.tar.bz2 |
c-tree.h (enum c_declspec_il): New.
2019-03-14 Richard Biener <rguenther@suse.de>
c/
* c-tree.h (enum c_declspec_il): New.
(struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
enum bitfield.
* c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
Pass start pass and declspec_il to c_parser_parse_gimple_body.
(c_parser_declspecs): Adjust.
* gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
and bitmap.h.
(struct gimple_parser): New.
(gimple_parser::push_edge): New method.
(c_parser_gimple_parse_bb_spec): New helper.
(c_parser_parse_gimple_body): Get start pass and IL specification.
Initialize SSA and CFG.
(c_parser_gimple_compound_statement): Handle CFG and SSA build.
Build a gimple_parser parsing state and pass it along.
(c_parser_gimple_statement): Change intermittend __PHI internal
function argument for the edge.
(c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
(c_parser_gimple_goto_stmt): Record edges to build.
(c_parser_gimple_if_stmt): Likewise.
* gimple-parser.h (c_parser_parse_gimple_body): Adjust.
(c_parser_gimple_or_rtl_pass_list): Likewise.
* gimple-pretty-print.c: Include cfgloop.h.
(dump_gimple_phi): Adjust.
(dump_gimple_bb_header): Dump loop header for GIMPLE.
(pp_cfg_jump): Adjust.
(dump_implicit_edges): Dump fallthru to next block for GIMPLE as well.
* tree-cfg.c (build_gimple_cfg): Remove lower_phi_internal_fn call.
(lower_phi_internal_fn): Remove.
(verify_gimple_call): Remove IFN_PHI special-casing.
(dump_function_to_file): Dump IL state.
* tree-into-ssa.c (rewrite_add_phi_arguments): Revert changes
done to deal with PHI nodes being present in non-SSA state.
* gcc.dg/gimplefe-13.c: Adjust.
* gcc.dg/gimplefe-14.c: Likewise.
* gcc.dg/gimplefe-17.c: Likewise.
* gcc.dg/gimplefe-18.c: Likewise.
* gcc.dg/gimplefe-7.c: Likewise.
* gcc.dg/torture/pr89595.c: Likewise.
* gcc.dg/tree-ssa/cunroll-13.c: Likewise.
* gcc.dg/tree-ssa/ivopt_mult_1g.c: Likewise.
* gcc.dg/tree-ssa/ivopt_mult_2g.c: Likewise.
* gcc.dg/tree-ssa/scev-3.c: Likewise.
* gcc.dg/tree-ssa/scev-4.c: Likewise.
* gcc.dg/tree-ssa/scev-5.c: Likewise.
* gcc.dg/vect/vect-cond-arith-2.c: Likewise.
* gcc.target/aarch64/sve/loop_add_6.c: Likewise.
From-SVN: r269682
Diffstat (limited to 'gcc/tree-into-ssa.c')
-rw-r--r-- | gcc/tree-into-ssa.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c index dad071d..061521d 100644 --- a/gcc/tree-into-ssa.c +++ b/gcc/tree-into-ssa.c @@ -1436,20 +1436,12 @@ rewrite_add_phi_arguments (basic_block bb) for (gsi = gsi_start_phis (e->dest); !gsi_end_p (gsi); gsi_next (&gsi)) { - tree currdef, res, argvar; + tree currdef, res; location_t loc; phi = gsi.phi (); res = gimple_phi_result (phi); - /* If we have pre-existing PHI (via the GIMPLE FE) its args may - be different vars than existing vars and they may be constants - as well. Note the following supports partial SSA for PHI args. */ - argvar = gimple_phi_arg_def (phi, e->dest_idx); - if (argvar && ! DECL_P (argvar)) - continue; - if (!argvar) - argvar = SSA_NAME_VAR (res); - currdef = get_reaching_def (argvar); + currdef = get_reaching_def (SSA_NAME_VAR (res)); /* Virtual operand PHI args do not need a location. */ if (virtual_operand_p (res)) loc = UNKNOWN_LOCATION; |