Mercurial > hg > CbC > CbC_gcc
comparison gcc/ipa-visibility.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* IPA visibility pass | 1 /* IPA visibility pass |
2 Copyright (C) 2003-2017 Free Software Foundation, Inc. | 2 Copyright (C) 2003-2018 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify it under | 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 | 7 the terms of the GNU General Public License as published by the Free |
201 /* Do not try to localize built-in functions yet. One of problems is that we | 201 /* Do not try to localize built-in functions yet. One of problems is that we |
202 end up mangling their asm for WHOPR that makes it impossible to call them | 202 end up mangling their asm for WHOPR that makes it impossible to call them |
203 using the implicit built-in declarations anymore. Similarly this enables | 203 using the implicit built-in declarations anymore. Similarly this enables |
204 us to remove them as unreachable before actual calls may appear during | 204 us to remove them as unreachable before actual calls may appear during |
205 expansion or folding. */ | 205 expansion or folding. */ |
206 if (DECL_BUILT_IN (node->decl)) | 206 if (fndecl_built_in_p (node->decl)) |
207 return true; | 207 return true; |
208 | 208 |
209 /* If linker counts on us, we must preserve the function. */ | 209 /* If linker counts on us, we must preserve the function. */ |
210 if (node->used_from_object_file_p ()) | 210 if (node->used_from_object_file_p ()) |
211 return true; | 211 return true; |
241 ; | 241 ; |
242 else if (!whole_program) | 242 else if (!whole_program) |
243 return true; | 243 return true; |
244 | 244 |
245 if (MAIN_NAME_P (DECL_NAME (node->decl))) | 245 if (MAIN_NAME_P (DECL_NAME (node->decl))) |
246 return true; | |
247 | |
248 if (node->instrumentation_clone | |
249 && MAIN_NAME_P (DECL_NAME (node->orig_decl))) | |
250 return true; | 246 return true; |
251 | 247 |
252 return false; | 248 return false; |
253 } | 249 } |
254 | 250 |
621 #ifdef ASM_OUTPUT_DEF | 617 #ifdef ASM_OUTPUT_DEF |
622 FOR_EACH_DEFINED_FUNCTION (node) | 618 FOR_EACH_DEFINED_FUNCTION (node) |
623 { | 619 { |
624 if (node->get_availability () != AVAIL_INTERPOSABLE | 620 if (node->get_availability () != AVAIL_INTERPOSABLE |
625 || DECL_EXTERNAL (node->decl) | 621 || DECL_EXTERNAL (node->decl) |
626 || node->has_aliases_p ()) | 622 || node->has_aliases_p () |
623 || lookup_attribute ("noipa", DECL_ATTRIBUTES (node->decl))) | |
627 continue; | 624 continue; |
628 | 625 |
629 cgraph_node *alias = 0; | 626 cgraph_node *alias = 0; |
630 for (cgraph_edge *e = node->callees; e; e = e->next_callee) | 627 for (cgraph_edge *e = node->callees; e; e = e->next_callee) |
631 { | 628 { |