Commit 4994da65 by Richard Guenther Committed by Richard Biener

re PR rtl-optimization/47216 (gcc.dg/torture/pr43360.c FAILs with -O -fPIC…

re PR rtl-optimization/47216 (gcc.dg/torture/pr43360.c FAILs with -O -fPIC -fgcse -fgcse-sm -fnon-call-exceptions -fno-tree-dse)

2011-01-18  Richard Guenther  <rguenther@suse.de>

	PR rtl-optimization/47216
	* emit-rtl.c: Include tree-flow.h.
	(set_mem_attributes_minus_bitpos): Use tree_could_trap_p instead
	of replicating it with different semantics.
	* Makefile.in (emit-rtl.o): Adjust.

From-SVN: r168951
parent 1eb458d1
2011-01-18 Richard Guenther <rguenther@suse.de>
PR rtl-optimization/47216
* emit-rtl.c: Include tree-flow.h.
(set_mem_attributes_minus_bitpos): Use tree_could_trap_p instead
of replicating it with different semantics.
* Makefile.in (emit-rtl.o): Adjust.
2011-01-18 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config/arm/cortex-a9.md (cortex-a9-neon.md): Actually
......
......@@ -2952,7 +2952,7 @@ emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(FUNCTION_H) $(REGS_H) insn-config.h $(RECOG_H) \
$(GGC_H) $(EXPR_H) hard-reg-set.h $(BITMAP_H) $(DIAGNOSTIC_CORE_H) $(BASIC_BLOCK_H) \
$(HASHTAB_H) $(TM_P_H) debug.h langhooks.h $(TREE_PASS_H) gt-emit-rtl.h \
$(DF_H) $(PARAMS_H) $(TARGET_H)
$(DF_H) $(PARAMS_H) $(TARGET_H) $(TREE_FLOW_H)
real.o : real.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(DIAGNOSTIC_CORE_H) $(TM_P_H) $(REAL_H) dfp.h realmpfr.h
realmpfr.o : realmpfr.c realmpfr.h $(CONFIG_H) $(SYSTEM_H) $(REAL_H)
......
......@@ -59,6 +59,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "params.h"
#include "target.h"
#include "tree-flow.h"
struct target_rtl default_target_rtl;
#if SWITCHABLE_TARGET
......@@ -1669,33 +1670,10 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
|| TREE_CODE (t) == SAVE_EXPR)
t = TREE_OPERAND (t, 0);
/* We may look through structure-like accesses for the purposes of
examining TREE_THIS_NOTRAP, but not array-like accesses. */
base = t;
while (TREE_CODE (base) == COMPONENT_REF
|| TREE_CODE (base) == REALPART_EXPR
|| TREE_CODE (base) == IMAGPART_EXPR
|| TREE_CODE (base) == BIT_FIELD_REF)
base = TREE_OPERAND (base, 0);
if (TREE_CODE (base) == MEM_REF
&& TREE_CODE (TREE_OPERAND (base, 0)) == ADDR_EXPR)
base = TREE_OPERAND (TREE_OPERAND (base, 0), 0);
if (DECL_P (base))
{
if (CODE_CONTAINS_STRUCT (TREE_CODE (base), TS_DECL_WITH_VIS))
MEM_NOTRAP_P (ref) = !DECL_WEAK (base);
else
MEM_NOTRAP_P (ref) = 1;
}
else if (TREE_CODE (base) == INDIRECT_REF
|| TREE_CODE (base) == MEM_REF
|| TREE_CODE (base) == TARGET_MEM_REF
|| TREE_CODE (base) == ARRAY_REF
|| TREE_CODE (base) == ARRAY_RANGE_REF)
MEM_NOTRAP_P (ref) = TREE_THIS_NOTRAP (base);
base = get_base_address (base);
/* Note whether this expression can trap. */
MEM_NOTRAP_P (ref) = !tree_could_trap_p (t);
base = get_base_address (t);
if (base && DECL_P (base)
&& TREE_READONLY (base)
&& (TREE_STATIC (base) || DECL_EXTERNAL (base))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment