aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
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);