This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
versioning fix ( support exception handling ) for tree-profiling branch
- From: Razya Ladelsky <RAZYA at il dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: stevenb at suse dot de, hubicka at ucw dot cz, Mircea Namolaru <NAMOLARU at il dot ibm dot com>, Ayal Zaks <ZAKS at il dot ibm dot com>, jh at suse dot cz
- Date: Wed, 16 Feb 2005 11:15:38 +0200
- Subject: versioning fix ( support exception handling ) for tree-profiling branch
Hello,
The fix introduced in the attached patch enables versioning to work
properly with the exception handler mechanism.
Comments are welcome,
Razya
2005-02-16 Razya Ladelsky <razya@il.ibm.com>
* tree-inline.c (copy_body_r): add versioning case for handling
exceptions.
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.26.2.83.2.30
diff -c -3 -p -r1.26.2.83.2.30 tree-inline.c
*** tree-inline.c 12 Feb 2005 14:33:27 -0000 1.26.2.83.2.30
--- tree-inline.c 15 Feb 2005 12:22:53 -0000
*************** copy_body_r (tree *tp, int *walk_subtree
*** 761,767 ****
{
/* If we're inlining (e.g. not saving and not cloning),
adjust the region number of this resume expression. */
! if (!id->saving_p && !id->cloning_p)
{
struct function *outermost_function
= DECL_STRUCT_FUNCTION (id->node->decl);
--- 761,767 ----
{
/* If we're inlining (e.g. not saving and not cloning),
adjust the region number of this resume expression. */
! if (!id->saving_p && !id->cloning_p && !id->versioning_p)
{
struct function *outermost_function
= DECL_STRUCT_FUNCTION (id->node->decl);
*************** copy_body_r (tree *tp, int *walk_subtree
*** 784,790 ****
duplicate_stmt_eh_region_mapping (
id->callee_cfun, cfun,
old_node, *tp, 0);
! else
duplicate_stmt_eh_region_mapping (
id->callee_cfun,
DECL_STRUCT_FUNCTION (id->caller),
--- 784,798 ----
duplicate_stmt_eh_region_mapping (
id->callee_cfun, cfun,
old_node, *tp, 0);
!
! else if (id->versioning_p)
! {
! duplicate_stmt_eh_region_mapping (
! id->callee_cfun,
! cfun,
! old_node, *tp, 0);
! }
! else
duplicate_stmt_eh_region_mapping (
id->callee_cfun,
159,1 99%