| 1 |
/* Common hooks for Tensilica's Xtensa architecture. |
| 2 |
Copyright (C) 2001-2025 Free Software Foundation, Inc. |
| 3 |
|
| 4 |
This file is part of GCC. |
| 5 |
|
| 6 |
GCC is free software; you can redistribute it and/or modify it under |
| 7 |
the terms of the GNU General Public License as published by the Free |
| 8 |
Software Foundation; either version 3, or (at your option) any later |
| 9 |
version. |
| 10 |
|
| 11 |
GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
| 12 |
WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 14 |
for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License |
| 17 |
along with GCC; see the file COPYING3. If not see |
| 18 |
<http://www.gnu.org/licenses/>. */ |
| 19 |
|
| 20 |
#include "config.h" |
| 21 |
#include "system.h" |
| 22 |
#include "coretypes.h" |
| 23 |
#include "tm.h" |
| 24 |
#include "common/common-target.h" |
| 25 |
#include "common/common-target-def.h" |
| 26 |
|
| 27 |
/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */ |
| 28 |
|
| 29 |
static const struct default_options xtensa_option_optimization_table[] = |
| 30 |
{ |
| 31 |
/* Reordering blocks for Xtensa is not a good idea unless the |
| 32 |
compiler understands the range of conditional branches. |
| 33 |
Currently all branch relaxation for Xtensa is handled in the |
| 34 |
assembler, so GCC cannot do a good job of reordering blocks. |
| 35 |
Do not enable reordering unless it is explicitly requested. */ |
| 36 |
{ OPT_LEVELS_ALL, OPT_freorder_blocks, NULL, 0 }, |
| 37 |
/* Split multi-word types early (pre-GCC10 behavior). */ |
| 38 |
{ OPT_LEVELS_ALL, OPT_fsplit_wide_types_early, NULL, 1 }, |
| 39 |
{ OPT_LEVELS_NONE, 0, NULL, 0 } |
| 40 |
}; |
| 41 |
|
| 42 |
#undef TARGET_DEFAULT_TARGET_FLAGS |
| 43 |
#define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT) |
| 44 |
#undef TARGET_OPTION_OPTIMIZATION_TABLE |
| 45 |
#define TARGET_OPTION_OPTIMIZATION_TABLE xtensa_option_optimization_table |
| 46 |
|
| 47 |
struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; |