diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2015-06-25 16:23:52 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2015-06-25 16:23:52 +0000 |
commit | 88f554b4b93e260d8733c372f93e77c91c564e77 (patch) | |
tree | 1e0ca2957adf8fdcb469bdcb69978a1c9e9eba07 /gcc/cgraph.c | |
parent | 06fbce663e9b7f230d3cbaf9131de2cd786c819c (diff) | |
download | gcc-88f554b4b93e260d8733c372f93e77c91c564e77.zip gcc-88f554b4b93e260d8733c372f93e77c91c564e77.tar.gz gcc-88f554b4b93e260d8733c372f93e77c91c564e77.tar.bz2 |
cgraph.h (cgraph_rtl_info): Move to rtl.h
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* cgraph.h (cgraph_rtl_info): Move to rtl.h
(cgraph_node): Maintain pointer to struct cgraph_rtl_info instead of
and instance.
* rtl.h (struct cgraph_rtl_info): Define when HARD_REG_SET available.
* cgraph.c (cgraph_node::rtl_info): Allocate cgraph_rtl_info if one
doesn't exist.
* calls.c: Include hard-reg-set.h before rtl.h.
* ira.c: Likewise.
From-SVN: r224946
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index e530568..60f9006 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1892,7 +1892,10 @@ cgraph_node::rtl_info (tree decl) if (node->decl != current_function_decl && !TREE_ASM_WRITTEN (node->decl)) return NULL; - return &node->ultimate_alias_target ()->rtl; + /* Allocate if it doesnt exist. */ + if (node->ultimate_alias_target ()->rtl == NULL) + node->ultimate_alias_target ()->rtl = ggc_cleared_alloc<cgraph_rtl_info> (); + return node->ultimate_alias_target ()->rtl; } /* Return a string describing the failure REASON. */ |