4.8.0-0.3

This commit is contained in:
Jakub Jelinek 2013-01-06 12:13:05 +01:00
parent 30ee91c661
commit e835ae255a
29 changed files with 1460 additions and 1649 deletions

3
.gitignore vendored
View File

@ -47,3 +47,6 @@
/gcc-4.7.2-20121015.tar.bz2 /gcc-4.7.2-20121015.tar.bz2
/gcc-4.7.2-20121105.tar.bz2 /gcc-4.7.2-20121105.tar.bz2
/gcc-4.7.2-20121109.tar.bz2 /gcc-4.7.2-20121109.tar.bz2
/cloog-0.17.0.tar.gz
/isl-0.10.tar.bz2
/gcc-4.8.0-20130106.tar.bz2

925
gcc.spec

File diff suppressed because it is too large Load Diff

View File

@ -1,52 +0,0 @@
2012-05-01 Richard Earnshaw <rearnsha@arm.com>
* arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_DEFAULT): Avoid ifdef
comparing enumeration values. Update comments.
2012-04-26 Michael Hope <michael.hope@linaro.org>
Richard Earnshaw <rearnsha@arm.com>
* config/arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_SOFT_FLOAT): Define.
(GLIBC_DYNAMIC_LINKER_HARD_FLOAT): Define.
(GLIBC_DYNAMIC_LINKER_DEFAULT): Define.
(GLIBC_DYNAMIC_LINKER): Redefine to use the hard float path.
--- gcc/config/arm/linux-eabi.h (revision 186858)
+++ gcc/config/arm/linux-eabi.h (revision 187012)
@@ -32,7 +32,8 @@
while (false)
/* We default to a soft-float ABI so that binaries can run on all
- target hardware. */
+ target hardware. If you override this to use the hard-float ABI then
+ change the setting of GLIBC_DYNAMIC_LINKER_DEFAULT as well. */
#undef TARGET_DEFAULT_FLOAT_ABI
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
@@ -59,10 +60,23 @@
#undef SUBTARGET_EXTRA_LINK_SPEC
#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
-/* Use ld-linux.so.3 so that it will be possible to run "classic"
- GNU/Linux binaries on an EABI system. */
+/* GNU/Linux on ARM currently supports three dynamic linkers:
+ - ld-linux.so.2 - for the legacy ABI
+ - ld-linux.so.3 - for the EABI-derived soft-float ABI
+ - ld-linux-armhf.so.3 - for the EABI-derived hard-float ABI.
+ All the dynamic linkers live in /lib.
+ We default to soft-float, but this can be overridden by changing both
+ GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
+
#undef GLIBC_DYNAMIC_LINKER
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
+#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
+
+#define GLIBC_DYNAMIC_LINKER \
+ "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \
+ %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
+ %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
use the GNU/Linux version, not the generic BPABI version. */

View File

@ -1,134 +0,0 @@
2007-10-02 Jakub Jelinek <jakub@redhat.com>
* decl.c (duplicate_decls): When redeclaring a builtin function,
keep the merged decl builtin whenever types match, even if new
decl defines a function.
* gcc.dg/builtins-85.c: New test.
* g++.dg/ext/builtin30.C: New test.
--- gcc/cp/decl.c.jj 2007-10-01 22:11:09.000000000 +0200
+++ gcc/cp/decl.c 2007-10-02 11:39:46.000000000 +0200
@@ -2137,39 +2137,37 @@ duplicate_decls (tree newdecl, tree oldd
DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl);
DECL_RESULT (olddecl) = DECL_RESULT (newdecl);
}
+ /* If redeclaring a builtin function, it stays built in. */
+ if (types_match && DECL_BUILT_IN (olddecl))
+ {
+ DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
+ DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
+ /* If we're keeping the built-in definition, keep the rtl,
+ regardless of declaration matches. */
+ COPY_DECL_RTL (olddecl, newdecl);
+ if (DECL_BUILT_IN_CLASS (newdecl) == BUILT_IN_NORMAL)
+ {
+ enum built_in_function fncode = DECL_FUNCTION_CODE (newdecl);
+ switch (fncode)
+ {
+ /* If a compatible prototype of these builtin functions
+ is seen, assume the runtime implements it with the
+ expected semantics. */
+ case BUILT_IN_STPCPY:
+ if (builtin_decl_explicit_p (fncode))
+ set_builtin_decl_implicit_p (fncode, true);
+ break;
+ default:
+ break;
+ }
+ }
+ }
if (new_defines_function)
/* If defining a function declared with other language
linkage, use the previously declared language linkage. */
SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl));
else if (types_match)
{
- /* If redeclaring a builtin function, and not a definition,
- it stays built in. */
- if (DECL_BUILT_IN (olddecl))
- {
- DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
- DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
- /* If we're keeping the built-in definition, keep the rtl,
- regardless of declaration matches. */
- COPY_DECL_RTL (olddecl, newdecl);
- if (DECL_BUILT_IN_CLASS (newdecl) == BUILT_IN_NORMAL)
- {
- enum built_in_function fncode = DECL_FUNCTION_CODE (newdecl);
- switch (fncode)
- {
- /* If a compatible prototype of these builtin functions
- is seen, assume the runtime implements it with the
- expected semantics. */
- case BUILT_IN_STPCPY:
- if (builtin_decl_explicit_p (fncode))
- set_builtin_decl_implicit_p (fncode, true);
- break;
- default:
- break;
- }
- }
- }
-
DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
/* Don't clear out the arguments if we're just redeclaring a
function. */
--- gcc/testsuite/gcc.dg/builtins-85.c.jj 2007-10-02 11:23:51.000000000 +0200
+++ gcc/testsuite/gcc.dg/builtins-85.c 2007-10-02 11:24:12.000000000 +0200
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef __SIZE_TYPE__ size_t;
+extern void __chk_fail (void);
+extern int snprintf (char *, size_t, const char *, ...);
+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
+{
+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
+ __chk_fail ();
+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
+}
+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
+
+char buf[10];
+
+int
+main (void)
+{
+ snprintf (buf, 10, "%d%d\n", 10, 10);
+ return 0;
+}
+
+/* { dg-final { scan-assembler "mysnprintf" } } */
+/* { dg-final { scan-assembler-not "__chk_fail" } } */
--- gcc/testsuite/g++.dg/ext/builtin30.C.jj 2007-10-02 11:19:45.000000000 +0200
+++ gcc/testsuite/g++.dg/ext/builtin30.C 2007-10-02 11:23:26.000000000 +0200
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-O2" }
+
+typedef __SIZE_TYPE__ size_t;
+extern "C" {
+extern void __chk_fail (void);
+extern int snprintf (char *, size_t, const char *, ...);
+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
+{
+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
+ __chk_fail ();
+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
+}
+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
+}
+
+char buf[10];
+
+int
+main (void)
+{
+ snprintf (buf, 10, "%d%d\n", 10, 10);
+ return 0;
+}
+
+// { dg-final { scan-assembler "mysnprintf" } }
+// { dg-final { scan-assembler-not "__chk_fail" } }

View File

@ -1,472 +0,0 @@
2011-01-04 Jakub Jelinek <jakub@redhat.com>
* Makefile.in (BACKENDLIBS): Link against -ldl instead of
-lcloog -lppl.
(graphite.o, graphite%.o): Force -O, remove -fkeep-inline-functions.
(GRAPHITE_CLOOG_UTIL_H, GRAPHITE_POLY_H): New.
(graphite*.o): Adjust dependencies.
* graphite-cloog-compat.h: Include <dlfcn.h>. Reference libcloog and
libppl symbols through pointers in cloog_pointers__ variable.
* graphite.c (init_cloog_pointers): New function.
(graphite_transform_loops): Call init_cloog_pointers.
* graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Rename
stmt_for argument to stmt_fora.
* graphite-poly.h: Include graphite-cloog-util.h.
--- gcc/Makefile.in.jj 2011-01-03 13:44:14.163900902 +0100
+++ gcc/Makefile.in 2011-01-04 17:48:53.588775911 +0100
@@ -962,6 +962,8 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plug
PLUGIN_H = plugin.h $(GCC_PLUGIN_H)
PLUGIN_VERSION_H = plugin-version.h configargs.h
LIBFUNCS_H = libfuncs.h $(HASHTAB_H)
+GRAPHITE_CLOOG_UTIL_H = graphite-cloog-util.h graphite-cloog-compat.h
+GRAPHITE_POLY_H = graphite-poly.h $(GRAPHITE_CLOOG_UTIL_H)
#
# Now figure out from those variables how to compile and link.
@@ -1016,7 +1018,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# and the system's installed libraries.
LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) \
$(LIBDECNUMBER) $(HOST_LIBS)
-BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
+BACKENDLIBS = $(GMPLIBS) $(if $(CLOOGLIBS),-ldl) $(PLUGINLIBS) $(HOST_LIBS) \
$(ZLIB)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
@@ -2602,40 +2604,40 @@ sese.o : sese.c sese.h $(CONFIG_H) $(SYS
$(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) tree-pass.h value-prof.h
graphite.o : graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) \
$(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h \
- $(DBGCNT_H) graphite-ppl.h graphite-poly.h graphite-scop-detection.h \
+ $(DBGCNT_H) graphite-ppl.h $(GRAPHITE_POLY_H) graphite-scop-detection.h \
graphite-clast-to-gimple.h graphite-sese-to-poly.h
graphite-blocking.o : graphite-blocking.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
- sese.h graphite-ppl.h graphite-poly.h
+ sese.h graphite-ppl.h $(GRAPHITE_POLY_H)
graphite-clast-to-gimple.o : graphite-clast-to-gimple.c $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \
- $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-cloog-util.h \
- graphite-ppl.h graphite-poly.h graphite-clast-to-gimple.h \
+ $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h $(GRAPHITE_CLOOG_UTIL_H) \
+ graphite-ppl.h $(GRAPHITE_POLY_H) graphite-clast-to-gimple.h \
graphite-dependences.h graphite-cloog-compat.h
graphite-cloog-util.o : graphite-cloog-util.c $(CONFIG_H) $(SYSTEM_H) \
- coretypes.h graphite-cloog-util.h graphite-cloog-compat.h
+ coretypes.h $(GRAPHITE_CLOOG_UTIL_H) graphite-cloog-compat.h
graphite-dependences.o : graphite-dependences.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
- sese.h graphite-ppl.h graphite-poly.h graphite-dependences.h \
- graphite-cloog-util.h
+ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) graphite-dependences.h \
+ $(GRAPHITE_CLOOG_UTIL_H)
graphite-flattening.o : graphite-flattening.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
- sese.h graphite-ppl.h graphite-poly.h
+ sese.h graphite-ppl.h $(GRAPHITE_POLY_H)
graphite-interchange.o : graphite-interchange.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
- sese.h graphite-ppl.h graphite-poly.h
+ sese.h graphite-ppl.h $(GRAPHITE_POLY_H)
graphite-poly.o : graphite-poly.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_DUMP_H) gimple-pretty-print.h \
- $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-ppl.h graphite-poly.h \
- graphite-dependences.h graphite-cloog-util.h
+ $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-ppl.h $(GRAPHITE_POLY_H) \
+ graphite-dependences.h $(GRAPHITE_CLOOG_UTIL_H)
graphite-ppl.o : graphite-ppl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- graphite-cloog-util.h graphite-ppl.h
+ $(GRAPHITE_CLOOG_UTIL_H) graphite-ppl.h
graphite-scop-detection.o : graphite-scop-detection.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(TREE_PASS_H) \
- sese.h graphite-ppl.h graphite-poly.h graphite-scop-detection.h
+ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) graphite-scop-detection.h
graphite-sese-to-poly.o : graphite-sese-to-poly.c $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) \
- $(TREE_DATA_REF_H) domwalk.h sese.h graphite-ppl.h graphite-poly.h \
+ $(TREE_DATA_REF_H) domwalk.h sese.h graphite-ppl.h $(GRAPHITE_POLY_H) \
graphite-sese-to-poly.h
tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \
@@ -3454,6 +3456,15 @@ $(common_out_object_file): $(common_out_
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
$< $(OUTPUT_OPTION)
+graphite%.o : \
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
+graphite.o : \
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
+graphite%.o : \
+ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
+graphite.o : \
+ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
+
# Build auxiliary files that support ecoff format.
mips-tfile: mips-tfile.o $(LIBDEPS)
$(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \
--- gcc/graphite-cloog-compat.h.jj 2011-01-03 12:53:05.000000000 +0100
+++ gcc/graphite-cloog-compat.h 2011-01-04 17:34:09.857757544 +0100
@@ -272,4 +272,279 @@ static inline int cloog_matrix_nrows (Cl
return m->NbRows;
}
#endif /* CLOOG_ORG */
+
+#include <dlfcn.h>
+#if PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11
+#define DYNSYMS_PPL11
+#else
+#define DYNSYMS_PPL11 \
+ DYNSYM (ppl_new_PIP_Problem_from_constraints); \
+ DYNSYM (ppl_PIP_Problem_is_satisfiable); \
+ DYNSYM (ppl_delete_PIP_Problem);
+#endif
+#define DYNSYMS \
+ DYNSYM (cloog_block_alloc); \
+ DYNSYM (cloog_block_list_free); \
+ DYNSYM (cloog_block_list_malloc); \
+ DYNSYM (cloog_clast_create); \
+ DYNSYM (cloog_clast_free); \
+ DYNSYM (cloog_domain_free); \
+ DYNSYM (cloog_domain_matrix2domain); \
+ DYNSYM (cloog_initialize); \
+ DYNSYM (cloog_loop_malloc); \
+ DYNSYM (cloog_matrix_alloc); \
+ DYNSYM (cloog_matrix_copy); \
+ DYNSYM (cloog_matrix_free); \
+ DYNSYM (cloog_matrix_print); \
+ DYNSYM (cloog_names_malloc); \
+ DYNSYM (cloog_names_scalarize); \
+ DYNSYM (cloog_options_free); \
+ DYNSYM (cloog_options_malloc); \
+ DYNSYM (cloog_program_dump_cloog); \
+ DYNSYM (cloog_program_extract_scalars); \
+ DYNSYM (cloog_program_free); \
+ DYNSYM (cloog_program_generate); \
+ DYNSYM (cloog_program_malloc); \
+ DYNSYM (cloog_program_print); \
+ DYNSYM (cloog_program_scatter); \
+ DYNSYM (cloog_statement_alloc); \
+ DYNSYM (cloog_domain_union); \
+ DYNSYM (cloog_matrix_read); \
+ DYNSYM (cloog_new_pol); \
+ DYNSYM (cloog_vector_gcd); \
+ DYNSYM (ppl_finalize); \
+ DYNSYM (ppl_assign_Coefficient_from_mpz_t); \
+ DYNSYM (ppl_assign_Linear_Expression_from_Linear_Expression); \
+ DYNSYM (ppl_Coefficient_to_mpz_t); \
+ DYNSYM (ppl_Constraint_coefficient); \
+ DYNSYM (ppl_Constraint_inhomogeneous_term); \
+ DYNSYM (ppl_Constraint_space_dimension); \
+ DYNSYM (ppl_Constraint_System_begin); \
+ DYNSYM (ppl_Constraint_System_const_iterator_dereference); \
+ DYNSYM (ppl_Constraint_System_const_iterator_equal_test); \
+ DYNSYM (ppl_Constraint_System_const_iterator_increment); \
+ DYNSYM (ppl_Constraint_System_end); \
+ DYNSYM (ppl_Constraint_System_insert_Constraint); \
+ DYNSYM (ppl_Constraint_System_space_dimension); \
+ DYNSYM (ppl_Constraint_type); \
+ DYNSYM (ppl_delete_Coefficient); \
+ DYNSYM (ppl_delete_Constraint); \
+ DYNSYM (ppl_delete_Constraint_System_const_iterator); \
+ DYNSYM (ppl_delete_Linear_Expression); \
+ DYNSYM (ppl_delete_Pointset_Powerset_C_Polyhedron); \
+ DYNSYM (ppl_delete_Pointset_Powerset_C_Polyhedron_iterator); \
+ DYNSYM (ppl_delete_Polyhedron); \
+ DYNSYM (ppl_Linear_Expression_add_to_coefficient); \
+ DYNSYM (ppl_Linear_Expression_add_to_inhomogeneous); \
+ DYNSYM (ppl_Linear_Expression_coefficient); \
+ DYNSYM (ppl_Linear_Expression_inhomogeneous_term); \
+ DYNSYM (ppl_Linear_Expression_space_dimension); \
+ DYNSYM (ppl_new_Coefficient); \
+ DYNSYM (ppl_new_Coefficient_from_mpz_t); \
+ DYNSYM (ppl_new_Constraint); \
+ DYNSYM (ppl_new_Constraint_System); \
+ DYNSYM (ppl_new_Constraint_System_const_iterator); \
+ DYNSYM (ppl_new_C_Polyhedron_from_C_Polyhedron); \
+ DYNSYM (ppl_new_C_Polyhedron_from_space_dimension); \
+ DYNSYM (ppl_new_C_Polyhedron_recycle_Constraint_System); \
+ DYNSYM (ppl_new_Linear_Expression); \
+ DYNSYM (ppl_new_Linear_Expression_from_Constraint); \
+ DYNSYM (ppl_new_Linear_Expression_from_Linear_Expression); \
+ DYNSYM (ppl_new_Linear_Expression_with_dimension); \
+ DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron); \
+ DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron); \
+ DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension); \
+ DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_iterator); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_add_constraint); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_difference_assign); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_intersection_assign); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_is_empty); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_begin); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_end); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_increment); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_maximize); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_minimize); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_size); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_space_dimension); \
+ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign); \
+ DYNSYM (ppl_Polyhedron_add_constraint); \
+ DYNSYM (ppl_Polyhedron_add_constraints); \
+ DYNSYM (ppl_Polyhedron_add_space_dimensions_and_embed); \
+ DYNSYM (ppl_Polyhedron_get_constraints); \
+ DYNSYM (ppl_Polyhedron_map_space_dimensions); \
+ DYNSYM (ppl_Polyhedron_remove_space_dimensions); \
+ DYNSYM (ppl_Polyhedron_space_dimension); \
+ DYNSYM (ppl_subtract_Linear_Expression_from_Linear_Expression); \
+ DYNSYM (pprint); \
+ DYNSYM (stmt_block); \
+ DYNSYM (stmt_for); \
+ DYNSYM (stmt_guard); \
+ DYNSYM (stmt_root); \
+ DYNSYM (stmt_user); \
+ DYNSYM (stmt_ass); \
+ DYNSYM (ppl_delete_Constraint_System); \
+ DYNSYM (ppl_initialize); \
+ DYNSYM (ppl_new_Constraint_System_from_Constraint); \
+ DYNSYM (ppl_new_C_Polyhedron_from_Constraint_System); \
+ DYNSYM (ppl_Polyhedron_affine_image); \
+ DYNSYM (ppl_io_fprint_Pointset_Powerset_C_Polyhedron); \
+ DYNSYMS_PPL11
+extern struct cloog_pointers_s__
+{
+ bool inited;
+ void *h;
+#define DYNSYM(x) __typeof (x) *p_##x
+ DYNSYMS
+#undef DYNSYM
+} cloog_pointers__;
+
+#define cloog_block_alloc (*cloog_pointers__.p_cloog_block_alloc)
+#define cloog_block_list_free (*cloog_pointers__.p_cloog_block_list_free)
+#define cloog_block_list_malloc (*cloog_pointers__.p_cloog_block_list_malloc)
+#define cloog_clast_create (*cloog_pointers__.p_cloog_clast_create)
+#define cloog_clast_free (*cloog_pointers__.p_cloog_clast_free)
+#define cloog_domain_free (*cloog_pointers__.p_cloog_domain_free)
+#define cloog_domain_matrix2domain (*cloog_pointers__.p_cloog_domain_matrix2domain)
+#define cloog_initialize (*cloog_pointers__.p_cloog_initialize)
+#ifndef CLOOG_ORG
+#undef cloog_loop_malloc
+#define cloog_loop_malloc(STATE) (*cloog_pointers__.p_cloog_loop_malloc) ()
+#else
+#define cloog_loop_malloc (*cloog_pointers__.p_cloog_loop_malloc)
+#endif
+#define cloog_matrix_alloc (*cloog_pointers__.p_cloog_matrix_alloc)
+#define cloog_matrix_copy (*cloog_pointers__.p_cloog_matrix_copy)
+#define cloog_matrix_free (*cloog_pointers__.p_cloog_matrix_free)
+#define cloog_matrix_print (*cloog_pointers__.p_cloog_matrix_print)
+#define cloog_names_malloc (*cloog_pointers__.p_cloog_names_malloc)
+#define cloog_names_scalarize (*cloog_pointers__.p_cloog_names_scalarize)
+#define cloog_options_free (*cloog_pointers__.p_cloog_options_free)
+#ifndef CLOOG_ORG
+#undef cloog_options_malloc
+#define cloog_options_malloc(STATE) (*cloog_pointers__.p_cloog_options_malloc) ()
+#undef cloog_program_dump_cloog
+#define cloog_program_dump_cloog(DUMPFILE, PROGRAM, SCATTERINGLIST) \
+ (*cloog_pointers__.p_cloog_program_dump_cloog) (DUMPFILE, PROGRAM)
+#undef cloog_program_extract_scalars
+#define cloog_program_extract_scalars(PROG, SCATT, OPT) \
+ (*cloog_pointers__.p_cloog_program_extract_scalars) (PROG, SCATT)
+#else
+#define cloog_options_malloc (*cloog_pointers__.p_cloog_options_malloc)
+#define cloog_program_dump_cloog (*cloog_pointers__.p_cloog_program_dump_cloog)
+#define cloog_program_extract_scalars (*cloog_pointers__.p_cloog_program_extract_scalars)
+#endif
+#define cloog_program_free (*cloog_pointers__.p_cloog_program_free)
+#define cloog_program_generate (*cloog_pointers__.p_cloog_program_generate)
+#define cloog_program_malloc (*cloog_pointers__.p_cloog_program_malloc)
+#define cloog_program_print (*cloog_pointers__.p_cloog_program_print)
+#ifndef CLOOG_ORG
+#undef cloog_program_scatter
+#define cloog_program_scatter(PROG, SCATT, OPT) \
+ (*cloog_pointers__.p_cloog_program_scatter) (PROG, SCATT)
+#undef cloog_statement_alloc
+#define cloog_statement_alloc(STATE, INDEX) \
+ (*cloog_pointers__.p_cloog_statement_alloc) (INDEX)
+#else
+#define cloog_program_scatter (*cloog_pointers__.p_cloog_program_scatter)
+#define cloog_statement_alloc (*cloog_pointers__.p_cloog_statement_alloc)
+#endif
+#define cloog_domain_union (*cloog_pointers__.p_cloog_domain_union)
+#define cloog_matrix_read (*cloog_pointers__.p_cloog_matrix_read)
+#define cloog_new_pol (*cloog_pointers__.p_cloog_new_pol)
+#define cloog_vector_gcd (*cloog_pointers__.p_cloog_vector_gcd)
+#define ppl_finalize (*cloog_pointers__.p_ppl_finalize)
+#define ppl_assign_Coefficient_from_mpz_t (*cloog_pointers__.p_ppl_assign_Coefficient_from_mpz_t)
+#define ppl_assign_Linear_Expression_from_Linear_Expression (*cloog_pointers__.p_ppl_assign_Linear_Expression_from_Linear_Expression)
+#define ppl_Coefficient_to_mpz_t (*cloog_pointers__.p_ppl_Coefficient_to_mpz_t)
+#define ppl_Constraint_coefficient (*cloog_pointers__.p_ppl_Constraint_coefficient)
+#define ppl_Constraint_inhomogeneous_term (*cloog_pointers__.p_ppl_Constraint_inhomogeneous_term)
+#define ppl_Constraint_space_dimension (*cloog_pointers__.p_ppl_Constraint_space_dimension)
+#define ppl_Constraint_System_begin (*cloog_pointers__.p_ppl_Constraint_System_begin)
+#define ppl_Constraint_System_const_iterator_dereference (*cloog_pointers__.p_ppl_Constraint_System_const_iterator_dereference)
+#define ppl_Constraint_System_const_iterator_equal_test (*cloog_pointers__.p_ppl_Constraint_System_const_iterator_equal_test)
+#define ppl_Constraint_System_const_iterator_increment (*cloog_pointers__.p_ppl_Constraint_System_const_iterator_increment)
+#define ppl_Constraint_System_end (*cloog_pointers__.p_ppl_Constraint_System_end)
+#define ppl_Constraint_System_insert_Constraint (*cloog_pointers__.p_ppl_Constraint_System_insert_Constraint)
+#define ppl_Constraint_System_space_dimension (*cloog_pointers__.p_ppl_Constraint_System_space_dimension)
+#define ppl_Constraint_type (*cloog_pointers__.p_ppl_Constraint_type)
+#define ppl_delete_Coefficient (*cloog_pointers__.p_ppl_delete_Coefficient)
+#define ppl_delete_Constraint (*cloog_pointers__.p_ppl_delete_Constraint)
+#define ppl_delete_Constraint_System_const_iterator (*cloog_pointers__.p_ppl_delete_Constraint_System_const_iterator)
+#define ppl_delete_Linear_Expression (*cloog_pointers__.p_ppl_delete_Linear_Expression)
+#define ppl_delete_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_delete_Pointset_Powerset_C_Polyhedron)
+#define ppl_delete_Pointset_Powerset_C_Polyhedron_iterator (*cloog_pointers__.p_ppl_delete_Pointset_Powerset_C_Polyhedron_iterator)
+#define ppl_delete_Polyhedron (*cloog_pointers__.p_ppl_delete_Polyhedron)
+#define ppl_Linear_Expression_add_to_coefficient (*cloog_pointers__.p_ppl_Linear_Expression_add_to_coefficient)
+#define ppl_Linear_Expression_add_to_inhomogeneous (*cloog_pointers__.p_ppl_Linear_Expression_add_to_inhomogeneous)
+#define ppl_Linear_Expression_coefficient (*cloog_pointers__.p_ppl_Linear_Expression_coefficient)
+#define ppl_Linear_Expression_inhomogeneous_term (*cloog_pointers__.p_ppl_Linear_Expression_inhomogeneous_term)
+#define ppl_Linear_Expression_space_dimension (*cloog_pointers__.p_ppl_Linear_Expression_space_dimension)
+#define ppl_new_Coefficient (*cloog_pointers__.p_ppl_new_Coefficient)
+#define ppl_new_Coefficient_from_mpz_t (*cloog_pointers__.p_ppl_new_Coefficient_from_mpz_t)
+#define ppl_new_Constraint (*cloog_pointers__.p_ppl_new_Constraint)
+#define ppl_new_Constraint_System (*cloog_pointers__.p_ppl_new_Constraint_System)
+#define ppl_new_Constraint_System_const_iterator (*cloog_pointers__.p_ppl_new_Constraint_System_const_iterator)
+#define ppl_new_C_Polyhedron_from_C_Polyhedron (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_C_Polyhedron)
+#define ppl_new_C_Polyhedron_from_space_dimension (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_space_dimension)
+#define ppl_new_C_Polyhedron_recycle_Constraint_System (*cloog_pointers__.p_ppl_new_C_Polyhedron_recycle_Constraint_System)
+#define ppl_new_Linear_Expression (*cloog_pointers__.p_ppl_new_Linear_Expression)
+#define ppl_new_Linear_Expression_from_Constraint (*cloog_pointers__.p_ppl_new_Linear_Expression_from_Constraint)
+#define ppl_new_Linear_Expression_from_Linear_Expression (*cloog_pointers__.p_ppl_new_Linear_Expression_from_Linear_Expression)
+#define ppl_new_Linear_Expression_with_dimension (*cloog_pointers__.p_ppl_new_Linear_Expression_with_dimension)
+#define ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron)
+#define ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron)
+#define ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension)
+#define ppl_new_Pointset_Powerset_C_Polyhedron_iterator (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_iterator)
+#define ppl_Pointset_Powerset_C_Polyhedron_add_constraint (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_add_constraint)
+#define ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed)
+#define ppl_Pointset_Powerset_C_Polyhedron_difference_assign (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_difference_assign)
+#define ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_intersection_assign)
+#define ppl_Pointset_Powerset_C_Polyhedron_is_empty (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_is_empty)
+#define ppl_Pointset_Powerset_C_Polyhedron_iterator_begin (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_begin)
+#define ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference)
+#define ppl_Pointset_Powerset_C_Polyhedron_iterator_end (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_end)
+#define ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test)
+#define ppl_Pointset_Powerset_C_Polyhedron_iterator_increment (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_increment)
+#define ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions)
+#define ppl_Pointset_Powerset_C_Polyhedron_maximize (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_maximize)
+#define ppl_Pointset_Powerset_C_Polyhedron_minimize (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_minimize)
+#define ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions)
+#define ppl_Pointset_Powerset_C_Polyhedron_size (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_size)
+#define ppl_Pointset_Powerset_C_Polyhedron_space_dimension (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_space_dimension)
+#define ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign)
+#define ppl_Polyhedron_add_constraint (*cloog_pointers__.p_ppl_Polyhedron_add_constraint)
+#define ppl_Polyhedron_add_constraints (*cloog_pointers__.p_ppl_Polyhedron_add_constraints)
+#define ppl_Polyhedron_add_space_dimensions_and_embed (*cloog_pointers__.p_ppl_Polyhedron_add_space_dimensions_and_embed)
+#define ppl_Polyhedron_get_constraints (*cloog_pointers__.p_ppl_Polyhedron_get_constraints)
+#define ppl_Polyhedron_map_space_dimensions (*cloog_pointers__.p_ppl_Polyhedron_map_space_dimensions)
+#define ppl_Polyhedron_remove_space_dimensions (*cloog_pointers__.p_ppl_Polyhedron_remove_space_dimensions)
+#define ppl_Polyhedron_space_dimension (*cloog_pointers__.p_ppl_Polyhedron_space_dimension)
+#define ppl_subtract_Linear_Expression_from_Linear_Expression (*cloog_pointers__.p_ppl_subtract_Linear_Expression_from_Linear_Expression)
+#define pprint (*cloog_pointers__.p_pprint)
+#define stmt_block (*cloog_pointers__.p_stmt_block)
+#define stmt_for (*cloog_pointers__.p_stmt_for)
+#define stmt_guard (*cloog_pointers__.p_stmt_guard)
+#define stmt_root (*cloog_pointers__.p_stmt_root)
+#define stmt_user (*cloog_pointers__.p_stmt_user)
+#define stmt_ass (*cloog_pointers__.p_stmt_ass)
+#define ppl_delete_Constraint_System (*cloog_pointers__.p_ppl_delete_Constraint_System)
+#define ppl_initialize (*cloog_pointers__.p_ppl_initialize)
+#define ppl_new_Constraint_System_from_Constraint (*cloog_pointers__.p_ppl_new_Constraint_System_from_Constraint)
+#define ppl_new_C_Polyhedron_from_Constraint_System (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_Constraint_System)
+#define ppl_Polyhedron_affine_image (*cloog_pointers__.p_ppl_Polyhedron_affine_image)
+#define ppl_io_fprint_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_io_fprint_Pointset_Powerset_C_Polyhedron)
+#if !(PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11)
+#define ppl_new_PIP_Problem_from_constraints (*cloog_pointers__.p_ppl_new_PIP_Problem_from_constraints)
+#define ppl_PIP_Problem_is_satisfiable (*cloog_pointers__.p_ppl_PIP_Problem_is_satisfiable)
+#define ppl_delete_PIP_Problem (*cloog_pointers__.p_ppl_delete_PIP_Problem)
+#endif
+
+#define cloog_finalize (*cloog_pointers__.p_ppl_finalize)
+
+
#endif /* GRAPHITE_CLOOG_COMPAT_H */
--- gcc/graphite.c.jj 2011-01-03 12:53:05.194056513 +0100
+++ gcc/graphite.c 2011-01-04 16:18:32.385007767 +0100
@@ -56,6 +56,35 @@ along with GCC; see the file COPYING3.
CloogState *cloog_state;
+__typeof (cloog_pointers__) cloog_pointers__;
+
+static bool
+init_cloog_pointers (void)
+{
+ void *h;
+
+ if (cloog_pointers__.inited)
+ return cloog_pointers__.h != NULL;
+ h = dlopen ("libcloog.so.0", RTLD_LAZY);
+ cloog_pointers__.h = h;
+ if (h == NULL)
+ return false;
+#define DYNSYM(x) \
+ do \
+ { \
+ union { __typeof (cloog_pointers__.p_##x) p; void *q; } u; \
+ u.q = dlsym (h, #x); \
+ if (u.q == NULL) \
+ return false; \
+ cloog_pointers__.p_##x = u.p; \
+ } \
+ while (0)
+ DYNSYMS
+#undef DYNSYM
+ return true;
+}
+
+
/* Print global statistics to FILE. */
static void
@@ -201,6 +230,12 @@ graphite_initialize (void)
return false;
}
+ if (!init_cloog_pointers ())
+ {
+ sorry ("Graphite loop optimizations cannot be used");
+ return false;
+ }
+
scev_reset ();
recompute_all_dominators ();
initialize_original_copy_tables ();
--- gcc/graphite-clast-to-gimple.c.jj 2011-01-03 12:53:05.000000000 +0100
+++ gcc/graphite-clast-to-gimple.c 2011-01-04 16:29:55.738007463 +0100
@@ -836,7 +836,7 @@ clast_get_body_of_loop (struct clast_stm
from STMT_FOR. */
static tree
-type_for_clast_for (struct clast_for *stmt_for, ivs_params_p ip)
+type_for_clast_for (struct clast_for *stmt_fora, ivs_params_p ip)
{
mpz_t bound_one, bound_two;
tree lb_type, ub_type;
@@ -844,8 +844,8 @@ type_for_clast_for (struct clast_for *st
mpz_init (bound_one);
mpz_init (bound_two);
- lb_type = type_for_clast_expr (stmt_for->LB, ip, bound_one, bound_two);
- ub_type = type_for_clast_expr (stmt_for->UB, ip, bound_one, bound_two);
+ lb_type = type_for_clast_expr (stmt_fora->LB, ip, bound_one, bound_two);
+ ub_type = type_for_clast_expr (stmt_fora->UB, ip, bound_one, bound_two);
mpz_clear (bound_one);
mpz_clear (bound_two);
--- gcc/graphite-poly.h.jj 2011-01-03 12:53:05.000000000 +0100
+++ gcc/graphite-poly.h 2011-01-04 17:35:53.308788629 +0100
@@ -22,6 +22,8 @@ along with GCC; see the file COPYING3.
#ifndef GCC_GRAPHITE_POLY_H
#define GCC_GRAPHITE_POLY_H
+#include "graphite-cloog-util.h"
+
typedef struct poly_dr *poly_dr_p;
DEF_VEC_P(poly_dr_p);
DEF_VEC_ALLOC_P (poly_dr_p, heap);

View File

@ -1,28 +0,0 @@
2011-12-22 Jakub Jelinek <jakub@redhat.com>
* Makefile.am (beginend.lo): Append -fno-exceptions to
CXXFLAGS.
* Makefile.in: Regenerated.
--- libitm/Makefile.am.jj 2011-12-20 13:47:57.000000000 +0100
+++ libitm/Makefile.am 2011-12-22 09:14:06.663469165 +0100
@@ -72,6 +72,8 @@ endif
if ARCH_X86_AVX
x86_avx.lo : XCFLAGS += -mavx
endif
+beginend.lo : CXXCOMPILE += -fno-exceptions
+beginend.lo : LTCXXCOMPILE += -fno-exceptions
if ARCH_FUTEX
libitm_la_SOURCES += futex.cc
--- libitm/Makefile.in.jj 2011-12-20 13:47:57.000000000 +0100
+++ libitm/Makefile.in 2011-12-22 09:14:29.466329944 +0100
@@ -1278,6 +1278,8 @@ vpath % $(strip $(search_path))
@LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBITM_BUILD_VERSIONED_SHLIB_TRUE@ > $@ || (rm -f $@ ; exit 1)
@ARCH_X86_TRUE@x86_sse.lo : XCFLAGS += -msse
@ARCH_X86_AVX_TRUE@x86_avx.lo : XCFLAGS += -mavx
+beginend.lo : CXXCOMPILE += -fno-exceptions
+beginend.lo : LTCXXCOMPILE += -fno-exceptions
all-local: $(STAMP_GENINSRC)

View File

@ -1,22 +0,0 @@
2011-10-27 Jakub Jelinek <jakub@redhat.com>
* prims.cc (__NO_CTYPE): For glibc define this before including
ctype.h.
--- libjava/prims.cc 2009-04-28 06:02:30.000000000 +0200
+++ libjava/prims.cc 2011-10-27 12:57:42.748752380 +0200
@@ -38,6 +38,14 @@ details. */
#endif
#ifndef DISABLE_GETENV_PROPERTIES
+#ifdef __GLIBC__
+/* glibc 2.15+ provides even for C++ inline optimized ::isspace etc.
+ Unfortunately those inlines are throw (), and call a function pointer
+ (which is throw () too, but with -fnon-call-exceptions this results
+ in a __cxa_call_unexpected call. This macro disables the optimized
+ version. */
+#define __NO_CTYPE 1
+#endif
#include <ctype.h>
#include <java-props.h>
#define PROCESS_GCJ_PROPERTIES process_gcj_properties()

View File

@ -1,121 +0,0 @@
2011-01-28 Jakub Jelinek <jakub@redhat.com>
Revert:
2011-01-25 Sebastian Pop <sebastian.pop@amd.com>
* configure: Regenerated.
* configure.ac: Check for version 0.11 (or later revision) of PPL.
gcc/
* doc/install.texi: Update the expected version number of PPL to 0.11.
* graphite-ppl.c (ppl_powerset_is_empty): Remove now dead code under
#if PPL_VERSION_MINOR < 11.
--- gcc/doc/install.texi (revision 169207)
+++ gcc/doc/install.texi (revision 169206)
@@ -362,7 +362,7 @@ installed but it is not in your default
@option{--with-mpc} configure option should be used. See also
@option{--with-mpc-lib} and @option{--with-mpc-include}.
-@item Parma Polyhedra Library (PPL) version 0.11
+@item Parma Polyhedra Library (PPL) version 0.10
Necessary to build GCC with the Graphite loop optimizations.
It can be downloaded from @uref{http://www.cs.unipr.it/ppl/Download/}.
--- gcc/graphite-ppl.c (revision 169207)
+++ gcc/graphite-ppl.c (revision 169206)
@@ -521,6 +521,15 @@ debug_gmp_value (mpz_t val)
bool
ppl_powerset_is_empty (ppl_Pointset_Powerset_C_Polyhedron_t ps)
{
+#if PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11
+ /* On PPL 0.10,
+ ppl_Pointset_Powerset_C_Polyhedron_contains_integer_point (ps)
+ takes too long on some cases and so we call _is_empty instead. */
+ return ppl_Pointset_Powerset_C_Polyhedron_is_empty (ps);
+
+#else
+ /* On PPL 0.11 or later, we can check for integer feasibility using
+ the PIP solver. */
ppl_PIP_Problem_t pip;
ppl_dimension_type d;
ppl_const_Constraint_System_t pcs;
@@ -561,6 +570,7 @@ ppl_powerset_is_empty (ppl_Pointset_Powe
ppl_delete_Pointset_Powerset_C_Polyhedron_iterator (end);
return !has_integer_solutions;
+#endif
}
#endif
--- configure.ac (revision 169207)
+++ configure.ac (revision 169206)
@@ -1688,9 +1688,9 @@ if test "x$with_ppl" != xno; then
if test "$enable_ppl_version_check" != no; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pplinc $gmpinc"
- AC_MSG_CHECKING([for version 0.11 (revision 0 or later) of PPL])
+ AC_MSG_CHECKING([for version 0.10 (revision 0 or later) of PPL])
AC_TRY_COMPILE([#include "ppl_c.h"],[
- #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 11
+ #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10
choke me
#endif
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ])
--- configure (revision 169207)
+++ configure (revision 169206)
@@ -5775,8 +5775,8 @@ fi
if test "$enable_ppl_version_check" != no; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pplinc $gmpinc"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.11 (revision 0 or later) of PPL" >&5
-$as_echo_n "checking for version 0.11 (revision 0 or later) of PPL... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.10 (revision 0 or later) of PPL" >&5
+$as_echo_n "checking for version 0.10 (revision 0 or later) of PPL... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include "ppl_c.h"
@@ -5784,7 +5784,7 @@ int
main ()
{
- #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 11
+ #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10
choke me
#endif
--- gcc/testsuite/gcc.dg/graphite/interchange-11.c.jj 2011-01-28 09:38:11.000000000 +0100
+++ gcc/testsuite/gcc.dg/graphite/interchange-11.c 2011-01-28 11:06:56.461429848 +0100
@@ -46,5 +46,5 @@ main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
--- gcc/testsuite/gcc.dg/graphite/interchange-13.c.jj 2011-01-28 09:38:12.000000000 +0100
+++ gcc/testsuite/gcc.dg/graphite/interchange-13.c 2011-01-28 11:07:08.182429223 +0100
@@ -50,5 +50,5 @@ main (void)
}
-/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
--- gcc/testsuite/gcc.dg/graphite/interchange-1.c.jj 2011-01-28 09:38:13.000000000 +0100
+++ gcc/testsuite/gcc.dg/graphite/interchange-1.c 2011-01-28 11:06:42.160429193 +0100
@@ -49,5 +49,5 @@ main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
--- gcc/testsuite/gfortran.dg/graphite/interchange-3.f90.jj 2011-01-28 09:38:05.000000000 +0100
+++ gcc/testsuite/gfortran.dg/graphite/interchange-3.f90 2011-01-28 11:07:46.313420441 +0100
@@ -24,5 +24,5 @@ Program FOO
end Program FOO
-! { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } }
+! { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } }
! { dg-final { cleanup-tree-dump "graphite" } }

View File

@ -1,180 +0,0 @@
2012-11-07 Jakub Jelinek <jakub@redhat.com>
PR c++/55137
* fold-const.c (fold_binary_loc) <associate>: Don't introduce
TREE_OVERFLOW through reassociation. If type doesn't have defined
overflow, but one or both of the operands do, use the wrapping type
for reassociation and only convert to type at the end.
* g++.dg/opt/pr55137.C: New test.
* gcc.c-torture/execute/pr55137.c: New test.
--- gcc/fold-const.c.jj 2012-11-07 09:16:41.929494183 +0100
+++ gcc/fold-const.c 2012-11-07 09:47:12.227710542 +0100
@@ -10309,6 +10309,7 @@ fold_binary_loc (location_t loc,
{
tree var0, con0, lit0, minus_lit0;
tree var1, con1, lit1, minus_lit1;
+ tree atype = type;
bool ok = true;
/* Split both trees into variables, constants, and literals. Then
@@ -10324,11 +10325,25 @@ fold_binary_loc (location_t loc,
if (code == MINUS_EXPR)
code = PLUS_EXPR;
- /* With undefined overflow we can only associate constants with one
- variable, and constants whose association doesn't overflow. */
+ /* With undefined overflow prefer doing association in a type
+ which wraps on overflow, if that is one of the operand types. */
if ((POINTER_TYPE_P (type) && POINTER_TYPE_OVERFLOW_UNDEFINED)
|| (INTEGRAL_TYPE_P (type) && !TYPE_OVERFLOW_WRAPS (type)))
{
+ if (INTEGRAL_TYPE_P (TREE_TYPE (arg0))
+ && TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0)))
+ atype = TREE_TYPE (arg0);
+ else if (INTEGRAL_TYPE_P (TREE_TYPE (arg1))
+ && TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg1)))
+ atype = TREE_TYPE (arg1);
+ gcc_assert (TYPE_PRECISION (atype) == TYPE_PRECISION (type));
+ }
+
+ /* With undefined overflow we can only associate constants with one
+ variable, and constants whose association doesn't overflow. */
+ if ((POINTER_TYPE_P (atype) && POINTER_TYPE_OVERFLOW_UNDEFINED)
+ || (INTEGRAL_TYPE_P (atype) && !TYPE_OVERFLOW_WRAPS (atype)))
+ {
if (var0 && var1)
{
tree tmp0 = var0;
@@ -10343,16 +10358,6 @@ fold_binary_loc (location_t loc,
if (!operand_equal_p (tmp0, tmp1, 0))
ok = false;
}
-
- if (ok && lit0 && lit1)
- {
- tree tmp0 = fold_convert (type, lit0);
- tree tmp1 = fold_convert (type, lit1);
-
- if (!TREE_OVERFLOW (tmp0) && !TREE_OVERFLOW (tmp1)
- && TREE_OVERFLOW (fold_build2 (code, type, tmp0, tmp1)))
- ok = false;
- }
}
/* Only do something if we found more than two objects. Otherwise,
@@ -10363,10 +10368,16 @@ fold_binary_loc (location_t loc,
+ (lit0 != 0) + (lit1 != 0)
+ (minus_lit0 != 0) + (minus_lit1 != 0))))
{
- var0 = associate_trees (loc, var0, var1, code, type);
- con0 = associate_trees (loc, con0, con1, code, type);
- lit0 = associate_trees (loc, lit0, lit1, code, type);
- minus_lit0 = associate_trees (loc, minus_lit0, minus_lit1, code, type);
+ bool any_overflows = false;
+ if (lit0) any_overflows |= TREE_OVERFLOW (lit0);
+ if (lit1) any_overflows |= TREE_OVERFLOW (lit1);
+ if (minus_lit0) any_overflows |= TREE_OVERFLOW (minus_lit0);
+ if (minus_lit1) any_overflows |= TREE_OVERFLOW (minus_lit1);
+ var0 = associate_trees (loc, var0, var1, code, atype);
+ con0 = associate_trees (loc, con0, con1, code, atype);
+ lit0 = associate_trees (loc, lit0, lit1, code, atype);
+ minus_lit0 = associate_trees (loc, minus_lit0, minus_lit1,
+ code, atype);
/* Preserve the MINUS_EXPR if the negative part of the literal is
greater than the positive part. Otherwise, the multiplicative
@@ -10380,38 +10391,45 @@ fold_binary_loc (location_t loc,
&& tree_int_cst_lt (lit0, minus_lit0))
{
minus_lit0 = associate_trees (loc, minus_lit0, lit0,
- MINUS_EXPR, type);
+ MINUS_EXPR, atype);
lit0 = 0;
}
else
{
lit0 = associate_trees (loc, lit0, minus_lit0,
- MINUS_EXPR, type);
+ MINUS_EXPR, atype);
minus_lit0 = 0;
}
}
+
+ /* Don't introduce overflows through reassociation. */
+ if (!any_overflows
+ && ((lit0 && TREE_OVERFLOW (lit0))
+ || (minus_lit0 && TREE_OVERFLOW (minus_lit0))))
+ return NULL_TREE;
+
if (minus_lit0)
{
if (con0 == 0)
return
fold_convert_loc (loc, type,
associate_trees (loc, var0, minus_lit0,
- MINUS_EXPR, type));
+ MINUS_EXPR, atype));
else
{
con0 = associate_trees (loc, con0, minus_lit0,
- MINUS_EXPR, type);
+ MINUS_EXPR, atype);
return
fold_convert_loc (loc, type,
associate_trees (loc, var0, con0,
- PLUS_EXPR, type));
+ PLUS_EXPR, atype));
}
}
- con0 = associate_trees (loc, con0, lit0, code, type);
+ con0 = associate_trees (loc, con0, lit0, code, atype);
return
fold_convert_loc (loc, type, associate_trees (loc, var0, con0,
- code, type));
+ code, atype));
}
}
--- gcc/testsuite/g++.dg/opt/pr55137.C.jj 2012-11-07 09:31:45.027160654 +0100
+++ gcc/testsuite/g++.dg/opt/pr55137.C 2012-11-07 09:31:45.028160649 +0100
@@ -0,0 +1,4 @@
+// PR c++/55137
+// { dg-do compile }
+
+enum E { F = -1 + (int) (sizeof (int) - 1) };
--- gcc/testsuite/gcc.c-torture/execute/pr55137.c.jj 2012-11-07 09:44:11.226768063 +0100
+++ gcc/testsuite/gcc.c-torture/execute/pr55137.c 2012-11-07 09:44:24.380691303 +0100
@@ -0,0 +1,30 @@
+/* PR c++/55137 */
+
+extern void abort (void);
+
+int
+foo (unsigned int x)
+{
+ return ((int) (x + 1U) + 1) < (int) x;
+}
+
+int
+bar (unsigned int x)
+{
+ return (int) (x + 1U) + 1;
+}
+
+int
+baz (unsigned int x)
+{
+ return x + 1U;
+}
+
+int
+main ()
+{
+ if (foo (__INT_MAX__) != (bar (__INT_MAX__) < __INT_MAX__)
+ || foo (__INT_MAX__) != ((int) baz (__INT_MAX__) + 1 < __INT_MAX__))
+ abort ();
+ return 0;
+}

View File

@ -1,62 +0,0 @@
2012-11-08 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/55236
* fold-const.c (make_range_step) <case NEGATE_EXPR>: For -fwrapv
and signed ARG0_TYPE, force low and high to be non-NULL.
* gcc.dg/pr55236.c: New test.
--- gcc/fold-const.c.jj 2012-11-07 11:24:34.000000000 +0100
+++ gcc/fold-const.c 2012-11-08 16:54:38.978339040 +0100
@@ -3880,6 +3880,17 @@ make_range_step (location_t loc, enum tr
return arg0;
case NEGATE_EXPR:
+ /* If flag_wrapv and ARG0_TYPE is signed, make sure
+ low and high are non-NULL, then normalize will DTRT. */
+ if (!TYPE_UNSIGNED (arg0_type)
+ && !TYPE_OVERFLOW_UNDEFINED (arg0_type))
+ {
+ if (low == NULL_TREE)
+ low = TYPE_MIN_VALUE (arg0_type);
+ if (high == NULL_TREE)
+ high = TYPE_MAX_VALUE (arg0_type);
+ }
+
/* (-x) IN [a,b] -> x in [-b, -a] */
n_low = range_binop (MINUS_EXPR, exp_type,
build_int_cst (exp_type, 0),
--- gcc/testsuite/gcc.dg/pr55236.c.jj 2012-11-08 16:40:49.171781137 +0100
+++ gcc/testsuite/gcc.dg/pr55236.c 2012-11-08 16:41:20.044578919 +0100
@@ -0,0 +1,31 @@
+/* PR tree-optimization/55236 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fwrapv" } */
+
+extern void abort ();
+
+__attribute__((noinline, noclone)) void
+foo (int i)
+{
+ if (i > 0)
+ abort ();
+ i = -i;
+ if (i < 0)
+ return;
+ abort ();
+}
+
+__attribute__((noinline, noclone)) void
+bar (int i)
+{
+ if (i > 0 || (-i) >= 0)
+ abort ();
+}
+
+int
+main ()
+{
+ foo (-__INT_MAX__ - 1);
+ bar (-__INT_MAX__ - 1);
+ return 0;
+}

View File

@ -1,16 +0,0 @@
2012-07-16 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.md (*movdi_internal32): Use m constraint instead
of o<>.
--- gcc/config/rs6000/rs6000.md 2012-07-16 10:14:43.198085150 +0200
+++ gcc/config/rs6000/rs6000.md 2012-07-16 10:33:31.856023210 +0200
@@ -10145,7 +10145,7 @@
; List r->r after r->"o<>", otherwise reload will try to reload a
; non-offsettable address by using r->r which won't make progress.
(define_insn "*movdi_internal32"
- [(set (match_operand:DI 0 "rs6000_nonimmediate_operand" "=o<>,r,r,*d,*d,m,r,?wa")
+ [(set (match_operand:DI 0 "rs6000_nonimmediate_operand" "=m,r,r,*d,*d,m,r,?wa")
(match_operand:DI 1 "input_operand" "r,r,m,d,m,d,IJKnGHF,O"))]
"! TARGET_POWERPC64
&& (gpc_reg_operand (operands[0], DImode)

145
gcc48-asan-ppc.patch Normal file
View File

@ -0,0 +1,145 @@
2012-12-21 Jakub Jelinek <jakub@redhat.com>
* varasm.c (output_constant_def_contents): For asan_protect_global
protected strings, adjust DECL_ALIGN if needed, before testing for
anchored symbols.
(place_block_symbol): Adjust size for asan protected STRING_CSTs if
TREE_CONSTANT_POOL_ADDRESS_P. Increase alignment for asan protected
normal decls.
(output_object_block): For asan protected decls, emit asan padding
after their contents.
* asan.c (asan_protect_global): Don't check TREE_ASM_WRITTEN here.
(asan_finish_file): Test it here instead.
--- gcc/varasm.c.jj 2012-12-20 19:10:19.856526720 +0100
+++ gcc/varasm.c 2012-12-21 10:37:44.481999545 +0100
@@ -3252,6 +3252,7 @@ output_constant_def_contents (rtx symbol
tree decl = SYMBOL_REF_DECL (symbol);
tree exp = DECL_INITIAL (decl);
unsigned int align;
+ bool asan_protected = false;
/* Make sure any other constants whose addresses appear in EXP
are assigned label numbers. */
@@ -3260,6 +3261,14 @@ output_constant_def_contents (rtx symbol
/* We are no longer deferring this constant. */
TREE_ASM_WRITTEN (decl) = TREE_ASM_WRITTEN (exp) = 1;
+ if (flag_asan && TREE_CODE (exp) == STRING_CST
+ && asan_protect_global (exp))
+ {
+ asan_protected = true;
+ DECL_ALIGN (decl) = MAX (DECL_ALIGN (decl),
+ ASAN_RED_ZONE_SIZE * BITS_PER_UNIT);
+ }
+
/* If the constant is part of an object block, make sure that the
decl has been positioned within its block, but do not write out
its definition yet. output_object_blocks will do that later. */
@@ -3267,15 +3276,8 @@ output_constant_def_contents (rtx symbol
place_block_symbol (symbol);
else
{
- bool asan_protected = false;
align = DECL_ALIGN (decl);
switch_to_section (get_constant_section (exp, align));
- if (flag_asan && TREE_CODE (exp) == STRING_CST
- && asan_protect_global (exp))
- {
- asan_protected = true;
- align = MAX (align, ASAN_RED_ZONE_SIZE * BITS_PER_UNIT);
- }
if (align > BITS_PER_UNIT)
ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT));
assemble_constant_contents (exp, XSTR (symbol, 0), align);
@@ -6968,6 +6970,10 @@ place_block_symbol (rtx symbol)
decl = SYMBOL_REF_DECL (symbol);
alignment = DECL_ALIGN (decl);
size = get_constant_size (DECL_INITIAL (decl));
+ if (flag_asan
+ && TREE_CODE (DECL_INITIAL (decl)) == STRING_CST
+ && asan_protect_global (DECL_INITIAL (decl)))
+ size += asan_red_zone_size (size);
}
else
{
@@ -6975,7 +6981,11 @@ place_block_symbol (rtx symbol)
alignment = DECL_ALIGN (decl);
size = tree_low_cst (DECL_SIZE_UNIT (decl), 1);
if (flag_asan && asan_protect_global (decl))
- size += asan_red_zone_size (size);
+ {
+ size += asan_red_zone_size (size);
+ alignment = MAX (alignment,
+ ASAN_RED_ZONE_SIZE * BITS_PER_UNIT);
+ }
}
/* Calculate the object's offset from the start of the block. */
@@ -7114,16 +7124,34 @@ output_object_block (struct object_block
}
else if (TREE_CONSTANT_POOL_ADDRESS_P (symbol))
{
+ HOST_WIDE_INT size;
decl = SYMBOL_REF_DECL (symbol);
assemble_constant_contents (DECL_INITIAL (decl), XSTR (symbol, 0),
DECL_ALIGN (decl));
- offset += get_constant_size (DECL_INITIAL (decl));
+ size = get_constant_size (DECL_INITIAL (decl));
+ offset += size;
+ if (flag_asan
+ && TREE_CODE (DECL_INITIAL (decl)) == STRING_CST
+ && asan_protect_global (DECL_INITIAL (decl)))
+ {
+ size = asan_red_zone_size (size);
+ assemble_zeros (size);
+ offset += size;
+ }
}
else
{
+ HOST_WIDE_INT size;
decl = SYMBOL_REF_DECL (symbol);
assemble_variable_contents (decl, XSTR (symbol, 0), false);
- offset += tree_low_cst (DECL_SIZE_UNIT (decl), 1);
+ size = tree_low_cst (DECL_SIZE_UNIT (decl), 1);
+ offset += size;
+ if (flag_asan && asan_protect_global (decl))
+ {
+ size = asan_red_zone_size (size);
+ assemble_zeros (size);
+ offset += size;
+ }
}
}
}
--- gcc/asan.c.jj 2012-12-20 11:38:14.000000000 +0100
+++ gcc/asan.c 2012-12-21 10:49:45.364823759 +0100
@@ -463,7 +463,6 @@ asan_protect_global (tree decl)
|| DECL_THREAD_LOCAL_P (decl)
/* Externs will be protected elsewhere. */
|| DECL_EXTERNAL (decl)
- || !TREE_ASM_WRITTEN (decl)
|| !DECL_RTL_SET_P (decl)
/* Comdat vars pose an ABI problem, we can't know if
the var that is selected by the linker will have
@@ -1699,7 +1698,8 @@ asan_finish_file (void)
tree fn = builtin_decl_implicit (BUILT_IN_ASAN_INIT);
append_to_statement_list (build_call_expr (fn, 0), &asan_ctor_statements);
FOR_EACH_DEFINED_VARIABLE (vnode)
- if (asan_protect_global (vnode->symbol.decl))
+ if (TREE_ASM_WRITTEN (vnode->symbol.decl)
+ && asan_protect_global (vnode->symbol.decl))
++gcount;
htab_t const_desc_htab = constant_pool_htab ();
htab_traverse (const_desc_htab, count_string_csts, &gcount);
@@ -1721,7 +1721,8 @@ asan_finish_file (void)
DECL_IGNORED_P (var) = 1;
vec_alloc (v, gcount);
FOR_EACH_DEFINED_VARIABLE (vnode)
- if (asan_protect_global (vnode->symbol.decl))
+ if (TREE_ASM_WRITTEN (vnode->symbol.decl)
+ && asan_protect_global (vnode->symbol.decl))
asan_add_global (vnode->symbol.decl, TREE_TYPE (type), v);
struct asan_add_string_csts_data aascd;
aascd.type = TREE_TYPE (type);

474
gcc48-cloog-dl.patch Normal file
View File

@ -0,0 +1,474 @@
--- gcc/Makefile.in.jj 2012-12-13 17:09:20.000000000 +0100
+++ gcc/Makefile.in 2012-12-14 11:45:22.585670055 +0100
@@ -1022,7 +1022,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# and the system's installed libraries.
LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
$(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
-BACKENDLIBS = $(CLOOGLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
+BACKENDLIBS = $(if $(CLOOGLIBS),-ldl) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
$(ZLIB)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
@@ -3442,6 +3442,15 @@ $(common_out_object_file): $(common_out_
$(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(OPTS_H) $(TM_H) $(TM_P_H) $(MACHMODE_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
$< $(OUTPUT_OPTION)
+
+graphite%.o : \
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
+graphite.o : \
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
+graphite%.o : \
+ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
+graphite.o : \
+ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
#
# Generate header and source files from the machine description,
# and compile them.
--- gcc/graphite-poly.h.jj 2012-12-13 11:31:27.000000000 +0100
+++ gcc/graphite-poly.h 2012-12-14 13:41:41.970800726 +0100
@@ -22,6 +22,369 @@ along with GCC; see the file COPYING3.
#ifndef GCC_GRAPHITE_POLY_H
#define GCC_GRAPHITE_POLY_H
+#include <isl/aff.h>
+#include <isl/schedule.h>
+#include <isl/ilp.h>
+#include <isl/flow.h>
+#include <isl/options.h>
+#include <cloog/isl/cloog.h>
+#include <dlfcn.h>
+#define DYNSYMS \
+ DYNSYM (clast_pprint); \
+ DYNSYM (cloog_clast_create_from_input); \
+ DYNSYM (cloog_clast_free); \
+ DYNSYM (cloog_domain_from_isl_set); \
+ DYNSYM (cloog_input_alloc); \
+ DYNSYM (cloog_isl_state_malloc); \
+ DYNSYM (cloog_options_free); \
+ DYNSYM (cloog_options_malloc); \
+ DYNSYM (cloog_scattering_from_isl_map); \
+ DYNSYM (cloog_state_free); \
+ DYNSYM (cloog_union_domain_add_domain); \
+ DYNSYM (cloog_union_domain_alloc); \
+ DYNSYM (cloog_union_domain_set_name); \
+ DYNSYM (isl_aff_add_coefficient_si); \
+ DYNSYM (isl_aff_add_constant); \
+ DYNSYM (isl_aff_free); \
+ DYNSYM (isl_aff_get_coefficient); \
+ DYNSYM (isl_aff_get_space); \
+ DYNSYM (isl_aff_mod); \
+ DYNSYM (isl_aff_set_coefficient_si); \
+ DYNSYM (isl_aff_set_constant_si); \
+ DYNSYM (isl_aff_zero_on_domain); \
+ DYNSYM (isl_band_free); \
+ DYNSYM (isl_band_get_children); \
+ DYNSYM (isl_band_get_partial_schedule); \
+ DYNSYM (isl_band_has_children); \
+ DYNSYM (isl_band_list_free); \
+ DYNSYM (isl_band_list_get_band); \
+ DYNSYM (isl_band_list_get_ctx); \
+ DYNSYM (isl_band_list_n_band); \
+ DYNSYM (isl_band_member_is_zero_distance); \
+ DYNSYM (isl_band_n_member); \
+ DYNSYM (isl_basic_map_add_constraint); \
+ DYNSYM (isl_basic_map_project_out); \
+ DYNSYM (isl_basic_map_universe); \
+ DYNSYM (isl_constraint_set_coefficient); \
+ DYNSYM (isl_constraint_set_coefficient_si); \
+ DYNSYM (isl_constraint_set_constant); \
+ DYNSYM (isl_constraint_set_constant_si); \
+ DYNSYM (isl_ctx_alloc); \
+ DYNSYM (isl_ctx_free); \
+ DYNSYM (isl_equality_alloc); \
+ DYNSYM (isl_id_alloc); \
+ DYNSYM (isl_id_copy); \
+ DYNSYM (isl_id_free); \
+ DYNSYM (isl_inequality_alloc); \
+ DYNSYM (isl_local_space_copy); \
+ DYNSYM (isl_local_space_free); \
+ DYNSYM (isl_local_space_from_space); \
+ DYNSYM (isl_local_space_range); \
+ DYNSYM (isl_map_add_constraint); \
+ DYNSYM (isl_map_add_dims); \
+ DYNSYM (isl_map_align_params); \
+ DYNSYM (isl_map_apply_range); \
+ DYNSYM (isl_map_copy); \
+ DYNSYM (isl_map_dim); \
+ DYNSYM (isl_map_dump); \
+ DYNSYM (isl_map_equate); \
+ DYNSYM (isl_map_fix_si); \
+ DYNSYM (isl_map_flat_product); \
+ DYNSYM (isl_map_flat_range_product); \
+ DYNSYM (isl_map_free); \
+ DYNSYM (isl_map_from_basic_map); \
+ DYNSYM (isl_map_from_pw_aff); \
+ DYNSYM (isl_map_from_union_map); \
+ DYNSYM (isl_map_get_ctx); \
+ DYNSYM (isl_map_get_space); \
+ DYNSYM (isl_map_get_tuple_id); \
+ DYNSYM (isl_map_insert_dims); \
+ DYNSYM (isl_map_intersect); \
+ DYNSYM (isl_map_intersect_domain); \
+ DYNSYM (isl_map_intersect_range); \
+ DYNSYM (isl_map_is_empty); \
+ DYNSYM (isl_map_lex_ge); \
+ DYNSYM (isl_map_lex_le); \
+ DYNSYM (isl_map_n_out); \
+ DYNSYM (isl_map_range); \
+ DYNSYM (isl_map_set_tuple_id); \
+ DYNSYM (isl_map_universe); \
+ DYNSYM (isl_options_set_on_error); \
+ DYNSYM (isl_options_set_schedule_fuse); \
+ DYNSYM (isl_options_set_schedule_max_constant_term); \
+ DYNSYM (isl_options_set_schedule_maximize_band_depth); \
+ DYNSYM (isl_printer_free); \
+ DYNSYM (isl_printer_print_aff); \
+ DYNSYM (isl_printer_print_constraint); \
+ DYNSYM (isl_printer_print_map); \
+ DYNSYM (isl_printer_print_set); \
+ DYNSYM (isl_printer_to_file); \
+ DYNSYM (isl_pw_aff_add); \
+ DYNSYM (isl_pw_aff_alloc); \
+ DYNSYM (isl_pw_aff_copy); \
+ DYNSYM (isl_pw_aff_eq_set); \
+ DYNSYM (isl_pw_aff_free); \
+ DYNSYM (isl_pw_aff_from_aff); \
+ DYNSYM (isl_pw_aff_ge_set); \
+ DYNSYM (isl_pw_aff_gt_set); \
+ DYNSYM (isl_pw_aff_is_cst); \
+ DYNSYM (isl_pw_aff_le_set); \
+ DYNSYM (isl_pw_aff_lt_set); \
+ DYNSYM (isl_pw_aff_mod); \
+ DYNSYM (isl_pw_aff_mul); \
+ DYNSYM (isl_pw_aff_ne_set); \
+ DYNSYM (isl_pw_aff_nonneg_set); \
+ DYNSYM (isl_pw_aff_set_tuple_id); \
+ DYNSYM (isl_pw_aff_sub); \
+ DYNSYM (isl_pw_aff_zero_set); \
+ DYNSYM (isl_schedule_free); \
+ DYNSYM (isl_schedule_get_band_forest); \
+ DYNSYM (isl_set_add_constraint); \
+ DYNSYM (isl_set_add_dims); \
+ DYNSYM (isl_set_apply); \
+ DYNSYM (isl_set_coalesce); \
+ DYNSYM (isl_set_copy); \
+ DYNSYM (isl_set_dim); \
+ DYNSYM (isl_set_fix_si); \
+ DYNSYM (isl_set_free); \
+ DYNSYM (isl_set_from_cloog_domain); \
+ DYNSYM (isl_set_get_space); \
+ DYNSYM (isl_set_get_tuple_id); \
+ DYNSYM (isl_set_intersect); \
+ DYNSYM (isl_set_is_empty); \
+ DYNSYM (isl_set_max); \
+ DYNSYM (isl_set_min); \
+ DYNSYM (isl_set_nat_universe); \
+ DYNSYM (isl_set_project_out); \
+ DYNSYM (isl_set_set_tuple_id); \
+ DYNSYM (isl_set_universe); \
+ DYNSYM (isl_space_add_dims); \
+ DYNSYM (isl_space_alloc); \
+ DYNSYM (isl_space_copy); \
+ DYNSYM (isl_space_dim); \
+ DYNSYM (isl_space_domain); \
+ DYNSYM (isl_space_find_dim_by_id); \
+ DYNSYM (isl_space_free); \
+ DYNSYM (isl_space_from_domain); \
+ DYNSYM (isl_space_get_tuple_id); \
+ DYNSYM (isl_space_params_alloc); \
+ DYNSYM (isl_space_range); \
+ DYNSYM (isl_space_set_alloc); \
+ DYNSYM (isl_space_set_dim_id); \
+ DYNSYM (isl_space_set_tuple_id); \
+ DYNSYM (isl_union_map_add_map); \
+ DYNSYM (isl_union_map_align_params); \
+ DYNSYM (isl_union_map_apply_domain); \
+ DYNSYM (isl_union_map_apply_range); \
+ DYNSYM (isl_union_map_compute_flow); \
+ DYNSYM (isl_union_map_copy); \
+ DYNSYM (isl_union_map_empty); \
+ DYNSYM (isl_union_map_flat_range_product); \
+ DYNSYM (isl_union_map_foreach_map); \
+ DYNSYM (isl_union_map_free); \
+ DYNSYM (isl_union_map_from_map); \
+ DYNSYM (isl_union_map_get_ctx); \
+ DYNSYM (isl_union_map_get_space); \
+ DYNSYM (isl_union_map_gist_domain); \
+ DYNSYM (isl_union_map_gist_range); \
+ DYNSYM (isl_union_map_intersect_domain); \
+ DYNSYM (isl_union_map_is_empty); \
+ DYNSYM (isl_union_map_subtract); \
+ DYNSYM (isl_union_map_union); \
+ DYNSYM (isl_union_set_add_set); \
+ DYNSYM (isl_union_set_compute_schedule); \
+ DYNSYM (isl_union_set_copy); \
+ DYNSYM (isl_union_set_empty); \
+ DYNSYM (isl_union_set_from_set); \
+ DYNSYM (stmt_ass); \
+ DYNSYM (stmt_block); \
+ DYNSYM (stmt_for); \
+ DYNSYM (stmt_guard); \
+ DYNSYM (stmt_root); \
+ DYNSYM (stmt_user);
+extern struct cloog_pointers_s__
+{
+ bool inited;
+ void *h;
+#define DYNSYM(x) __typeof (x) *p_##x
+ DYNSYMS
+#undef DYNSYM
+} cloog_pointers__;
+
+#define cloog_block_alloc (*cloog_pointers__.p_cloog_block_alloc)
+#define clast_pprint (*cloog_pointers__.p_clast_pprint)
+#define cloog_clast_create_from_input (*cloog_pointers__.p_cloog_clast_create_from_input)
+#define cloog_clast_free (*cloog_pointers__.p_cloog_clast_free)
+#define cloog_domain_from_isl_set (*cloog_pointers__.p_cloog_domain_from_isl_set)
+#define cloog_input_alloc (*cloog_pointers__.p_cloog_input_alloc)
+#define cloog_isl_state_malloc (*cloog_pointers__.p_cloog_isl_state_malloc)
+#define cloog_options_free (*cloog_pointers__.p_cloog_options_free)
+#define cloog_options_malloc (*cloog_pointers__.p_cloog_options_malloc)
+#define cloog_scattering_from_isl_map (*cloog_pointers__.p_cloog_scattering_from_isl_map)
+#define cloog_state_free (*cloog_pointers__.p_cloog_state_free)
+#define cloog_union_domain_add_domain (*cloog_pointers__.p_cloog_union_domain_add_domain)
+#define cloog_union_domain_alloc (*cloog_pointers__.p_cloog_union_domain_alloc)
+#define cloog_union_domain_set_name (*cloog_pointers__.p_cloog_union_domain_set_name)
+#define isl_aff_add_coefficient_si (*cloog_pointers__.p_isl_aff_add_coefficient_si)
+#define isl_aff_add_constant (*cloog_pointers__.p_isl_aff_add_constant)
+#define isl_aff_free (*cloog_pointers__.p_isl_aff_free)
+#define isl_aff_get_coefficient (*cloog_pointers__.p_isl_aff_get_coefficient)
+#define isl_aff_get_space (*cloog_pointers__.p_isl_aff_get_space)
+#define isl_aff_mod (*cloog_pointers__.p_isl_aff_mod)
+#define isl_aff_set_coefficient_si (*cloog_pointers__.p_isl_aff_set_coefficient_si)
+#define isl_aff_set_constant_si (*cloog_pointers__.p_isl_aff_set_constant_si)
+#define isl_aff_zero_on_domain (*cloog_pointers__.p_isl_aff_zero_on_domain)
+#define isl_band_free (*cloog_pointers__.p_isl_band_free)
+#define isl_band_get_children (*cloog_pointers__.p_isl_band_get_children)
+#define isl_band_get_partial_schedule (*cloog_pointers__.p_isl_band_get_partial_schedule)
+#define isl_band_has_children (*cloog_pointers__.p_isl_band_has_children)
+#define isl_band_list_free (*cloog_pointers__.p_isl_band_list_free)
+#define isl_band_list_get_band (*cloog_pointers__.p_isl_band_list_get_band)
+#define isl_band_list_get_ctx (*cloog_pointers__.p_isl_band_list_get_ctx)
+#define isl_band_list_n_band (*cloog_pointers__.p_isl_band_list_n_band)
+#define isl_band_member_is_zero_distance (*cloog_pointers__.p_isl_band_member_is_zero_distance)
+#define isl_band_n_member (*cloog_pointers__.p_isl_band_n_member)
+#define isl_basic_map_add_constraint (*cloog_pointers__.p_isl_basic_map_add_constraint)
+#define isl_basic_map_project_out (*cloog_pointers__.p_isl_basic_map_project_out)
+#define isl_basic_map_universe (*cloog_pointers__.p_isl_basic_map_universe)
+#define isl_constraint_set_coefficient (*cloog_pointers__.p_isl_constraint_set_coefficient)
+#define isl_constraint_set_coefficient_si (*cloog_pointers__.p_isl_constraint_set_coefficient_si)
+#define isl_constraint_set_constant (*cloog_pointers__.p_isl_constraint_set_constant)
+#define isl_constraint_set_constant_si (*cloog_pointers__.p_isl_constraint_set_constant_si)
+#define isl_ctx_alloc (*cloog_pointers__.p_isl_ctx_alloc)
+#define isl_ctx_free (*cloog_pointers__.p_isl_ctx_free)
+#define isl_equality_alloc (*cloog_pointers__.p_isl_equality_alloc)
+#define isl_id_alloc (*cloog_pointers__.p_isl_id_alloc)
+#define isl_id_copy (*cloog_pointers__.p_isl_id_copy)
+#define isl_id_free (*cloog_pointers__.p_isl_id_free)
+#define isl_inequality_alloc (*cloog_pointers__.p_isl_inequality_alloc)
+#define isl_local_space_copy (*cloog_pointers__.p_isl_local_space_copy)
+#define isl_local_space_free (*cloog_pointers__.p_isl_local_space_free)
+#define isl_local_space_from_space (*cloog_pointers__.p_isl_local_space_from_space)
+#define isl_local_space_range (*cloog_pointers__.p_isl_local_space_range)
+#define isl_map_add_constraint (*cloog_pointers__.p_isl_map_add_constraint)
+#define isl_map_add_dims (*cloog_pointers__.p_isl_map_add_dims)
+#define isl_map_align_params (*cloog_pointers__.p_isl_map_align_params)
+#define isl_map_apply_range (*cloog_pointers__.p_isl_map_apply_range)
+#define isl_map_copy (*cloog_pointers__.p_isl_map_copy)
+#define isl_map_dim (*cloog_pointers__.p_isl_map_dim)
+#define isl_map_dump (*cloog_pointers__.p_isl_map_dump)
+#define isl_map_equate (*cloog_pointers__.p_isl_map_equate)
+#define isl_map_fix_si (*cloog_pointers__.p_isl_map_fix_si)
+#define isl_map_flat_product (*cloog_pointers__.p_isl_map_flat_product)
+#define isl_map_flat_range_product (*cloog_pointers__.p_isl_map_flat_range_product)
+#define isl_map_free (*cloog_pointers__.p_isl_map_free)
+#define isl_map_from_basic_map (*cloog_pointers__.p_isl_map_from_basic_map)
+#define isl_map_from_pw_aff (*cloog_pointers__.p_isl_map_from_pw_aff)
+#define isl_map_from_union_map (*cloog_pointers__.p_isl_map_from_union_map)
+#define isl_map_get_ctx (*cloog_pointers__.p_isl_map_get_ctx)
+#define isl_map_get_space (*cloog_pointers__.p_isl_map_get_space)
+#define isl_map_get_tuple_id (*cloog_pointers__.p_isl_map_get_tuple_id)
+#define isl_map_insert_dims (*cloog_pointers__.p_isl_map_insert_dims)
+#define isl_map_intersect (*cloog_pointers__.p_isl_map_intersect)
+#define isl_map_intersect_domain (*cloog_pointers__.p_isl_map_intersect_domain)
+#define isl_map_intersect_range (*cloog_pointers__.p_isl_map_intersect_range)
+#define isl_map_is_empty (*cloog_pointers__.p_isl_map_is_empty)
+#define isl_map_lex_ge (*cloog_pointers__.p_isl_map_lex_ge)
+#define isl_map_lex_le (*cloog_pointers__.p_isl_map_lex_le)
+#define isl_map_n_out (*cloog_pointers__.p_isl_map_n_out)
+#define isl_map_range (*cloog_pointers__.p_isl_map_range)
+#define isl_map_set_tuple_id (*cloog_pointers__.p_isl_map_set_tuple_id)
+#define isl_map_universe (*cloog_pointers__.p_isl_map_universe)
+#define isl_options_set_on_error (*cloog_pointers__.p_isl_options_set_on_error)
+#define isl_options_set_schedule_fuse (*cloog_pointers__.p_isl_options_set_schedule_fuse)
+#define isl_options_set_schedule_max_constant_term (*cloog_pointers__.p_isl_options_set_schedule_max_constant_term)
+#define isl_options_set_schedule_maximize_band_depth (*cloog_pointers__.p_isl_options_set_schedule_maximize_band_depth)
+#define isl_printer_free (*cloog_pointers__.p_isl_printer_free)
+#define isl_printer_print_aff (*cloog_pointers__.p_isl_printer_print_aff)
+#define isl_printer_print_constraint (*cloog_pointers__.p_isl_printer_print_constraint)
+#define isl_printer_print_map (*cloog_pointers__.p_isl_printer_print_map)
+#define isl_printer_print_set (*cloog_pointers__.p_isl_printer_print_set)
+#define isl_printer_to_file (*cloog_pointers__.p_isl_printer_to_file)
+#define isl_pw_aff_add (*cloog_pointers__.p_isl_pw_aff_add)
+#define isl_pw_aff_alloc (*cloog_pointers__.p_isl_pw_aff_alloc)
+#define isl_pw_aff_copy (*cloog_pointers__.p_isl_pw_aff_copy)
+#define isl_pw_aff_eq_set (*cloog_pointers__.p_isl_pw_aff_eq_set)
+#define isl_pw_aff_free (*cloog_pointers__.p_isl_pw_aff_free)
+#define isl_pw_aff_from_aff (*cloog_pointers__.p_isl_pw_aff_from_aff)
+#define isl_pw_aff_ge_set (*cloog_pointers__.p_isl_pw_aff_ge_set)
+#define isl_pw_aff_gt_set (*cloog_pointers__.p_isl_pw_aff_gt_set)
+#define isl_pw_aff_is_cst (*cloog_pointers__.p_isl_pw_aff_is_cst)
+#define isl_pw_aff_le_set (*cloog_pointers__.p_isl_pw_aff_le_set)
+#define isl_pw_aff_lt_set (*cloog_pointers__.p_isl_pw_aff_lt_set)
+#define isl_pw_aff_mod (*cloog_pointers__.p_isl_pw_aff_mod)
+#define isl_pw_aff_mul (*cloog_pointers__.p_isl_pw_aff_mul)
+#define isl_pw_aff_ne_set (*cloog_pointers__.p_isl_pw_aff_ne_set)
+#define isl_pw_aff_nonneg_set (*cloog_pointers__.p_isl_pw_aff_nonneg_set)
+#define isl_pw_aff_set_tuple_id (*cloog_pointers__.p_isl_pw_aff_set_tuple_id)
+#define isl_pw_aff_sub (*cloog_pointers__.p_isl_pw_aff_sub)
+#define isl_pw_aff_zero_set (*cloog_pointers__.p_isl_pw_aff_zero_set)
+#define isl_schedule_free (*cloog_pointers__.p_isl_schedule_free)
+#define isl_schedule_get_band_forest (*cloog_pointers__.p_isl_schedule_get_band_forest)
+#define isl_set_add_constraint (*cloog_pointers__.p_isl_set_add_constraint)
+#define isl_set_add_dims (*cloog_pointers__.p_isl_set_add_dims)
+#define isl_set_apply (*cloog_pointers__.p_isl_set_apply)
+#define isl_set_coalesce (*cloog_pointers__.p_isl_set_coalesce)
+#define isl_set_copy (*cloog_pointers__.p_isl_set_copy)
+#define isl_set_dim (*cloog_pointers__.p_isl_set_dim)
+#define isl_set_fix_si (*cloog_pointers__.p_isl_set_fix_si)
+#define isl_set_free (*cloog_pointers__.p_isl_set_free)
+#define isl_set_from_cloog_domain (*cloog_pointers__.p_isl_set_from_cloog_domain)
+#define isl_set_get_space (*cloog_pointers__.p_isl_set_get_space)
+#define isl_set_get_tuple_id (*cloog_pointers__.p_isl_set_get_tuple_id)
+#define isl_set_intersect (*cloog_pointers__.p_isl_set_intersect)
+#define isl_set_is_empty (*cloog_pointers__.p_isl_set_is_empty)
+#define isl_set_max (*cloog_pointers__.p_isl_set_max)
+#define isl_set_min (*cloog_pointers__.p_isl_set_min)
+#define isl_set_nat_universe (*cloog_pointers__.p_isl_set_nat_universe)
+#define isl_set_project_out (*cloog_pointers__.p_isl_set_project_out)
+#define isl_set_set_tuple_id (*cloog_pointers__.p_isl_set_set_tuple_id)
+#define isl_set_universe (*cloog_pointers__.p_isl_set_universe)
+#define isl_space_add_dims (*cloog_pointers__.p_isl_space_add_dims)
+#define isl_space_alloc (*cloog_pointers__.p_isl_space_alloc)
+#define isl_space_copy (*cloog_pointers__.p_isl_space_copy)
+#define isl_space_dim (*cloog_pointers__.p_isl_space_dim)
+#define isl_space_domain (*cloog_pointers__.p_isl_space_domain)
+#define isl_space_find_dim_by_id (*cloog_pointers__.p_isl_space_find_dim_by_id)
+#define isl_space_free (*cloog_pointers__.p_isl_space_free)
+#define isl_space_from_domain (*cloog_pointers__.p_isl_space_from_domain)
+#define isl_space_get_tuple_id (*cloog_pointers__.p_isl_space_get_tuple_id)
+#define isl_space_params_alloc (*cloog_pointers__.p_isl_space_params_alloc)
+#define isl_space_range (*cloog_pointers__.p_isl_space_range)
+#define isl_space_set_alloc (*cloog_pointers__.p_isl_space_set_alloc)
+#define isl_space_set_dim_id (*cloog_pointers__.p_isl_space_set_dim_id)
+#define isl_space_set_tuple_id (*cloog_pointers__.p_isl_space_set_tuple_id)
+#define isl_union_map_add_map (*cloog_pointers__.p_isl_union_map_add_map)
+#define isl_union_map_align_params (*cloog_pointers__.p_isl_union_map_align_params)
+#define isl_union_map_apply_domain (*cloog_pointers__.p_isl_union_map_apply_domain)
+#define isl_union_map_apply_range (*cloog_pointers__.p_isl_union_map_apply_range)
+#define isl_union_map_compute_flow (*cloog_pointers__.p_isl_union_map_compute_flow)
+#define isl_union_map_copy (*cloog_pointers__.p_isl_union_map_copy)
+#define isl_union_map_empty (*cloog_pointers__.p_isl_union_map_empty)
+#define isl_union_map_flat_range_product (*cloog_pointers__.p_isl_union_map_flat_range_product)
+#define isl_union_map_foreach_map (*cloog_pointers__.p_isl_union_map_foreach_map)
+#define isl_union_map_free (*cloog_pointers__.p_isl_union_map_free)
+#define isl_union_map_from_map (*cloog_pointers__.p_isl_union_map_from_map)
+#define isl_union_map_get_ctx (*cloog_pointers__.p_isl_union_map_get_ctx)
+#define isl_union_map_get_space (*cloog_pointers__.p_isl_union_map_get_space)
+#define isl_union_map_gist_domain (*cloog_pointers__.p_isl_union_map_gist_domain)
+#define isl_union_map_gist_range (*cloog_pointers__.p_isl_union_map_gist_range)
+#define isl_union_map_intersect_domain (*cloog_pointers__.p_isl_union_map_intersect_domain)
+#define isl_union_map_is_empty (*cloog_pointers__.p_isl_union_map_is_empty)
+#define isl_union_map_subtract (*cloog_pointers__.p_isl_union_map_subtract)
+#define isl_union_map_union (*cloog_pointers__.p_isl_union_map_union)
+#define isl_union_set_add_set (*cloog_pointers__.p_isl_union_set_add_set)
+#define isl_union_set_compute_schedule (*cloog_pointers__.p_isl_union_set_compute_schedule)
+#define isl_union_set_copy (*cloog_pointers__.p_isl_union_set_copy)
+#define isl_union_set_empty (*cloog_pointers__.p_isl_union_set_empty)
+#define isl_union_set_from_set (*cloog_pointers__.p_isl_union_set_from_set)
+#define stmt_ass (*cloog_pointers__.p_stmt_ass)
+#define stmt_block (*cloog_pointers__.p_stmt_block)
+#define stmt_for (*cloog_pointers__.p_stmt_for)
+#define stmt_guard (*cloog_pointers__.p_stmt_guard)
+#define stmt_root (*cloog_pointers__.p_stmt_root)
+#define stmt_user (*cloog_pointers__.p_stmt_user)
+
typedef struct poly_dr *poly_dr_p;
typedef struct poly_bb *poly_bb_p;
--- gcc/graphite.c.jj 2012-12-13 11:31:00.000000000 +0100
+++ gcc/graphite.c 2012-12-14 13:40:44.155136961 +0100
@@ -66,6 +66,34 @@ along with GCC; see the file COPYING3.
CloogState *cloog_state;
+__typeof (cloog_pointers__) cloog_pointers__;
+
+static bool
+init_cloog_pointers (void)
+{
+ void *h;
+
+ if (cloog_pointers__.inited)
+ return cloog_pointers__.h != NULL;
+ h = dlopen ("libcloog-isl.so.3", RTLD_LAZY);
+ cloog_pointers__.h = h;
+ if (h == NULL)
+ return false;
+#define DYNSYM(x) \
+ do \
+ { \
+ union { __typeof (cloog_pointers__.p_##x) p; void *q; } u; \
+ u.q = dlsym (h, #x); \
+ if (u.q == NULL) \
+ return false; \
+ cloog_pointers__.p_##x = u.p; \
+ } \
+ while (0)
+ DYNSYMS
+#undef DYNSYM
+ return true;
+}
+
/* Print global statistics to FILE. */
static void
@@ -264,6 +292,15 @@ graphite_transform_loops (void)
if (parallelized_function_p (cfun->decl))
return;
+ if (number_of_loops () <= 1)
+ return;
+
+ if (!init_cloog_pointers ())
+ {
+ sorry ("Graphite loop optimizations cannot be used");
+ return;
+ }
+
ctx = isl_ctx_alloc ();
isl_options_set_on_error(ctx, ISL_ON_ERROR_ABORT);
if (!graphite_initialize (ctx))
--- gcc/graphite-clast-to-gimple.c.jj 2012-12-13 11:31:27.000000000 +0100
+++ gcc/graphite-clast-to-gimple.c 2012-12-14 13:27:47.196519858 +0100
@@ -910,7 +910,7 @@ compute_bounds_for_loop (struct clast_fo
from STMT_FOR. */
static tree
-type_for_clast_for (struct clast_for *stmt_for, ivs_params_p ip)
+type_for_clast_for (struct clast_for *stmt_fora, ivs_params_p ip)
{
mpz_t bound_one, bound_two;
tree lb_type, ub_type;
@@ -918,8 +918,8 @@ type_for_clast_for (struct clast_for *st
mpz_init (bound_one);
mpz_init (bound_two);
- lb_type = type_for_clast_expr (stmt_for->LB, ip, bound_one, bound_two);
- ub_type = type_for_clast_expr (stmt_for->UB, ip, bound_one, bound_two);
+ lb_type = type_for_clast_expr (stmt_fora->LB, ip, bound_one, bound_two);
+ ub_type = type_for_clast_expr (stmt_fora->UB, ip, bound_one, bound_two);
mpz_clear (bound_one);
mpz_clear (bound_two);

74
gcc48-cloog-dl2.patch Normal file
View File

@ -0,0 +1,74 @@
2011-04-04 Jakub Jelinek <jakub@redhat.com>
* toplev.c (toplev_main_argv): New variable.
(toplev_main): Initialize it.
* graphite.c (init_cloog_pointers): Load libcloog-isl.so.3 from gcc's private
directory.
--- gcc/toplev.c.jj 2008-12-09 23:59:10.000000000 +0100
+++ gcc/toplev.c 2009-01-27 14:33:52.000000000 +0100
@@ -107,6 +107,8 @@ static bool no_backend;
/* Length of line when printing switch values. */
#define MAX_LINE 75
+const char **toplev_main_argv;
+
/* Decoded options, and number of such options. */
struct cl_decoded_option *save_decoded_options;
unsigned int save_decoded_options_count;
@@ -1909,6 +1911,8 @@ toplev_main (int argc, char **argv)
expandargv (&argc, &argv);
+ toplev_main_argv = CONST_CAST2 (const char **, char **, argv);
+
/* Initialization of GCC's environment, and diagnostics. */
general_init (argv[0]);
--- gcc/graphite.c.jj 2010-12-01 10:24:32.000000000 -0500
+++ gcc/graphite.c 2010-12-01 11:46:07.832118193 -0500
@@ -72,11 +72,39 @@ __typeof (cloog_pointers__) cloog_pointe
static bool
init_cloog_pointers (void)
{
- void *h;
-
- if (cloog_pointers__.inited)
- return cloog_pointers__.h != NULL;
- h = dlopen ("libcloog-isl.so.3", RTLD_LAZY);
+ void *h = NULL;
+ extern const char **toplev_main_argv;
+ char *buf, *p;
+ size_t len;
+
+ if (cloog_pointers__.inited)
+ return cloog_pointers__.h != NULL;
+ len = progname - toplev_main_argv[0];
+ buf = XALLOCAVAR (char, len + sizeof "libcloog-isl.so.3");
+ memcpy (buf, toplev_main_argv[0], len);
+ strcpy (buf + len, "libcloog-isl.so.3");
+ len += sizeof "libcloog-isl.so.3";
+ p = strstr (buf, "/libexec/");
+ if (p != NULL)
+ {
+ while (1)
+ {
+ char *q = strstr (p + 8, "/libexec/");
+ if (q == NULL)
+ break;
+ p = q;
+ }
+ memmove (p + 4, p + 8, len - (p + 8 - buf));
+ h = dlopen (buf, RTLD_LAZY);
+ if (h == NULL)
+ {
+ len = progname - toplev_main_argv[0];
+ memcpy (buf, toplev_main_argv[0], len);
+ strcpy (buf + len, "libcloog-isl.so.3");
+ }
+ }
+ if (h == NULL)
+ h = dlopen (buf, RTLD_LAZY);
cloog_pointers__.h = h;
if (h == NULL)
return false;

View File

@ -1,14 +1,6 @@
--- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100 --- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100
+++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100 +++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100
@@ -44,14 +44,14 @@ if test $enable_linux_futex = yes; then @@ -67,7 +67,7 @@ if test $enable_linux_futex = yes; then
;;
# Note that bare i386 is not included here. We need cmpxchg.
- i[456]86-*-linux*)
+ i[456]86-*-linux*)
config_path="linux/x86 linux posix"
case " ${CC} ${CFLAGS} " in
*" -m64 "*)
;; ;;
*) *)
if test -z "$with_arch"; then if test -z "$with_arch"; then
@ -17,7 +9,7 @@
fi fi
esac esac
;; ;;
@@ -63,7 +63,7 @@ if test $enable_linux_futex = yes; then @@ -79,7 +79,7 @@ if test $enable_linux_futex = yes; then
config_path="linux/x86 linux posix" config_path="linux/x86 linux posix"
case " ${CC} ${CFLAGS} " in case " ${CC} ${CFLAGS} " in
*" -m32 "*) *" -m32 "*)

View File

@ -4,7 +4,7 @@
<a class="link" href="http://www.fsf.org/" target="_top">FSF <a class="link" href="http://www.fsf.org/" target="_top">FSF
</a> </a>
</p><p> </p><p>
+ Release 4.7.2 + Release 4.8.0
+ </p><p> + </p><p>
Permission is granted to copy, distribute and/or modify this Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation document under the terms of the GNU Free Documentation
@ -18,7 +18,7 @@
- The API documentation, rendered into HTML, can be viewed online: - The API documentation, rendered into HTML, can be viewed online:
+ The API documentation, rendered into HTML, can be viewed here: + The API documentation, rendered into HTML, can be viewed here:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
+ <a class="link" href="api/index.html" target="_top">for the 4.7 release, local + <a class="link" href="api/index.html" target="_top">for the 4.8 release, local
+ </a> + </a>
+ </p></li><li class="listitem"><p> + </p></li><li class="listitem"><p>
<a class="link" href="http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-3.4/index.html" target="_top">for the 3.4 release <a class="link" href="http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-3.4/index.html" target="_top">for the 3.4 release

View File

@ -8,15 +8,13 @@
--- gcc/config/alpha/elf.h.jj 2011-01-03 12:52:31.118056764 +0100 --- gcc/config/alpha/elf.h.jj 2011-01-03 12:52:31.118056764 +0100
+++ gcc/config/alpha/elf.h 2011-01-04 18:14:10.931874160 +0100 +++ gcc/config/alpha/elf.h 2011-01-04 18:14:10.931874160 +0100
@@ -438,7 +438,7 @@ extern int alpha_this_gpdisp_sequence_nu @@ -165,5 +165,5 @@ extern int alpha_this_gpdisp_sequence_nu
I imagine that other systems will catch up. In the meantime, it I imagine that other systems will catch up. In the meantime, it
doesn't harm to make sure that the data exists to be used later. */ doesn't harm to make sure that the data exists to be used later. */
#if defined(HAVE_LD_EH_FRAME_HDR) #if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " -#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " +#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} "
#endif #endif
/* A C statement (sans semicolon) to output to the stdio stream STREAM
--- gcc/config/ia64/linux.h.jj 2011-01-03 13:02:11.462994522 +0100 --- gcc/config/ia64/linux.h.jj 2011-01-03 13:02:11.462994522 +0100
+++ gcc/config/ia64/linux.h 2011-01-04 18:14:10.931874160 +0100 +++ gcc/config/ia64/linux.h 2011-01-04 18:14:10.931874160 +0100
@@ -77,7 +77,7 @@ do { \ @@ -77,7 +77,7 @@ do { \

View File

@ -8,7 +8,7 @@
--- gcc/config/rs6000/rs6000.c.jj 2005-11-26 14:38:01.000000000 +0100 --- gcc/config/rs6000/rs6000.c.jj 2005-11-26 14:38:01.000000000 +0100
+++ gcc/config/rs6000/rs6000.c 2005-11-28 20:32:18.000000000 +0100 +++ gcc/config/rs6000/rs6000.c 2005-11-28 20:32:18.000000000 +0100
@@ -13166,17 +13166,22 @@ rs6000_return_addr (int count, rtx frame @@ -18325,18 +18325,22 @@ rs6000_return_addr (int count, rtx frame
don't try to be too clever here. */ don't try to be too clever here. */
if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic)) if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
{ {
@ -20,7 +20,8 @@
- (Pmode, - (Pmode,
- memory_address - memory_address
- (Pmode, - (Pmode,
- plus_constant (copy_to_reg - plus_constant (Pmode,
- copy_to_reg
- (gen_rtx_MEM (Pmode, - (gen_rtx_MEM (Pmode,
- memory_address (Pmode, frame))), - memory_address (Pmode, frame))),
- RETURN_ADDRESS_OFFSET))); - RETURN_ADDRESS_OFFSET)));
@ -35,7 +36,7 @@
+ x = copy_to_reg (gen_rtx_MEM (Pmode, x)); + x = copy_to_reg (gen_rtx_MEM (Pmode, x));
+ } + }
+ +
+ x = plus_constant (x, RETURN_ADDRESS_OFFSET); + x = plus_constant (Pmode, x, RETURN_ADDRESS_OFFSET);
+ return gen_rtx_MEM (Pmode, memory_address (Pmode, x)); + return gen_rtx_MEM (Pmode, memory_address (Pmode, x));
} }

View File

@ -4,12 +4,13 @@
* langhooks.h (struct lang_hooks): Add source_language langhook. * langhooks.h (struct lang_hooks): Add source_language langhook.
* langhooks-def.h (LANG_HOOKS_SOURCE_LANGUAGE): Define to NULL. * langhooks-def.h (LANG_HOOKS_SOURCE_LANGUAGE): Define to NULL.
(LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_SOURCE_LANGUAGE. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_SOURCE_LANGUAGE.
* c-lang.c (c_source_language): New function.
(LANG_HOOKS_SOURCE_LANGUAGE): Define.
* dwarf2out.c (add_prototyped_attribute): Add DW_AT_prototype * dwarf2out.c (add_prototyped_attribute): Add DW_AT_prototype
also for DW_LANG_{C,C99,ObjC}. also for DW_LANG_{C,C99,ObjC}.
(gen_compile_unit_die): Use lang_hooks.source_language () to (gen_compile_unit_die): Use lang_hooks.source_language () to
determine if DW_LANG_C99 or DW_LANG_C89 should be returned. determine if DW_LANG_C99 or DW_LANG_C89 should be returned.
c/
* c-lang.c (c_source_language): New function.
(LANG_HOOKS_SOURCE_LANGUAGE): Define.
--- gcc/langhooks.h.jj 2011-01-03 12:53:05.125745450 +0100 --- gcc/langhooks.h.jj 2011-01-03 12:53:05.125745450 +0100
+++ gcc/langhooks.h 2011-01-04 17:59:43.166744926 +0100 +++ gcc/langhooks.h 2011-01-04 17:59:43.166744926 +0100
@ -27,16 +28,16 @@
--- gcc/langhooks-def.h.jj 2011-01-03 12:53:05.000000000 +0100 --- gcc/langhooks-def.h.jj 2011-01-03 12:53:05.000000000 +0100
+++ gcc/langhooks-def.h 2011-01-04 18:00:44.858851030 +0100 +++ gcc/langhooks-def.h 2011-01-04 18:00:44.858851030 +0100
@@ -118,6 +118,7 @@ extern void lhd_omp_firstprivatize_type_ @@ -118,6 +118,7 @@ extern void lhd_omp_firstprivatize_type_
#define LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS NULL #define LANG_HOOKS_BLOCK_MAY_FALLTHRU hook_bool_const_tree_true
#define LANG_HOOKS_EH_USE_CXA_END_CLEANUP false #define LANG_HOOKS_EH_USE_CXA_END_CLEANUP false
#define LANG_HOOKS_DEEP_UNSHARING false #define LANG_HOOKS_DEEP_UNSHARING false
+#define LANG_HOOKS_SOURCE_LANGUAGE NULL +#define LANG_HOOKS_SOURCE_LANGUAGE NULL
/* Attribute hooks. */ /* Attribute hooks. */
#define LANG_HOOKS_ATTRIBUTE_TABLE NULL #define LANG_HOOKS_ATTRIBUTE_TABLE NULL
@@ -307,7 +308,8 @@ extern void lhd_end_section (void); @@ -303,7 +304,8 @@ extern void lhd_end_section (void);
LANG_HOOKS_EH_RUNTIME_TYPE, \
LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS, \ LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS, \
LANG_HOOKS_BLOCK_MAY_FALLTHRU, \
LANG_HOOKS_EH_USE_CXA_END_CLEANUP, \ LANG_HOOKS_EH_USE_CXA_END_CLEANUP, \
- LANG_HOOKS_DEEP_UNSHARING \ - LANG_HOOKS_DEEP_UNSHARING \
+ LANG_HOOKS_DEEP_UNSHARING, \ + LANG_HOOKS_DEEP_UNSHARING, \
@ -44,8 +45,8 @@
} }
#endif /* GCC_LANG_HOOKS_DEF_H */ #endif /* GCC_LANG_HOOKS_DEF_H */
--- gcc/c-lang.c.jj 2011-01-03 12:53:05.376056936 +0100 --- gcc/c/c-lang.c.jj 2011-01-03 12:53:05.376056936 +0100
+++ gcc/c-lang.c 2011-01-04 17:59:43.167743798 +0100 +++ gcc/c/c-lang.c 2011-01-04 17:59:43.167743798 +0100
@@ -36,6 +36,12 @@ along with GCC; see the file COPYING3. @@ -36,6 +36,12 @@ along with GCC; see the file COPYING3.
enum c_language_kind c_language = clk_c; enum c_language_kind c_language = clk_c;
@ -70,7 +71,7 @@
struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
--- gcc/dwarf2out.c.jj 2011-01-03 12:53:05.102056475 +0100 --- gcc/dwarf2out.c.jj 2011-01-03 12:53:05.102056475 +0100
+++ gcc/dwarf2out.c 2011-01-04 18:03:14.534151763 +0100 +++ gcc/dwarf2out.c 2011-01-04 18:03:14.534151763 +0100
@@ -15793,9 +15793,18 @@ add_bit_size_attribute (dw_die_ref die, @@ -16109,9 +16109,18 @@ add_bit_size_attribute (dw_die_ref die,
static inline void static inline void
add_prototyped_attribute (dw_die_ref die, tree func_type) add_prototyped_attribute (dw_die_ref die, tree func_type)
{ {
@ -92,7 +93,7 @@
} }
/* Add an 'abstract_origin' attribute below a given DIE. The DIE is found /* Add an 'abstract_origin' attribute below a given DIE. The DIE is found
@@ -18438,6 +18447,10 @@ gen_compile_unit_die (const char *filena @@ -18915,6 +18924,10 @@ gen_compile_unit_die (const char *filena
if (strcmp (language_string, "GNU Go") == 0) if (strcmp (language_string, "GNU Go") == 0)
language = DW_LANG_Go; language = DW_LANG_Go;
} }
@ -101,5 +102,5 @@
+ && lang_hooks.source_language () >= 1999) + && lang_hooks.source_language () >= 1999)
+ language = DW_LANG_C99; + language = DW_LANG_C99;
} }
/* Use a degraded Fortran setting in strict DWARF2 so is_fortran works. */
add_AT_unsigned (die, DW_AT_language, language); else if (strcmp (language_string, "GNU Fortran") == 0)

74
gcc48-pr55341.patch Normal file
View File

@ -0,0 +1,74 @@
2012-12-19 Jakub Jelinek <jakub@redhat.com>
PR fortran/55341
* asan.c (asan_clear_shadow): New function.
(asan_emit_stack_protection): Use it.
--- gcc/asan.c.jj 2012-12-13 00:05:04.000000000 +0100
+++ gcc/asan.c 2012-12-19 12:25:57.676365851 +0100
@@ -270,6 +270,45 @@ asan_shadow_cst (unsigned char shadow_by
return GEN_INT (trunc_int_for_mode (val, SImode));
}
+/* Clear shadow memory at SHADOW_MEM, LEN bytes. Can't call a library call here
+ though. */
+
+static void
+asan_clear_shadow (rtx shadow_mem, HOST_WIDE_INT len)
+{
+ rtx insn, insns, top_label, end, addr, tmp, jump;
+
+ start_sequence ();
+ clear_storage (shadow_mem, GEN_INT (len), BLOCK_OP_NORMAL);
+ insns = get_insns ();
+ end_sequence ();
+ for (insn = insns; insn; insn = NEXT_INSN (insn))
+ if (CALL_P (insn))
+ break;
+ if (insn == NULL_RTX)
+ {
+ emit_insn (insns);
+ return;
+ }
+
+ gcc_assert ((len & 3) == 0);
+ top_label = gen_label_rtx ();
+ addr = force_reg (Pmode, XEXP (shadow_mem, 0));
+ shadow_mem = adjust_automodify_address (shadow_mem, SImode, addr, 0);
+ end = force_reg (Pmode, plus_constant (Pmode, addr, len));
+ emit_label (top_label);
+
+ emit_move_insn (shadow_mem, const0_rtx);
+ tmp = expand_simple_binop (Pmode, PLUS, addr, GEN_INT (4), addr,
+ true, OPTAB_LIB_WIDEN);
+ if (tmp != addr)
+ emit_move_insn (addr, tmp);
+ emit_cmp_and_jump_insns (addr, end, LT, NULL_RTX, Pmode, true, top_label);
+ jump = get_last_insn ();
+ gcc_assert (JUMP_P (jump));
+ add_reg_note (jump, REG_BR_PROB, GEN_INT (REG_BR_PROB_BASE * 80 / 100));
+}
+
/* Insert code to protect stack vars. The prologue sequence should be emitted
directly, epilogue sequence returned. BASE is the register holding the
stack base, against which OFFSETS array offsets are relative to, OFFSETS
@@ -404,8 +443,7 @@ asan_emit_stack_protection (rtx base, HO
(last_offset - prev_offset)
>> ASAN_SHADOW_SHIFT);
prev_offset = last_offset;
- clear_storage (shadow_mem, GEN_INT (last_size >> ASAN_SHADOW_SHIFT),
- BLOCK_OP_NORMAL);
+ asan_clear_shadow (shadow_mem, last_size >> ASAN_SHADOW_SHIFT);
last_offset = offset;
last_size = 0;
}
@@ -418,8 +456,7 @@ asan_emit_stack_protection (rtx base, HO
shadow_mem = adjust_address (shadow_mem, VOIDmode,
(last_offset - prev_offset)
>> ASAN_SHADOW_SHIFT);
- clear_storage (shadow_mem, GEN_INT (last_size >> ASAN_SHADOW_SHIFT),
- BLOCK_OP_NORMAL);
+ asan_clear_shadow (shadow_mem, last_size >> ASAN_SHADOW_SHIFT);
}
do_pending_stack_adjust ();

258
gcc48-pr55608.patch Normal file
View File

@ -0,0 +1,258 @@
2012-12-06 Jakub Jelinek <jakub@redhat.com>
PR debug/55608
* dwarf2out.c (tree_add_const_value_attribute): Call ggc_free (array)
on failure.
(resolve_one_addr): Fail if referenced STRING_CST hasn't been written.
(string_cst_pool_decl): New function.
(resolve_addr_in_expr): Optimize DWARF location expression
DW_OP_addr DW_OP_stack_value where DW_OP_addr refers to some variable
which doesn't live in memory, but has DW_AT_location or
DW_AT_const_value, or refers to a string literal, into
DW_OP_GNU_implicit_pointer.
(resolve_addr): If removing DW_AT_location of a variable because
it was DW_OP_addr of address of the variable, but the variable doesn't
live in memory, try to emit const value attribute for the initializer.
--- gcc/dwarf2out.c.jj 2012-11-21 18:44:25.847837373 +0100
+++ gcc/dwarf2out.c 2012-12-06 17:22:14.348761149 +0100
@@ -15492,6 +15492,7 @@ tree_add_const_value_attribute (dw_die_r
add_AT_vec (die, DW_AT_const_value, size, 1, array);
return true;
}
+ ggc_free (array);
}
}
return false;
@@ -22370,6 +22371,10 @@ resolve_one_addr (rtx *addr, void *data
if (!rtl || !MEM_P (rtl))
return 1;
rtl = XEXP (rtl, 0);
+ if (GET_CODE (rtl) == SYMBOL_REF
+ && SYMBOL_REF_DECL (rtl)
+ && !TREE_ASM_WRITTEN (SYMBOL_REF_DECL (rtl)))
+ return 1;
vec_safe_push (used_rtx_array, rtl);
*addr = rtl;
return 0;
@@ -22394,6 +22399,46 @@ resolve_one_addr (rtx *addr, void *data
return 0;
}
+/* For STRING_CST, return SYMBOL_REF of its constant pool entry,
+ if possible, and create DW_TAG_dwarf_procedure that can be referenced
+ from DW_OP_GNU_implicit_pointer if the string hasn't been seen yet. */
+
+static rtx
+string_cst_pool_decl (tree t)
+{
+ rtx rtl = output_constant_def (t, 1);
+ unsigned char *array;
+ dw_loc_descr_ref l;
+ tree decl;
+ size_t len;
+ dw_die_ref ref;
+
+ if (!rtl || !MEM_P (rtl))
+ return NULL_RTX;
+ rtl = XEXP (rtl, 0);
+ if (GET_CODE (rtl) != SYMBOL_REF
+ || SYMBOL_REF_DECL (rtl) == NULL_TREE)
+ return NULL_RTX;
+
+ decl = SYMBOL_REF_DECL (rtl);
+ if (lookup_decl_die (decl))
+ return rtl;
+
+ len = TREE_STRING_LENGTH (t);
+ vec_safe_push (used_rtx_array, rtl);
+ ref = new_die (DW_TAG_dwarf_procedure, comp_unit_die (), decl);
+ array = (unsigned char *) ggc_alloc_atomic (len);
+ memcpy (array, TREE_STRING_POINTER (t), len);
+ l = new_loc_descr (DW_OP_implicit_value, len, 0);
+ l->dw_loc_oprnd2.val_class = dw_val_class_vec;
+ l->dw_loc_oprnd2.v.val_vec.length = len;
+ l->dw_loc_oprnd2.v.val_vec.elt_size = 1;
+ l->dw_loc_oprnd2.v.val_vec.array = array;
+ add_AT_loc (ref, DW_AT_location, l);
+ equate_decl_number_to_die (decl, ref);
+ return rtl;
+}
+
/* Helper function for resolve_addr, handle one location
expression, return false if at least one CONST_STRING or SYMBOL_REF in
the location list couldn't be resolved. */
@@ -22402,23 +22447,81 @@ static bool
resolve_addr_in_expr (dw_loc_descr_ref loc)
{
dw_loc_descr_ref keep = NULL;
- for (; loc; loc = loc->dw_loc_next)
+ bool start_of_dw_expr = true;
+ for (; loc; start_of_dw_expr = (loc->dw_loc_opc == DW_OP_piece
+ || loc->dw_loc_opc == DW_OP_bit_piece),
+ loc = loc->dw_loc_next)
switch (loc->dw_loc_opc)
{
case DW_OP_addr:
if (resolve_one_addr (&loc->dw_loc_oprnd1.v.val_addr, NULL))
- return false;
+ {
+ if (start_of_dw_expr
+ && loc->dw_loc_next
+ && loc->dw_loc_next->dw_loc_opc == DW_OP_stack_value
+ && !dwarf_strict)
+ {
+ rtx rtl = loc->dw_loc_oprnd1.v.val_addr;
+ HOST_WIDE_INT offset = 0;
+ dw_die_ref ref = NULL;
+ tree decl;
+
+ if (GET_CODE (rtl) == CONST
+ && GET_CODE (XEXP (rtl, 0)) == PLUS
+ && CONST_INT_P (XEXP (XEXP (rtl, 0), 1)))
+ {
+ offset = INTVAL (XEXP (XEXP (rtl, 0), 1));
+ rtl = XEXP (XEXP (rtl, 0), 0);
+ }
+ if (GET_CODE (rtl) == CONST_STRING)
+ {
+ size_t len = strlen (XSTR (rtl, 0)) + 1;
+ tree t = build_string (len, XSTR (rtl, 0));
+ tree tlen = size_int (len - 1);
+
+ TREE_TYPE (t)
+ = build_array_type (char_type_node,
+ build_index_type (tlen));
+ rtl = string_cst_pool_decl (t);
+ if (!rtl)
+ return false;
+ }
+ if (GET_CODE (rtl) == SYMBOL_REF
+ && SYMBOL_REF_DECL (rtl))
+ {
+ decl = SYMBOL_REF_DECL (rtl);
+ if (TREE_CODE (decl) == VAR_DECL
+ && !DECL_EXTERNAL (decl))
+ {
+ ref = lookup_decl_die (decl);
+ if (ref
+ && (get_AT (ref, DW_AT_location)
+ || get_AT (ref, DW_AT_const_value)))
+ {
+ loc->dw_loc_opc = DW_OP_GNU_implicit_pointer;
+ loc->dw_loc_oprnd1.val_class
+ = dw_val_class_die_ref;
+ loc->dw_loc_oprnd1.val_entry = NULL;
+ loc->dw_loc_oprnd1.v.val_die_ref.die = ref;
+ loc->dw_loc_oprnd1.v.val_die_ref.external = 0;
+ loc->dw_loc_next = loc->dw_loc_next->dw_loc_next;
+ loc->dw_loc_oprnd2.v.val_int = offset;
+ break;
+ }
+ }
+ }
+ }
+ return false;
+ }
break;
case DW_OP_GNU_addr_index:
case DW_OP_GNU_const_index:
- {
- if ((loc->dw_loc_opc == DW_OP_GNU_addr_index
- || (loc->dw_loc_opc == DW_OP_GNU_const_index && loc->dtprel))
- && resolve_one_addr (&loc->dw_loc_oprnd1.val_entry->addr.rtl,
- NULL))
- return false;
- }
- break;
+ if ((loc->dw_loc_opc == DW_OP_GNU_addr_index
+ || (loc->dw_loc_opc == DW_OP_GNU_const_index && loc->dtprel))
+ && resolve_one_addr (&loc->dw_loc_oprnd1.val_entry->addr.rtl,
+ NULL))
+ return false;
+ break;
case DW_OP_const4u:
case DW_OP_const8u:
if (loc->dtprel
@@ -22601,8 +22704,79 @@ resolve_addr (dw_die_ref die)
|| l->dw_loc_next != NULL)
&& !resolve_addr_in_expr (l))
{
- if (dwarf_split_debug_info)
- remove_loc_list_addr_table_entries (l);
+ if (dwarf_split_debug_info)
+ remove_loc_list_addr_table_entries (l);
+ if (l != NULL
+ && l->dw_loc_next == NULL
+ && l->dw_loc_opc == DW_OP_addr
+ && GET_CODE (l->dw_loc_oprnd1.v.val_addr) == SYMBOL_REF
+ && SYMBOL_REF_DECL (l->dw_loc_oprnd1.v.val_addr)
+ && a->dw_attr == DW_AT_location)
+ {
+ tree decl = SYMBOL_REF_DECL (l->dw_loc_oprnd1.v.val_addr);
+ remove_AT (die, a->dw_attr);
+ ix--;
+ if (TREE_CODE (decl) == VAR_DECL
+ && lookup_decl_die (decl) == die
+ && !DECL_EXTERNAL (decl)
+ && TREE_STATIC (decl)
+ && DECL_INITIAL (decl)
+ && !DECL_P (DECL_INITIAL (decl))
+ && !get_AT (die, DW_AT_const_value))
+ {
+ tree init = DECL_INITIAL (decl);
+ HOST_WIDE_INT offset = 0;
+ /* For variables that have been optimized away and thus
+ don't have a memory location, see if we can emit
+ DW_AT_const_value instead. */
+ if (tree_add_const_value_attribute (die, init))
+ break;
+ if (dwarf_strict)
+ break;
+ STRIP_NOPS (init);
+ if (TREE_CODE (init) == POINTER_PLUS_EXPR
+ && host_integerp (TREE_OPERAND (init, 1), 0))
+ {
+ offset = tree_low_cst (TREE_OPERAND (init, 1), 0);
+ init = TREE_OPERAND (init, 0);
+ STRIP_NOPS (init);
+ }
+ if (TREE_CODE (init) != ADDR_EXPR)
+ break;
+ if ((TREE_CODE (TREE_OPERAND (init, 0)) == STRING_CST
+ && !TREE_ASM_WRITTEN (TREE_OPERAND (init, 0)))
+ || (TREE_CODE (TREE_OPERAND (init, 0)) == VAR_DECL
+ && !DECL_EXTERNAL (TREE_OPERAND (init, 0))
+ && TREE_OPERAND (init, 0) != decl))
+ {
+ dw_die_ref ref;
+ tree decl;
+
+ if (TREE_CODE (TREE_OPERAND (init, 0)) == STRING_CST)
+ {
+ rtx rtl
+ = string_cst_pool_decl (TREE_OPERAND (init, 0));
+ if (!rtl)
+ break;
+ decl = SYMBOL_REF_DECL (rtl);
+ }
+ else
+ decl = TREE_OPERAND (init, 0);
+ ref = lookup_decl_die (decl);
+ if (ref == NULL
+ || (!get_AT (ref, DW_AT_location)
+ && !get_AT (ref, DW_AT_const_value)))
+ break;
+ l = new_loc_descr (DW_OP_GNU_implicit_pointer, 0,
+ offset);
+ l->dw_loc_oprnd1.val_class = dw_val_class_die_ref;
+ l->dw_loc_oprnd1.v.val_die_ref.die = ref;
+ l->dw_loc_oprnd1.v.val_die_ref.external = 0;
+ add_AT_loc (die, DW_AT_location, l);
+ }
+ }
+ break;
+ }
remove_AT (die, a->dw_attr);
ix--;
}

15
gcc48-pr55844.patch Normal file
View File

@ -0,0 +1,15 @@
2012-12-19 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/55844
* c-c++-common/asan/null-deref-1.c: Add -fno-shrink-wrap to
dg-options.
--- gcc/testsuite/c-c++-common/asan/null-deref-1.c.jj 2012-12-13 00:02:50.000000000 +0100
+++ gcc/testsuite/c-c++-common/asan/null-deref-1.c 2012-12-19 12:30:05.354962160 +0100
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-fno-omit-frame-pointer" } */
+/* { dg-options "-fno-omit-frame-pointer -fno-shrink-wrap" } */
/* { dg-additional-options "-mno-omit-leaf-frame-pointer" { target { i?86-*-* x86_64-*-* } } } */
/* { dg-shouldfail "asan" } */

View File

@ -1,2 +1,4 @@
2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz
2136a229e204d8a4425e21034e56c706 gcc-4.7.2-20121109.tar.bz2 0aa3302c81f65ca62c114e5264f8a802 cloog-0.17.0.tar.gz
c1ece653891bb2a5f55ca25e3f4e8f35 isl-0.10.tar.bz2
b9be0ed1988a3624a5f405666f72d220 gcc-4.8.0-20130106.tar.bz2