diff options
author | Jason Merrill <jason@redhat.com> | 2023-12-11 11:35:31 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2023-12-12 12:47:21 -0500 |
commit | de072b52292dc5218845904eee709c35a1418c3b (patch) | |
tree | 60041fe234d123a58da39eb7656367131dd7771c /gcc/gimple-lower-bitint.cc | |
parent | 321477fc3a0f8de18c4452f431309f896ae3a854 (diff) | |
download | gcc-de072b52292dc5218845904eee709c35a1418c3b.zip gcc-de072b52292dc5218845904eee709c35a1418c3b.tar.gz gcc-de072b52292dc5218845904eee709c35a1418c3b.tar.bz2 |
tree: add to clobber_kind
In discussion of PR71093 it came up that more clobber_kind options would be
useful within the C++ front-end.
gcc/ChangeLog:
* tree-core.h (enum clobber_kind): Rename CLOBBER_EOL to
CLOBBER_STORAGE_END. Add CLOBBER_STORAGE_BEGIN,
CLOBBER_OBJECT_BEGIN, CLOBBER_OBJECT_END.
* gimple-lower-bitint.cc
* gimple-ssa-warn-access.cc
* gimplify.cc
* tree-inline.cc
* tree-ssa-ccp.cc: Adjust for rename.
* tree-pretty-print.cc: And handle new values.
gcc/cp/ChangeLog:
* call.cc (build_trivial_dtor_call): Use CLOBBER_OBJECT_END.
* decl.cc (build_clobber_this): Take clobber_kind argument.
(start_preparsed_function): Pass CLOBBER_OBJECT_BEGIN.
(begin_destructor_body): Pass CLOBBER_OBJECT_END.
gcc/testsuite/ChangeLog:
* gcc.dg/pr87052.c: Adjust expected CLOBBER output.
Co-authored-by: Nathaniel Shead <nathanieloshead@gmail.com>
Diffstat (limited to 'gcc/gimple-lower-bitint.cc')
-rw-r--r-- | gcc/gimple-lower-bitint.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/gimple-lower-bitint.cc b/gcc/gimple-lower-bitint.cc index c55c32f..65a7bbe 100644 --- a/gcc/gimple-lower-bitint.cc +++ b/gcc/gimple-lower-bitint.cc @@ -806,7 +806,8 @@ bitint_large_huge::handle_operand (tree op, tree idx) && m_after_stmt && bitmap_bit_p (m_single_use_names, SSA_NAME_VERSION (op))) { - tree clobber = build_clobber (TREE_TYPE (m_vars[p]), CLOBBER_EOL); + tree clobber = build_clobber (TREE_TYPE (m_vars[p]), + CLOBBER_STORAGE_END); g = gimple_build_assign (m_vars[p], clobber); gimple_stmt_iterator gsi = gsi_for_stmt (m_after_stmt); gsi_insert_after (&gsi, g, GSI_SAME_STMT); @@ -2063,7 +2064,7 @@ bitint_large_huge::handle_operand_addr (tree op, gimple *stmt, tree ret = build_fold_addr_expr (var); if (!stmt_ends_bb_p (gsi_stmt (m_gsi))) { - tree clobber = build_clobber (atype, CLOBBER_EOL); + tree clobber = build_clobber (atype, CLOBBER_STORAGE_END); g = gimple_build_assign (var, clobber); gsi_insert_after (&m_gsi, g, GSI_SAME_STMT); } @@ -2100,7 +2101,8 @@ bitint_large_huge::handle_operand_addr (tree op, gimple *stmt, ret = build_fold_addr_expr (var); if (!stmt_ends_bb_p (gsi_stmt (m_gsi))) { - tree clobber = build_clobber (m_limb_type, CLOBBER_EOL); + tree clobber = build_clobber (m_limb_type, + CLOBBER_STORAGE_END); g = gimple_build_assign (var, clobber); gsi_insert_after (&m_gsi, g, GSI_SAME_STMT); } @@ -3707,7 +3709,7 @@ bitint_large_huge::finish_arith_overflow (tree var, tree obj, tree type, } if (var) { - tree clobber = build_clobber (TREE_TYPE (var), CLOBBER_EOL); + tree clobber = build_clobber (TREE_TYPE (var), CLOBBER_STORAGE_END); g = gimple_build_assign (var, clobber); gsi_insert_after (&m_gsi, g, GSI_SAME_STMT); } |