diff options
author | Ilya Enkovich <ilya.enkovich@intel.com> | 2015-04-08 10:44:59 +0000 |
---|---|---|
committer | Ilya Enkovich <ienkovich@gcc.gnu.org> | 2015-04-08 10:44:59 +0000 |
commit | 4f5a53cc319d8b88eaff3ee07ac0a89e5782d850 (patch) | |
tree | 3b12f9e0a29bd3d514d93f2c8bdb05d2c21c7962 /gcc/ipa-split.c | |
parent | 113c69ff2d41091359ec37789974cc47f1169e05 (diff) | |
download | gcc-4f5a53cc319d8b88eaff3ee07ac0a89e5782d850.zip gcc-4f5a53cc319d8b88eaff3ee07ac0a89e5782d850.tar.gz gcc-4f5a53cc319d8b88eaff3ee07ac0a89e5782d850.tar.bz2 |
tree-chkp.h (chkp_insert_retbnd_call): New.
gcc/
* tree-chkp.h (chkp_insert_retbnd_call): New.
* tree-chkp.c (chkp_insert_retbnd_call): New.
* ipa-split.c (insert_bndret_call_after): Remove.
(split_function): Use chkp_insert_retbnd_call.
* cgraphunit.c (cgraph_node::expand_thunk): Build returned
bounds for instrumented functions.
gcc/testsuite/
* gcc/testsuite/gcc.target/i386/thunk-retbnd.c: New.
From-SVN: r221917
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r-- | gcc/ipa-split.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index a28f3a1..5d6763d 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -1230,20 +1230,6 @@ find_split_points (basic_block return_bb, int overall_time, int overall_size) BITMAP_FREE (current.ssa_names_to_pass); } -/* Build and insert initialization of returned bounds RETBND - for returned value RETVAL. Statements are inserted after - a statement pointed by GSI and GSI is modified to point to - the last inserted statement. */ - -static void -insert_bndret_call_after (tree retbnd, tree retval, gimple_stmt_iterator *gsi) -{ - tree fndecl = targetm.builtin_chkp_function (BUILT_IN_CHKP_BNDRET); - gimple bndret = gimple_build_call (fndecl, 1, retval); - gimple_call_set_lhs (bndret, retbnd); - gsi_insert_after (gsi, bndret, GSI_CONTINUE_LINKING); -} - /* Split function at SPLIT_POINT. */ static void @@ -1652,7 +1638,7 @@ split_function (basic_block return_bb, struct split_point *split_point, } /* Build bndret call to obtain returned bounds. */ if (retbnd) - insert_bndret_call_after (retbnd, retval, &gsi); + chkp_insert_retbnd_call (retbnd, retval, &gsi); gimple_call_set_lhs (call, retval); update_stmt (call); } @@ -1702,7 +1688,7 @@ split_function (basic_block return_bb, struct split_point *split_point, gsi_insert_after (&gsi, call, GSI_NEW_STMT); /* Build bndret call to obtain returned bounds. */ if (retbnd) - insert_bndret_call_after (retbnd, retval, &gsi); + chkp_insert_retbnd_call (retbnd, retval, &gsi); if (tsan_func_exit_call) gsi_insert_after (&gsi, tsan_func_exit_call, GSI_NEW_STMT); ret = gimple_build_return (retval); |