diff options
author | Richard Henderson <rth@redhat.com> | 2004-09-28 19:50:47 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-09-28 19:50:47 -0700 |
commit | aa24864c2389a86dbba4e0a04c3eb0a3c14d10d9 (patch) | |
tree | 6ec2f8d5a10435c23e27413403888abc84af50b0 /gcc/tree-ssa-copy.c | |
parent | e376fe584282938a72a287a467a408ec4619e5fb (diff) | |
download | gcc-aa24864c2389a86dbba4e0a04c3eb0a3c14d10d9.zip gcc-aa24864c2389a86dbba4e0a04c3eb0a3c14d10d9.tar.gz gcc-aa24864c2389a86dbba4e0a04c3eb0a3c14d10d9.tar.bz2 |
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
Diffstat (limited to 'gcc/tree-ssa-copy.c')
-rw-r--r-- | gcc/tree-ssa-copy.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 |