This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] PATCH to handle asm memory clobbers
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 14 Nov 2003 03:11:56 -0500
- Subject: [tree-ssa] PATCH to handle asm memory clobbers
The tree-ssa code has been ignoring memory clobbers in asm statements.
This may not be a complete solution, but it's better than the nothing we
had before.
Tested athlon-pc-linux-gnu, applied to tree-ssa.
2003-11-14 Jason Merrill <jason@redhat.com>
* tree-dfa.c (get_stmt_operands) <ASM_EXPR>: A memory clobber
clobbers all call-clobbered variables. Clobber clobber.
*** tree-dfa.c.~1~ 2003-10-21 22:24:41.000000000 -0400
--- tree-dfa.c 2003-11-12 12:49:56.000000000 -0500
*************** get_stmt_operands (tree stmt)
*** 260,265 ****
--- 260,269 ----
note_addressable (TREE_VALUE (link), ann);
get_expr_operands (stmt, &TREE_VALUE (link), 0, prev_vops);
}
+ for (link = ASM_CLOBBERS (stmt); link; link = TREE_CHAIN (link))
+ if (!strcmp (TREE_STRING_POINTER (TREE_VALUE (link)), "memory")
+ && num_call_clobbered_vars > 0)
+ add_call_clobber_ops (stmt, prev_vops);
}
break;