diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2015-01-05 22:22:36 +0000 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gcc.gnu.org> | 2015-01-05 22:22:36 +0000 |
commit | c68360000ce964b0de6e333817c8b74a12deda3e (patch) | |
tree | f827ae6336f5fcc1be38eced868099ac103b7e4c /gcc | |
parent | 389d63bb1ec188038162e599ca21cd5d72af219b (diff) | |
download | gcc-c68360000ce964b0de6e333817c8b74a12deda3e.zip gcc-c68360000ce964b0de6e333817c8b74a12deda3e.tar.gz gcc-c68360000ce964b0de6e333817c8b74a12deda3e.tar.bz2 |
Fix loop optimization when ZOL is not available in xtensa configuration
Currently building gcc for xtensa configuration with XCHAL_HAVE_LOOPS
set to 0 fails with the following error:
xtensa.c:3952: undefined reference to `reorg_loops(bool, hw_doloop_hooks*)'
Only compile target-specific zero-overhead loop optimization code when
TARGET_LOOPS allows it.
2014-12-30 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/xtensa.c (hwloop_optimize, hwloop_fail,
hwloop_pattern_reg, xtensa_doloop_hooks, xtensa_reorg_loops):
put under #if TARGET_LOOPS guard.
From-SVN: r219206
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/xtensa/xtensa.c | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bf805fb..2e4582f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-12-30 Max Filippov <jcmvbkbc@gmail.com> + + * config/xtensa/xtensa.c (hwloop_optimize, hwloop_fail, + hwloop_pattern_reg, xtensa_doloop_hooks, xtensa_reorg_loops): + put under #if TARGET_LOOPS guard. + 2015-01-05 Uros Bizjak <ubizjak@gmail.com> * config/i386/i386.c (output_387_binary_op): Use std::swap. diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 44bf05e..0e6d286 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -3766,6 +3766,8 @@ xtensa_invalid_within_doloop (const rtx_insn *insn) /* Optimize LOOP. */ +#if TARGET_LOOPS + static bool hwloop_optimize (hwloop_info loop) { @@ -3951,6 +3953,12 @@ xtensa_reorg_loops (void) { reorg_loops (false, &xtensa_doloop_hooks); } +#else +static inline void +xtensa_reorg_loops (void) +{ +} +#endif /* Implement the TARGET_MACHINE_DEPENDENT_REORG pass. */ |