/* Translation of isl AST to Gimple.
- Copyright (C) 2014-2018 Free Software Foundation, Inc.
+ Copyright (C) 2014-2019 Free Software Foundation, Inc.
Contributed by Roman Gareev <gareevroman@gmail.com>.
This file is part of GCC.
#include "tree.h"
#include "gimple.h"
#include "ssa.h"
-#include "params.h"
#include "fold-const.h"
#include "gimple-fold.h"
#include "gimple-iterator.h"
{
codegen_error = true;
gcc_assert (! flag_checking
- || PARAM_VALUE (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS));
+ || param_graphite_allow_codegen_errors);
}
bool is_constant (tree op) const
if (codegen_error_p ())
return NULL_TREE;
- return fold_build3 (COND_EXPR, type, a, b, c);
+ return fold_build3 (COND_EXPR, type, a,
+ rewrite_to_non_trapping_overflow (b),
+ rewrite_to_non_trapping_overflow (c));
}
/* Converts a unary isl_ast_expr_op expression E to a GCC expression tree of
get_rename_from_scev (tree old_name, gimple_seq *stmts, loop_p loop,
vec<tree> iv_map)
{
- tree scev = scalar_evolution_in_region (region->region, loop, old_name);
+ tree scev = cached_scalar_evolution_in_region (region->region,
+ loop, old_name);
/* At this point we should know the exact scev for each
scalar SSA_NAME used in the scop: all the other scalar
{
int old_err = isl_options_get_on_error (scop->isl_context);
int old_max_operations = isl_ctx_get_max_operations (scop->isl_context);
- int max_operations = PARAM_VALUE (PARAM_MAX_ISL_OPERATIONS);
+ int max_operations = param_max_isl_operations;
if (max_operations)
isl_ctx_set_max_operations (scop->isl_context, max_operations);
isl_options_set_on_error (scop->isl_context, ISL_ON_ERROR_CONTINUE);
isl_ctx_set_max_operations (scop->isl_context, old_max_operations);
if (isl_ctx_last_error (scop->isl_context) != isl_error_none)
{
- location_t loc = find_loop_location
- (scop->scop_info->region.entry->dest->loop_father);
- if (isl_ctx_last_error (scop->isl_context) == isl_error_quota)
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
- "loop nest not optimized, AST generation timed out "
- "after %d operations [--param max-isl-operations]\n",
- max_operations);
- else
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
- "loop nest not optimized, ISL AST generation "
- "signalled an error\n");
+ if (dump_enabled_p ())
+ {
+ dump_user_location_t loc = find_loop_location
+ (scop->scop_info->region.entry->dest->loop_father);
+ if (isl_ctx_last_error (scop->isl_context) == isl_error_quota)
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+ "loop nest not optimized, AST generation timed out "
+ "after %d operations [--param max-isl-operations]\n",
+ max_operations);
+ else
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+ "loop nest not optimized, ISL AST generation "
+ "signalled an error\n");
+ }
isl_ast_node_free (ast_isl);
return NULL;
}
if (t.codegen_error_p ())
{
- location_t loc = find_loop_location
- (scop->scop_info->region.entry->dest->loop_father);
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
- "loop nest not optimized, code generation error\n");
+ if (dump_enabled_p ())
+ {
+ dump_user_location_t loc = find_loop_location
+ (scop->scop_info->region.entry->dest->loop_father);
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+ "loop nest not optimized, code generation error\n");
+ }
/* Remove the unreachable region. */
remove_edge_and_dominated_blocks (if_region->true_region->region.entry);