#include "gimple.h"
#include "cgraph.h"
#include "case-cfn-macros.h"
+#include "opts.h"
/* This file should be included last. */
#include "target-def.h"
if (flag_sram_ecc == HSACO_ATTR_DEFAULT)
flag_sram_ecc = gcn_devices[gcn_arch].sramecc_default;
+
+ /* TODO: This seems to produce tighter loops, but the testsuites expects it
+ to be set to '2', so I'll leave it default for now.
+ SET_OPTION_IF_UNSET (&global_options, &global_options_set,
+ param_vect_partial_vector_usage, 1); */
}
/* }}} */
# offloading is enabled.
if (flag_set_p("Target", flags[i]))
var_target_opt[n_opt_val] = 1;
+
+ # These options should not be passed from host to target, but
+ # are not actually target specific.
+ if (flag_set_p("NoOffload", flags[i]))
+ var_target_opt[n_opt_val] = 2;
+
n_opt_val++;
}
}
# Do not stream out target-specific opts if offloading is
# enabled.
if (var_target_opt[i])
- print " if (!lto_stream_offload_p)"
+ print " if (!lto_stream_offload_p) {"
# If applicable, encode the streamed value.
if (var_opt_optimize_init[i]) {
print " if (" var_opt_optimize_init[i] " > (" var_opt_val_type[i] ") 10)";
} else {
print " bp_pack_var_len_" sgn " (bp, ptr->" name");";
}
+ if (var_target_opt[i])
+ print "}"
}
}
print " for (size_t i = 0; i < ARRAY_SIZE (ptr->explicit_mask); i++)";
print "{";
for (i = 0; i < n_opt_val; i++) {
name = var_opt_val[i]
- if (var_target_opt[i]) {
+ if (var_target_opt[i] == 1) {
print "#ifdef ACCEL_COMPILER"
print "#error accel compiler cannot define Optimization attribute for target-specific option " name;
print "#else"
+ } else if (var_target_opt[i] == 2) {
+ print "#ifdef ACCEL_COMPILER"
+ print " ptr->" name " = global_options." name ";"
+ print "#else"
}
otype = var_opt_val_type[i];
if (otype ~ "^const char \\**$") {
if (flag_set_p("Warning", flags[i]))
continue;
+ if (flag_set_p("NoOffload", flags[i]))
+ continue;
+
if (name in checked_options)
continue;
checked_options[name]++
Whether to use canonical types.
-param=vect-epilogues-nomask=
-Common Joined UInteger Var(param_vect_epilogues_nomask) Init(1) IntegerRange(0, 1) Param Optimization
+Common Joined UInteger Var(param_vect_epilogues_nomask) Init(1) IntegerRange(0, 1) Param Optimization NoOffload
Enable loop epilogue vectorization using smaller vector size.
-param=vect-max-layout-candidates=
Bound on number of runtime checks inserted by the vectorizer's loop versioning for alignment check.
-param=vect-partial-vector-usage=
-Common Joined UInteger Var(param_vect_partial_vector_usage) Init(2) IntegerRange(0, 2) Param Optimization
+Common Joined UInteger Var(param_vect_partial_vector_usage) Init(2) IntegerRange(0, 2) Param Optimization NoOffload
Controls how loop vectorizer uses partial vectors. 0 means never, 1 means only for loops whose need to iterate can be removed, 2 means for all loops. The default value is 2.
-param=vect-inner-loop-cost-factor=
-Common Joined UInteger Var(param_vect_inner_loop_cost_factor) Init(50) IntegerRange(1, 10000) Param Optimization
+Common Joined UInteger Var(param_vect_inner_loop_cost_factor) Init(50) IntegerRange(1, 10000) Param Optimization NoOffload
The maximum factor which the loop vectorizer applies to the cost of statements in an inner loop relative to the loop being vectorized.
-param=vect-induction-float=