tree-inline.c (tree_function_versioning): Look harder for referenced vars.
* tree-inline.c (tree_function_versioning): Look harder for referenced vars. From-SVN: r139542
This commit is contained in:
parent
692daa90a9
commit
657c092504
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-08-24 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* tree-inline.c (tree_function_versioning): Look harder
|
||||
for referenced vars.
|
||||
|
||||
2008-08-24 Razya Ladelsky <razya@il.ibm.com>
|
||||
|
||||
PR tree-optimization/37185
|
||||
|
|
|
@ -4223,9 +4223,16 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map,
|
|||
= (struct ipa_replace_map *) VARRAY_GENERIC_PTR (tree_map, i);
|
||||
if (replace_info->replace_p)
|
||||
{
|
||||
if (TREE_CODE (replace_info->new_tree) == ADDR_EXPR)
|
||||
tree op = replace_info->new_tree;
|
||||
|
||||
STRIP_NOPS (op);
|
||||
|
||||
if (TREE_CODE (op) == VIEW_CONVERT_EXPR)
|
||||
op = TREE_OPERAND (op, 0);
|
||||
|
||||
if (TREE_CODE (op) == ADDR_EXPR)
|
||||
{
|
||||
tree op = TREE_OPERAND (replace_info->new_tree, 0);
|
||||
op = TREE_OPERAND (op, 0);
|
||||
while (handled_component_p (op))
|
||||
op = TREE_OPERAND (op, 0);
|
||||
if (TREE_CODE (op) == VAR_DECL)
|
||||
|
|
Loading…
Add table
Reference in a new issue