@@ -171,6 +171,7 @@ struct tune_params
const int memmov_cost;
const int issue_rate;
const unsigned int fuseable_ops;
+ const unsigned int align;
};
HOST_WIDE_INT aarch64_initial_elimination_offset (unsigned, unsigned);
@@ -317,7 +317,8 @@ static const struct tune_params generic_tunings =
&generic_vector_cost,
NAMED_PARAM (memmov_cost, 4),
NAMED_PARAM (issue_rate, 2),
- NAMED_PARAM (fuseable_ops, AARCH64_FUSE_NOTHING)
+ NAMED_PARAM (fuseable_ops, AARCH64_FUSE_NOTHING),
+ NAMED_PARAM (align, 8)
};
static const struct tune_params cortexa53_tunings =
@@ -328,7 +329,8 @@ static const struct tune_params cortexa53_tunings =
&generic_vector_cost,
NAMED_PARAM (memmov_cost, 4),
NAMED_PARAM (issue_rate, 2),
- NAMED_PARAM (fuseable_ops, AARCH64_FUSE_MOV_MOVK)
+ NAMED_PARAM (fuseable_ops, AARCH64_FUSE_MOV_MOVK),
+ NAMED_PARAM (align, 8)
};
static const struct tune_params cortexa57_tunings =
@@ -339,7 +341,8 @@ static const struct tune_params cortexa57_tunings =
&cortexa57_vector_cost,
NAMED_PARAM (memmov_cost, 4),
NAMED_PARAM (issue_rate, 3),
- NAMED_PARAM (fuseable_ops, AARCH64_FUSE_MOV_MOVK)
+ NAMED_PARAM (fuseable_ops, AARCH64_FUSE_MOV_MOVK),
+ NAMED_PARAM (align, 8)
};
static const struct tune_params thunderx_tunings =
@@ -350,7 +353,8 @@ static const struct tune_params thunderx_tunings =
&generic_vector_cost,
NAMED_PARAM (memmov_cost, 6),
NAMED_PARAM (issue_rate, 2),
- NAMED_PARAM (fuseable_ops, AARCH64_FUSE_CMP_BRANCH)
+ NAMED_PARAM (fuseable_ops, AARCH64_FUSE_CMP_BRANCH),
+ NAMED_PARAM (align, 8)
};
/* A processor implementing AArch64. */
@@ -6501,6 +6505,18 @@ aarch64_override_options (void)
#endif
}
+ /* If not opzimizing for size, set the default
+ alignment to what the target wants */
+ if (!optimize_size)
+ {
+ if (align_loops <= 0)
+ align_loops = aarch64_tune_params->align;
+ if (align_jumps <= 0)
+ align_jumps = aarch64_tune_params->align;
+ if (align_functions <= 0)
+ align_functions = aarch64_tune_params->align;
+ }
+
aarch64_override_options_after_change ();
}