From aa24864c2389a86dbba4e0a04c3eb0a3c14d10d9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 28 Sep 2004 19:50:47 -0700 Subject: re PR tree-optimization/15089 (local register variable with a specified register is bad) PR 15089 * tree-ssa-copy.c (may_propagate_copy_into_asm): New. * tree-flow.h (may_propagate_copy_into_asm): Declare. * tree-ssa-ccp.c (replace_uses_in): Use it. * tree-ssa-dom.c (cprop_operand): Likewise. From-SVN: r88269 --- gcc/tree-ssa-copy.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gcc/tree-ssa-copy.c') diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index 447f149..63a3c20 100644 --- a/gcc/tree-ssa-copy.c +++ b/gcc/tree-ssa-copy.c @@ -156,6 +156,16 @@ may_propagate_copy (tree dest, tree orig) return true; } +/* Similarly, but we know that we're propagating into an ASM_EXPR. */ + +bool +may_propagate_copy_into_asm (tree dest) +{ + /* Hard register operands of asms are special. Do not bypass. */ + return !(TREE_CODE (dest) == SSA_NAME + && DECL_HARD_REGISTER (SSA_NAME_VAR (dest))); +} + /* Given two SSA_NAMEs pointers ORIG and NEW such that we are copy propagating NEW into ORIG, consolidate aliasing information so that -- cgit v1.1