aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-01-29 16:12:37 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1997-01-29 16:12:37 -0500
commitd2ce91694fa00ec364dd69661fe98caa57f1e7d8 (patch)
treeeff7bfa30f2909d023d0c4c46fc0c54f04f6be00 /gcc/varasm.c
parent69b7087e803b85300dbc8c18277e02d85b2e8acd (diff)
downloadgcc-d2ce91694fa00ec364dd69661fe98caa57f1e7d8.zip
gcc-d2ce91694fa00ec364dd69661fe98caa57f1e7d8.tar.gz
gcc-d2ce91694fa00ec364dd69661fe98caa57f1e7d8.tar.bz2
(force_const_mem): Set MARK instead of clearing it.
(output_constant_pool): Only mark constant pool if -O. Check mark flag unconditionally. (mark_constant_pool): Start by clearing all mark flags. From-SVN: r13564
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 1bf3e51..45f8c68 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -3486,7 +3486,7 @@ force_const_mem (mode, x)
pool->labelno = const_labelno;
pool->align = align;
pool->offset = pool_offset;
- pool->mark = 0;
+ pool->mark = 1;
pool->next = 0;
if (last_pool == 0)
@@ -3603,7 +3603,7 @@ output_constant_pool (fnname, fndecl)
/* It is possible for gcc to call force_const_mem and then to later
discard the instructions which refer to the constant. In such a
case we do not need to output the constant. */
- if (flag_expensive_optimizations)
+ if (optimize >= 0 && flag_expensive_optimizations)
mark_constant_pool ();
#ifdef ASM_OUTPUT_POOL_PROLOGUE
@@ -3614,7 +3614,7 @@ output_constant_pool (fnname, fndecl)
{
x = pool->constant;
- if (flag_expensive_optimizations && ! pool->mark)
+ if (! pool->mark)
continue;
/* See if X is a LABEL_REF (or a CONST referring to a LABEL_REF)
@@ -3687,10 +3687,14 @@ static void
mark_constant_pool ()
{
register rtx insn;
+ struct pool_constant *pool;
if (first_pool == 0)
return;
+ for (pool = first_pool; pool; pool = pool->next)
+ pool->mark = 0;
+
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
mark_constants (PATTERN (insn));