[PATCH, nds32] Add OPT_fsched_pressure and OPT_fomit_frame_pointer in optimization table.
Chung-Ju Wu
jasonwucj@gmail.com
Sun Sep 17 12:23:00 GMT 2017
Hi, all,
In the nds32 port, most of time we prefer reducing code size.
So we modify the nds32_option_optimization_table[] to apply
-fsched-pressure and -fomit-frame-pointer for specific
optimization level.
Committed as Rev.252876: https://gcc.gnu.org/r252876
gcc/
* common/config/nds32/nds32-common.c
(nds32_option_optimization_table): Refine formatting.
(nds32_option_optimization_table): Use -fsched-pressure and
-fomit-frame-pointer for specific optimization level.
Best regards,
jasonwucj
-------------- next part --------------
--- sandbox/src/gcc.svn/gcc/common/config/nds32/nds32-common.c 2017-09-06 00:37:02.684366502 +0800
+++ gcc.710release.orig/gcc/common/config/nds32/nds32-common.c 2017-09-15 22:11:41.441875438 +0800
@@ -74,12 +74,14 @@
/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
static const struct default_options nds32_option_optimization_table[] =
{
- /* Enable -fomit-frame-pointer by default at -O1 or higher. */
- { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
+ /* Enable -fsched-pressure by default at -O1 and above. */
+ { OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 },
+ /* Enable -fomit-frame-pointer by default at all optimization levels. */
+ { OPT_LEVELS_ALL, OPT_fomit_frame_pointer, NULL, 1 },
/* Enable -mv3push by default at -Os, but it is useless under V2 ISA. */
- { OPT_LEVELS_SIZE, OPT_mv3push, NULL, 1 },
+ { OPT_LEVELS_SIZE, OPT_mv3push, NULL, 1 },
- { OPT_LEVELS_NONE, 0, NULL, 0 }
+ { OPT_LEVELS_NONE, 0, NULL, 0 }
};
/* ------------------------------------------------------------------------ */
More information about the Gcc-patches
mailing list