summaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-25 22:34:36 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-25 22:34:36 +0000
commitcbeb677e2ce01e4bae1d9af26ac91d9eb839507d (patch)
tree68704a635c87543f5b0b6647ea71731266f962b4 /gcc/tree-eh.c
parent28ca4cf5973b4a38dd922a6007bcd27c457ed2fa (diff)
downloadgcc-cbeb677e2ce01e4bae1d9af26ac91d9eb839507d.tar.gz
* function.h (struct function): Add can_throw_non_call_exceptions bit.
* lto-streamer-in.c (input_function): Stream it in. * lto-streamer-out.c (output_function): Stream it out. * function.c (allocate_struct_function): Set it. (expand_function_end): Substitute cfun->can_throw_non_call_exceptions for flag_non_call_exceptions. * cfgbuild.c (control_flow_insn_p): Likewise. (make_edges): Likewise. * cfgexpand.c (expand_stack_alignment): Likewise. * combine.c (distribute_notes): Likewise. * cse.c (cse_extended_basic_block): Likewise. * except.c (insn_could_throw_p): Likewise. * gcse.c (simple_mem): Likewise. * ipa-pure-const.c (check_call): Likewise. (check_stmt ): Likewise. * lower-subreg.c (lower-subreg.c): Likewise. * optabs.c (emit_libcall_block): Likewise. (prepare_cmp_insn): Likewise. * postreload-gcse.c (eliminate_partially_redundant_loads): Likewise. * postreload.c (rest_of_handle_postreload): Likewise. * reload1.c (reload_as_needed): Likewise. (emit_input_reload_insns): Likewise. (emit_output_reload_insns): Likewise. (fixup_abnormal_edges): Likewise. * sel-sched-ir.c (init_global_and_expr_for_insn): Likewise. * store-motion.c (find_moveable_store): Likewise. * tree-eh.c (stmt_could_throw_p): Likewise. (tree_could_throw_p): Likewise. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise. * config/arm/arm.c (arm_expand_prologue): Likewise. (thumb1_expand_prologue): Likewise. * config/rx/rx.md (cbranchsf4): Likewise. (cmpsf): Likewise. * config/s390/s390.c (s390_emit_prologue): Likewise. * tree-inline.c (initialize_cfun): Copy can_throw_non_call_exceptions. (inline_forbidden_into_p): New predicate. (expand_call_inline): Use it to forbid inlining. (tree_can_inline_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159847 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index e5d76c8b8ba..77c8cac7b5c 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -2526,12 +2526,12 @@ stmt_could_throw_p (gimple stmt)
case GIMPLE_ASSIGN:
case GIMPLE_COND:
- if (!flag_non_call_exceptions)
+ if (!cfun->can_throw_non_call_exceptions)
return false;
return stmt_could_throw_1_p (stmt);
case GIMPLE_ASM:
- if (!flag_non_call_exceptions)
+ if (!cfun->can_throw_non_call_exceptions)
return false;
return gimple_asm_volatile_p (stmt);
@@ -2550,7 +2550,7 @@ tree_could_throw_p (tree t)
return false;
if (TREE_CODE (t) == MODIFY_EXPR)
{
- if (flag_non_call_exceptions
+ if (cfun->can_throw_non_call_exceptions
&& tree_could_trap_p (TREE_OPERAND (t, 0)))
return true;
t = TREE_OPERAND (t, 1);
@@ -2560,7 +2560,7 @@ tree_could_throw_p (tree t)
t = TREE_OPERAND (t, 0);
if (TREE_CODE (t) == CALL_EXPR)
return (call_expr_flags (t) & ECF_NOTHROW) == 0;
- if (flag_non_call_exceptions)
+ if (cfun->can_throw_non_call_exceptions)
return tree_could_trap_p (t);
return false;
}