var_opt_optimize_init[n_opt_val] = init;
}
+ # Mark options that are annotated with both Optimization and
+ # Target so we can avoid streaming out target-specific opts when
+ # offloading is enabled.
+ if (flag_set_p("Target", flags[i]))
+ var_target_opt[n_opt_val] = 1;
n_opt_val++;
}
}
} else {
sgn = "int";
}
+ # Do not stream out target-specific opts if offloading is
+ # enabled.
+ if (var_target_opt[i])
+ 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)";
print "{";
for (i = 0; i < n_opt_val; i++) {
name = var_opt_val[i]
+ if (var_target_opt[i]) {
+ print "#ifdef ACCEL_COMPILER"
+ print "#error accel compiler cannot define Optimization attribute for target-specific option " name;
+ print "#else"
+ }
otype = var_opt_val_type[i];
if (otype ~ "^const char \\**$") {
print " ptr->" name" = bp_unpack_string (data_in, bp);";
print " ptr->" name" ^= " var_opt_optimize_init[i] ";";
}
}
+ if (var_target_opt[i])
+ print "#endif"
}
print " for (size_t i = 0; i < ARRAY_SIZE (ptr->explicit_mask); i++)";
print " ptr->explicit_mask[i] = bp_unpack_value (bp, 64);";