comparison gcc/tree-ssa-operands.c @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents 77e2b8dfacca
children f6334be47118
comparison
equal deleted inserted replaced
56:3c8a44c06a95 63:b7f97abdc517
1 /* SSA operands management for trees. 1 /* SSA operands management for trees.
2 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 2 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5 This file is part of GCC. 5 This file is part of GCC.
6 6
7 GCC is free software; you can redistribute it and/or modify 7 GCC is free software; you can redistribute it and/or modify
24 #include "tm.h" 24 #include "tm.h"
25 #include "tree.h" 25 #include "tree.h"
26 #include "flags.h" 26 #include "flags.h"
27 #include "function.h" 27 #include "function.h"
28 #include "diagnostic.h" 28 #include "diagnostic.h"
29 #include "tree-pretty-print.h"
30 #include "gimple-pretty-print.h"
29 #include "tree-flow.h" 31 #include "tree-flow.h"
30 #include "tree-inline.h" 32 #include "tree-inline.h"
31 #include "tree-pass.h" 33 #include "tree-pass.h"
32 #include "ggc.h" 34 #include "ggc.h"
33 #include "timevar.h" 35 #include "timevar.h"
730 /* A subroutine of get_expr_operands to handle TARGET_MEM_REF. */ 732 /* A subroutine of get_expr_operands to handle TARGET_MEM_REF. */
731 733
732 static void 734 static void
733 get_tmr_operands (gimple stmt, tree expr, int flags) 735 get_tmr_operands (gimple stmt, tree expr, int flags)
734 { 736 {
737 if (TREE_THIS_VOLATILE (expr))
738 gimple_set_has_volatile_ops (stmt, true);
739
735 /* First record the real operands. */ 740 /* First record the real operands. */
736 get_expr_operands (stmt, &TMR_BASE (expr), opf_use | (flags & opf_no_vops)); 741 get_expr_operands (stmt, &TMR_BASE (expr), opf_use | (flags & opf_no_vops));
737 get_expr_operands (stmt, &TMR_INDEX (expr), opf_use | (flags & opf_no_vops)); 742 get_expr_operands (stmt, &TMR_INDEX (expr), opf_use | (flags & opf_no_vops));
738 743
739 if (TMR_SYMBOL (expr)) 744 if (TMR_SYMBOL (expr))
793 gcc_assert (!allows_reg || !is_inout); 798 gcc_assert (!allows_reg || !is_inout);
794 799
795 /* Memory operands are addressable. Note that STMT needs the 800 /* Memory operands are addressable. Note that STMT needs the
796 address of this operand. */ 801 address of this operand. */
797 if (!allows_reg && allows_mem) 802 if (!allows_reg && allows_mem)
798 { 803 mark_address_taken (TREE_VALUE (link));
799 tree t = get_base_address (TREE_VALUE (link));
800 if (t && DECL_P (t))
801 mark_address_taken (t);
802 }
803 804
804 get_expr_operands (stmt, &TREE_VALUE (link), opf_def); 805 get_expr_operands (stmt, &TREE_VALUE (link), opf_def);
805 } 806 }
806 807
807 /* Gather all input operands. */ 808 /* Gather all input operands. */
813 &allows_mem, &allows_reg); 814 &allows_mem, &allows_reg);
814 815
815 /* Memory operands are addressable. Note that STMT needs the 816 /* Memory operands are addressable. Note that STMT needs the
816 address of this operand. */ 817 address of this operand. */
817 if (!allows_reg && allows_mem) 818 if (!allows_reg && allows_mem)
818 { 819 mark_address_taken (TREE_VALUE (link));
819 tree t = get_base_address (TREE_VALUE (link));
820 if (t && DECL_P (t))
821 mark_address_taken (t);
822 }
823 820
824 get_expr_operands (stmt, &TREE_VALUE (link), 0); 821 get_expr_operands (stmt, &TREE_VALUE (link), 0);
825 } 822 }
826 823
827 /* Clobber all memory and addressable symbols for asm ("" : : : "memory"); */ 824 /* Clobber all memory and addressable symbols for asm ("" : : : "memory"); */