diff options
author | Jeff Law <jlaw@ventanamicro.com> | 2024-10-28 05:39:24 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2024-10-28 05:39:24 -0600 |
commit | f475a31ab4c7f27f6f8c7a418412f9fddc371638 (patch) | |
tree | 7a7d912857c0881fbeefc48f157906cfd06b72d6 /gcc | |
parent | 19722308a286d9a00eead8ac82b948da8c4ca38b (diff) | |
download | gcc-f475a31ab4c7f27f6f8c7a418412f9fddc371638.zip gcc-f475a31ab4c7f27f6f8c7a418412f9fddc371638.tar.gz gcc-f475a31ab4c7f27f6f8c7a418412f9fddc371638.tar.bz2 |
[target/117316] Fix initializer for riscv code alignment handling
The construct used for initializing the code alignments in a recent change is
causing bootstrap problems on riscv64 as seen in the referenced bugzilla.
This patch adjusts the initializer by pushing the NULL down into each uarch
clause. Bootstrapped on riscv64, regression test in flight, but given
bootstrap is broken it seemed advisable to move this forward now.
I'm so much looking forward to the day when we have performant hardware for
bootstrap testing... Sigh.
Anyway, bootstrapped and installing on the trunk.
PR target/117316
gcc/
* config/riscv/riscv.cc (riscv_tune_param): Drop initializer.
(*_tune_info): Add initializers for code alignments.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/riscv/riscv.cc | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 7d6fc14..be7c29f 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -295,9 +295,9 @@ struct riscv_tune_param bool overlap_op_by_pieces; unsigned int fusible_ops; const struct cpu_vector_cost *vec_costs; - const char *function_align = nullptr; - const char *jump_align = nullptr; - const char *loop_align = nullptr; + const char *function_align; + const char *jump_align; + const char *loop_align; }; @@ -457,6 +457,9 @@ static const struct riscv_tune_param rocket_tune_info = { false, /* overlap_op_by_pieces */ RISCV_FUSE_NOTHING, /* fusible_ops */ NULL, /* vector cost */ + NULL, /* function_align */ + NULL, /* jump_align */ + NULL, /* loop_align */ }; /* Costs to use when optimizing for Sifive 7 Series. */ @@ -476,6 +479,9 @@ static const struct riscv_tune_param sifive_7_tune_info = { false, /* overlap_op_by_pieces */ RISCV_FUSE_NOTHING, /* fusible_ops */ NULL, /* vector cost */ + NULL, /* function_align */ + NULL, /* jump_align */ + NULL, /* loop_align */ }; /* Costs to use when optimizing for Sifive p400 Series. */ @@ -495,6 +501,9 @@ static const struct riscv_tune_param sifive_p400_tune_info = { false, /* overlap_op_by_pieces */ RISCV_FUSE_LUI_ADDI | RISCV_FUSE_AUIPC_ADDI, /* fusible_ops */ &generic_vector_cost, /* vector cost */ + NULL, /* function_align */ + NULL, /* jump_align */ + NULL, /* loop_align */ }; /* Costs to use when optimizing for Sifive p600 Series. */ @@ -514,6 +523,9 @@ static const struct riscv_tune_param sifive_p600_tune_info = { false, /* overlap_op_by_pieces */ RISCV_FUSE_LUI_ADDI | RISCV_FUSE_AUIPC_ADDI, /* fusible_ops */ &generic_vector_cost, /* vector cost */ + NULL, /* function_align */ + NULL, /* jump_align */ + NULL, /* loop_align */ }; /* Costs to use when optimizing for T-HEAD c906. */ @@ -533,6 +545,9 @@ static const struct riscv_tune_param thead_c906_tune_info = { false, /* overlap_op_by_pieces */ RISCV_FUSE_NOTHING, /* fusible_ops */ NULL, /* vector cost */ + NULL, /* function_align */ + NULL, /* jump_align */ + NULL, /* loop_align */ }; /* Costs to use when optimizing for xiangshan nanhu. */ @@ -552,6 +567,9 @@ static const struct riscv_tune_param xiangshan_nanhu_tune_info = { false, /* overlap_op_by_pieces */ RISCV_FUSE_ZEXTW | RISCV_FUSE_ZEXTH, /* fusible_ops */ NULL, /* vector cost */ + NULL, /* function_align */ + NULL, /* jump_align */ + NULL, /* loop_align */ }; /* Costs to use when optimizing for a generic ooo profile. */ @@ -571,6 +589,9 @@ static const struct riscv_tune_param generic_ooo_tune_info = { true, /* overlap_op_by_pieces */ RISCV_FUSE_NOTHING, /* fusible_ops */ &generic_vector_cost, /* vector cost */ + NULL, /* function_align */ + NULL, /* jump_align */ + NULL, /* loop_align */ }; /* Costs to use when optimizing for size. */ @@ -590,6 +611,9 @@ static const struct riscv_tune_param optimize_size_tune_info = { false, /* overlap_op_by_pieces */ RISCV_FUSE_NOTHING, /* fusible_ops */ NULL, /* vector cost */ + NULL, /* function_align */ + NULL, /* jump_align */ + NULL, /* loop_align */ }; static bool riscv_avoid_shrink_wrapping_separate (); |