diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2015-06-10 00:37:39 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2015-06-10 00:37:39 +0000 |
commit | 0f9f9784ad1bb59e89f03e5cb00ebc22f500c059 (patch) | |
tree | 44bd2d64a442165a5d4162e8caf3157b8f5557a6 /gcc/expr.c | |
parent | a79b6a3044aa97f8ba6b491ee1796f318c68285a (diff) | |
download | gcc-0f9f9784ad1bb59e89f03e5cb00ebc22f500c059.zip gcc-0f9f9784ad1bb59e89f03e5cb00ebc22f500c059.tar.gz gcc-0f9f9784ad1bb59e89f03e5cb00ebc22f500c059.tar.bz2 |
Revert "[PR64164] Drop copyrename, use coalescible partition as base when optimizing."
This reverts commit c66acc7cedd89bfd22124caec44b8427c9082dac.
Conflicts:
gcc/ChangeLog
gcc/testsuite/ChangeLog
From-SVN: r224310
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 39 |
1 files changed, 14 insertions, 25 deletions
@@ -9290,7 +9290,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, rtx op0, op1, temp, decl_rtl; tree type; int unsignedp; - machine_mode mode, dmode; + machine_mode mode; enum tree_code code = TREE_CODE (exp); rtx subtarget, original_target; int ignore; @@ -9421,8 +9421,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, if (g == NULL && modifier == EXPAND_INITIALIZER && !SSA_NAME_IS_DEFAULT_DEF (exp) - && (optimize || !SSA_NAME_VAR (exp) - || DECL_IGNORED_P (SSA_NAME_VAR (exp))) + && (optimize || DECL_IGNORED_P (SSA_NAME_VAR (exp))) && stmt_is_replaceable_p (SSA_NAME_DEF_STMT (exp))) g = SSA_NAME_DEF_STMT (exp); if (g) @@ -9501,18 +9500,15 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, /* Ensure variable marked as used even if it doesn't go through a parser. If it hasn't be used yet, write out an external definition. */ - if (exp) - TREE_USED (exp) = 1; + TREE_USED (exp) = 1; /* Show we haven't gotten RTL for this yet. */ temp = 0; /* Variables inherited from containing functions should have been lowered by this point. */ - if (exp) - context = decl_function_context (exp); - gcc_assert (!exp - || SCOPE_FILE_SCOPE_P (context) + context = decl_function_context (exp); + gcc_assert (SCOPE_FILE_SCOPE_P (context) || context == current_function_decl || TREE_STATIC (exp) || DECL_EXTERNAL (exp) @@ -9536,8 +9532,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, decl_rtl = use_anchored_address (decl_rtl); if (modifier != EXPAND_CONST_ADDRESS && modifier != EXPAND_SUM - && !memory_address_addr_space_p (exp ? DECL_MODE (exp) - : GET_MODE (decl_rtl), + && !memory_address_addr_space_p (DECL_MODE (exp), XEXP (decl_rtl, 0), MEM_ADDR_SPACE (decl_rtl))) temp = replace_equiv_address (decl_rtl, @@ -9548,17 +9543,12 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, if the address is a register. */ if (temp != 0) { - if (exp && MEM_P (temp) && REG_P (XEXP (temp, 0))) + if (MEM_P (temp) && REG_P (XEXP (temp, 0))) mark_reg_pointer (XEXP (temp, 0), DECL_ALIGN (exp)); return temp; } - if (exp) - dmode = DECL_MODE (exp); - else - dmode = TYPE_MODE (TREE_TYPE (ssa_name)); - /* If the mode of DECL_RTL does not match that of the decl, there are two cases: we are dealing with a BLKmode value that is returned in a register, or we are dealing with @@ -9566,23 +9556,22 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, of the wanted mode, but mark it so that we know that it was already extended. */ if (REG_P (decl_rtl) - && dmode != BLKmode - && GET_MODE (decl_rtl) != dmode) + && DECL_MODE (exp) != BLKmode + && GET_MODE (decl_rtl) != DECL_MODE (exp)) { machine_mode pmode; /* Get the signedness to be used for this variable. Ensure we get the same mode we got when the variable was declared. */ - if (code != SSA_NAME) - pmode = promote_decl_mode (exp, &unsignedp); - else if ((g = SSA_NAME_DEF_STMT (ssa_name)) - && gimple_code (g) == GIMPLE_CALL - && !gimple_call_internal_p (g)) + if (code == SSA_NAME + && (g = SSA_NAME_DEF_STMT (ssa_name)) + && gimple_code (g) == GIMPLE_CALL + && !gimple_call_internal_p (g)) pmode = promote_function_mode (type, mode, &unsignedp, gimple_call_fntype (g), 2); else - pmode = promote_ssa_mode (ssa_name, &unsignedp); + pmode = promote_decl_mode (exp, &unsignedp); gcc_assert (GET_MODE (decl_rtl) == pmode); temp = gen_lowpart_SUBREG (mode, decl_rtl); |