aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2006-06-15 10:00:49 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2006-06-15 10:00:49 +0000
commit4f6c9110755b4f300c0027433cd2ff466f9a70c4 (patch)
tree55f987bd653f34ffdccec121695c1354859c9e1c /gcc/tree-ssa-structalias.c
parent0ad1d5a1d2d7275611ff841ced4642ade1d2a98f (diff)
downloadgcc-4f6c9110755b4f300c0027433cd2ff466f9a70c4.zip
gcc-4f6c9110755b4f300c0027433cd2ff466f9a70c4.tar.gz
gcc-4f6c9110755b4f300c0027433cd2ff466f9a70c4.tar.bz2
tree-ssa-structalias.c (alias_get_name): Avoid creating extra unused identifiers if not dumping.
2006-06-15 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (alias_get_name): Avoid creating extra unused identifiers if not dumping. (create_variable_info_for): Likewise. From-SVN: r114675
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 2e7c924..2dca712 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -2167,6 +2167,9 @@ alias_get_name (tree decl)
return res;
res = "NULL";
+ if (!dump_file)
+ return res;
+
if (TREE_CODE (decl) == SSA_NAME)
{
num_printed = asprintf (&temp, "%s_%u",
@@ -3987,16 +3990,21 @@ create_variable_info_for (tree decl, const char *name)
i--)
{
varinfo_t newvi;
- const char *newname;
+ const char *newname = "NULL";
char *tempname;
newindex = VEC_length (varinfo_t, varmap);
- if (fo->decl)
- asprintf (&tempname, "%s.%s", vi->name, alias_get_name (fo->decl));
- else
- asprintf (&tempname, "%s." HOST_WIDE_INT_PRINT_DEC, vi->name, fo->offset);
- newname = ggc_strdup (tempname);
- free (tempname);
+ if (dump_file)
+ {
+ if (fo->decl)
+ asprintf (&tempname, "%s.%s",
+ vi->name, alias_get_name (fo->decl));
+ else
+ asprintf (&tempname, "%s." HOST_WIDE_INT_PRINT_DEC,
+ vi->name, fo->offset);
+ newname = ggc_strdup (tempname);
+ free (tempname);
+ }
newvi = new_var_info (decl, newindex, newname, newindex);
newvi->offset = fo->offset;
newvi->size = TREE_INT_CST_LOW (fo->size);