+2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * configure: Regenerate.
+ * configure.ac: Always define ENABLE_OFFLOADING.
+ * cgraph.c (cgraph_node::create): Adjust.
+ * gcc.c (process_command): Likewise.
+ * omp-low.c (create_omp_child_function): Likewise.
+ (expand_omp_target): Likewise.
+ * varpool.c (varpool_node::get_create): Likewise.
+
2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* defaults.h (EH_RETURN_HANDLER_RTX): New default definition.
+2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * c-parser.c (c_parser_omp_declare_target): Adjust.
+
2015-11-14 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (c_finish_omp_clauses): Don't mark
if (node != NULL)
{
node->offloadable = 1;
-#ifdef ENABLE_OFFLOADING
- g->have_offload = true;
- if (is_a <varpool_node *> (node))
+ if (ENABLE_OFFLOADING)
{
- vec_safe_push (offload_vars, t);
- node->force_output = 1;
+ g->have_offload = true;
+ if (is_a <varpool_node *> (node))
+ {
+ vec_safe_push (offload_vars, t);
+ node->force_output = 1;
+ }
}
-#endif
}
}
}
&& lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl)))
{
node->offloadable = 1;
-#ifdef ENABLE_OFFLOADING
- g->have_offload = true;
-#endif
+ if (ENABLE_OFFLOADING)
+ g->have_offload = true;
}
node->register_symbol ();
$as_echo "#define ENABLE_OFFLOADING 1" >>confdefs.h
+else
+
+$as_echo "#define ENABLE_OFFLOADING 0" >>confdefs.h
+
fi
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18405 "configure"
+#line 18409 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18511 "configure"
+#line 18515 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
if test x"$offload_targets" != x; then
AC_DEFINE(ENABLE_OFFLOADING, 1,
[Define this to enable support for offloading.])
+else
+ AC_DEFINE(ENABLE_OFFLOADING, 0,
+ [Define this to enable support for offloading.])
fi
AC_ARG_WITH(multilib-list,
+2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * parser.c (cp_parser_omp_declare_target): Adjust.
+
2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* vtable-class-hierarchy.c (vtv_generate_init_routine): Adjust.
if (node != NULL)
{
node->offloadable = 1;
-#ifdef ENABLE_OFFLOADING
- g->have_offload = true;
- if (is_a <varpool_node *> (node))
+ if (ENABLE_OFFLOADING)
{
- vec_safe_push (offload_vars, t);
- node->force_output = 1;
+ g->have_offload = true;
+ if (is_a <varpool_node *> (node))
+ {
+ vec_safe_push (offload_vars, t);
+ node->force_output = 1;
+ }
}
-#endif
}
}
}
CL_DRIVER, &handlers, global_dc);
}
-#ifdef ENABLE_OFFLOADING
/* If the user didn't specify any, default to all configured offload
targets. */
- if (offload_targets == NULL)
+ if (ENABLE_OFFLOADING && offload_targets == NULL)
handle_foffload_option (OFFLOAD_TARGETS);
-#endif
if (output_file
&& strcmp (output_file, "-") != 0
if (is_gimple_omp_offloaded (octx->stmt))
{
cgraph_node::get_create (decl)->offloadable = 1;
-#ifdef ENABLE_OFFLOADING
- g->have_offload = true;
-#endif
+ if (ENABLE_OFFLOADING)
+ g->have_offload = true;
+
break;
}
}
node->parallelized_function = 1;
cgraph_node::add_new_function (child_fn, true);
-#ifdef ENABLE_OFFLOADING
/* Add the new function to the offload table. */
- vec_safe_push (offload_funcs, child_fn);
-#endif
+ if (ENABLE_OFFLOADING)
+ vec_safe_push (offload_funcs, child_fn);
bool need_asm = DECL_ASSEMBLER_NAME_SET_P (current_function_decl)
&& !DECL_ASSEMBLER_NAME_SET_P (child_fn);
assign_assembler_name_if_neeeded (child_fn);
cgraph_edge::rebuild_edges ();
-#ifdef ENABLE_OFFLOADING
/* Prevent IPA from removing child_fn as unreachable, since there are no
refs from the parent function to child_fn in offload LTO mode. */
- cgraph_node::get (child_fn)->mark_force_output ();
-#endif
+ if (ENABLE_OFFLOADING)
+ cgraph_node::get (child_fn)->mark_force_output ();
/* Some EH regions might become dead, see PR34608. If
pass_cleanup_cfg isn't the first pass to happen with the
&& lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl)))
{
node->offloadable = 1;
-#ifdef ENABLE_OFFLOADING
- g->have_offload = true;
- if (!in_lto_p)
- vec_safe_push (offload_vars, decl);
- node->force_output = 1;
-#endif
+ if (ENABLE_OFFLOADING)
+ {
+ g->have_offload = true;
+ if (!in_lto_p)
+ vec_safe_push (offload_vars, decl);
+ node->force_output = 1;
+ }
}
node->register_symbol ();