diff options
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 3e3af72..ceaa7ab 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -6075,21 +6075,17 @@ get_index_code (const struct address_info *info) return SCRATCH; } -/* Return 1 if *X is a thread-local symbol. */ - -static int -tls_referenced_p_1 (rtx *x, void *) -{ - return GET_CODE (*x) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (*x) != 0; -} - /* Return true if X contains a thread-local symbol. */ bool -tls_referenced_p (rtx x) +tls_referenced_p (const_rtx x) { if (!targetm.have_tls) return false; - return for_each_rtx (&x, &tls_referenced_p_1, 0); + subrtx_iterator::array_type array; + FOR_EACH_SUBRTX (iter, array, x, NONCONST) + if (GET_CODE (*iter) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (*iter) != 0) + return true; + return false; } |