#include "langhooks.h"
#include "cgraph.h"
#include "diagnostic.h"
+#include "tree-pass.h"
+#include "timevar.h"
/* Provide defaults for stuff that may not be defined when using
sjlj exceptions. */
}
}
+struct tree_opt_pass pass_set_nothrow_function_flags =
+{
+ NULL, /* name */
+ NULL, /* gate */
+ set_nothrow_function_flags, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ 0, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0, /* todo_flags_finish */
+ 0 /* letter */
+};
+
\f
/* Various hooks for unwind library. */
htab_delete (ar_hash);
}
+struct tree_opt_pass pass_convert_to_eh_region_ranges =
+{
+ NULL, /* name */
+ NULL, /* gate */
+ convert_to_eh_region_ranges, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ 0, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0, /* todo_flags_finish */
+ 0 /* letter */
+};
+
\f
static void
push_uleb128 (varray_type *data_area, unsigned int value)
{
if (depth != -1)
{
- error ("Tree list ends on depth %i", depth + 1);
+ error ("tree list ends on depth %i", depth + 1);
err = true;
}
if (count != nvisited)
if (err)
{
dump_eh_tree (stderr, fun);
- internal_error ("verify_eh_tree failed.");
+ internal_error ("verify_eh_tree failed");
}
return;
}
}
}
-
/* Initialize unwind_resume_libfunc. */
void
: "_Unwind_Resume");
}
+\f
+static bool
+gate_handle_eh (void)
+{
+ return doing_eh (0);
+}
+
+/* Complete generation of exception handling code. */
+static void
+rest_of_handle_eh (void)
+{
+ cleanup_cfg (CLEANUP_PRE_LOOP | CLEANUP_NO_INSN_DEL);
+ finish_eh_generation ();
+ cleanup_cfg (CLEANUP_PRE_LOOP | CLEANUP_NO_INSN_DEL);
+}
+
+struct tree_opt_pass pass_rtl_eh =
+{
+ "eh", /* name */
+ gate_handle_eh, /* gate */
+ rest_of_handle_eh, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_JUMP, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_dump_func, /* todo_flags_finish */
+ 'h' /* letter */
+};
+
#include "gt-except.h"