aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-07-18 08:49:55 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-07-18 08:49:55 +0000
commitb0f4a35f73d421cac856149de1756a51d833adb3 (patch)
tree49094ac8cd688ab1fd9e8a0126ce952929b0706b /gcc/expr.c
parentdad57b685cc668f11a70649b83e6317edd22194a (diff)
downloadgcc-b0f4a35f73d421cac856149de1756a51d833adb3.zip
gcc-b0f4a35f73d421cac856149de1756a51d833adb3.tar.gz
gcc-b0f4a35f73d421cac856149de1756a51d833adb3.tar.bz2
tree.h (get_object_or_type_alignment): Remove.
2012-07-18 Richard Guenther <rguenther@suse.de> * tree.h (get_object_or_type_alignment): Remove. * builtins.c (get_object_alignment_2): New function copied from get_object_alignment_1. Take extra argument to indicate whether we take the address of EXP. Rework to use type alignment information if not, and return whether the result is an approximation or not. (get_object_alignment_1): Wrap around get_object_alignment_2. (get_pointer_alignment_1): Call get_object_alignment_2 indicating we take the address. (get_object_or_type_alignment): Remove. * expr.c (expand_assignment): Call get_object_alignment. (expand_expr_real_1): Likewise. From-SVN: r189607
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index cf7d236..880e1bc 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -4590,7 +4590,7 @@ expand_assignment (tree to, tree from, bool nontemporal)
|| TREE_CODE (to) == TARGET_MEM_REF)
&& mode != BLKmode
&& !mem_ref_refers_to_non_mem_p (to)
- && ((align = get_object_or_type_alignment (to))
+ && ((align = get_object_alignment (to))
< GET_MODE_ALIGNMENT (mode))
&& (((icode = optab_handler (movmisalign_optab, mode))
!= CODE_FOR_nothing)
@@ -4652,7 +4652,7 @@ expand_assignment (tree to, tree from, bool nontemporal)
mode = TYPE_MODE (TREE_TYPE (tem));
if (TREE_CODE (tem) == MEM_REF
&& mode != BLKmode
- && ((align = get_object_or_type_alignment (tem))
+ && ((align = get_object_alignment (tem))
< GET_MODE_ALIGNMENT (mode))
&& ((icode = optab_handler (movmisalign_optab, mode))
!= CODE_FOR_nothing))
@@ -9496,7 +9496,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
temp = gen_rtx_MEM (mode, op0);
set_mem_attributes (temp, exp, 0);
set_mem_addr_space (temp, as);
- align = get_object_or_type_alignment (exp);
+ align = get_object_alignment (exp);
if (modifier != EXPAND_WRITE
&& mode != BLKmode
&& align < GET_MODE_ALIGNMENT (mode)
@@ -9570,7 +9570,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
gimple_assign_rhs1 (def_stmt), mask);
TREE_OPERAND (exp, 0) = base;
}
- align = get_object_or_type_alignment (exp);
+ align = get_object_alignment (exp);
op0 = expand_expr (base, NULL_RTX, VOIDmode, EXPAND_SUM);
op0 = memory_address_addr_space (address_mode, op0, as);
if (!integer_zerop (TREE_OPERAND (exp, 1)))