LEFT | RIGHT |
(no file at all) | |
1 /* Callgraph handling code. | 1 /* Callgraph handling code. |
2 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, | 2 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, |
3 2011, 2012 Free Software Foundation, Inc. | 3 2011, 2012 Free Software Foundation, Inc. |
4 Contributed by Jan Hubicka | 4 Contributed by Jan Hubicka |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
8 GCC is free software; you can redistribute it and/or modify it under | 8 GCC is free software; you can redistribute it and/or modify it under |
9 the terms of the GNU General Public License as published by the Free | 9 the terms of the GNU General Public License as published by the Free |
10 Software Foundation; either version 3, or (at your option) any later | 10 Software Foundation; either version 3, or (at your option) any later |
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 gcc_assert (!node->global.inlined_to); | 1274 gcc_assert (!node->global.inlined_to); |
1275 /* FIXME: address_taken flag is used both as a shortcut for testing whether | 1275 /* FIXME: address_taken flag is used both as a shortcut for testing whether |
1276 IPA_REF_ADDR reference exists (and thus it should be set on node | 1276 IPA_REF_ADDR reference exists (and thus it should be set on node |
1277 representing alias we take address of) and as a test whether address | 1277 representing alias we take address of) and as a test whether address |
1278 of the object was taken (and thus it should be set on node alias is | 1278 of the object was taken (and thus it should be set on node alias is |
1279 referring to). We should remove the first use and the remove the | 1279 referring to). We should remove the first use and the remove the |
1280 following set. */ | 1280 following set. */ |
1281 node->symbol.address_taken = 1; | 1281 node->symbol.address_taken = 1; |
1282 node = cgraph_function_or_thunk_node (node, NULL); | 1282 node = cgraph_function_or_thunk_node (node, NULL); |
1283 node->symbol.address_taken = 1; | 1283 node->symbol.address_taken = 1; |
| 1284 /* If the address of a multiversioned function dispatcher is taken, |
| 1285 generate the body to dispatch the right function at run-time. This |
| 1286 is needed as the address can be used to do an indirect call. */ |
| 1287 if (node->dispatcher_function) |
| 1288 { |
| 1289 gcc_assert (node->next_function_version); |
| 1290 targetm.generate_version_dispatcher_body (node); |
| 1291 } |
1284 } | 1292 } |
1285 | 1293 |
1286 /* Return local info for the compiled function. */ | 1294 /* Return local info for the compiled function. */ |
1287 | 1295 |
1288 struct cgraph_local_info * | 1296 struct cgraph_local_info * |
1289 cgraph_local_info (tree decl) | 1297 cgraph_local_info (tree decl) |
1290 { | 1298 { |
1291 struct cgraph_node *node; | 1299 struct cgraph_node *node; |
1292 | 1300 |
1293 gcc_assert (TREE_CODE (decl) == FUNCTION_DECL); | 1301 gcc_assert (TREE_CODE (decl) == FUNCTION_DECL); |
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2451 { | 2459 { |
2452 struct cgraph_node *node; | 2460 struct cgraph_node *node; |
2453 | 2461 |
2454 if (seen_error ()) | 2462 if (seen_error ()) |
2455 return; | 2463 return; |
2456 | 2464 |
2457 FOR_EACH_FUNCTION (node) | 2465 FOR_EACH_FUNCTION (node) |
2458 verify_cgraph_node (node); | 2466 verify_cgraph_node (node); |
2459 } | 2467 } |
2460 #include "gt-cgraph.h" | 2468 #include "gt-cgraph.h" |
LEFT | RIGHT |