aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2007-12-05 17:01:22 +0100
committerUros Bizjak <uros@gcc.gnu.org>2007-12-05 17:01:22 +0100
commite37ab97325aa1b4d5d3799d3bdf05fa157e8fa68 (patch)
tree8e7050f0086c5ec71f9a1c917509990e4bad3042
parente8f34bc9852f7c71a3a7b723404752b7b4503509 (diff)
downloadgcc-e37ab97325aa1b4d5d3799d3bdf05fa157e8fa68.zip
gcc-e37ab97325aa1b4d5d3799d3bdf05fa157e8fa68.tar.gz
gcc-e37ab97325aa1b4d5d3799d3bdf05fa157e8fa68.tar.bz2
re PR rtl-optimization/34312 (spill failure with -O2 -fPIC -march=pentium-m on i386)
PR target/34312 * config/i386/i386.c (ix86_function_regparm): Also check for fixed registers when checking that regparm registers are available. Lower regparm value due to fixed registers usage in addition to global regs usage. testsuite/ChangeLog: PR target/34312 * gcc.target/i386/pr34312.c: New test. From-SVN: r130625
-rw-r--r--gcc/ChangeLog110
-rw-r--r--gcc/config/i386/i386.c13
-rw-r--r--gcc/testsuite/ChangeLog28
-rw-r--r--gcc/testsuite/gcc.target/i386/pr34312.c34
4 files changed, 107 insertions, 78 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2d86b25..104b8ea 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,12 @@
-2007-11-27 Bernhard Fischer <aldot@gcc.gnu.org>
+2007-12-05 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/34312
+ * config/i386/i386.c (ix86_function_regparm): Also check for fixed
+ registers when checking that regparm registers are available.
+ Lower regparm value due to fixed registers usage in addition to
+ global regs usage.
+
+2007-12-05 Bernhard Fischer <aldot@gcc.gnu.org>
* sparseset.c: Include config.h and system.h before sparseset.h.
* sparseset.h: Remove inclusion of system.h.
@@ -130,8 +138,7 @@
2007-11-30 Jan Hubicka <jh@suse.cz>
- * ggc-common.c (dump_ggc_loc_statistics): Reset ggc_force_collect
- flag.
+ * ggc-common.c (dump_ggc_loc_statistics): Reset ggc_force_collect flag.
2007-11-30 Seongbae Park <seongbae.park@gmail.com>
@@ -318,7 +325,7 @@
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
- PR 34081/C++
+ PR c++/34081
* c-decl.c (store_parm_decls): Pass 'false' for the new
allocate_struct_function parameter.
* cgraphunit.c (cgraph_build_static_cdtor): Likewise.
@@ -350,9 +357,9 @@
* config/mn10300/mn10300.md: (call_internal): Remove mode on
operand 0 in order to match UNPSEC'ed calls generated in PIC mode.
- (call_value_internal): Remove mode on operands 0 and 1 in order to
+ (call_value_internal): Remove mode on operands 0 and 1 in order to
match UNPSEC'ed calls generated in PIC mode.
- (GOTaddr2picreg): Use copy_rtx to prevent sharing an rtx between
+ (GOTaddr2picreg): Use copy_rtx to prevent sharing an rtx between
two insns.
2007-11-26 Richard Guenther <rguenther@suse.de>
@@ -442,8 +449,7 @@
2007-11-23 Hans-Peter Nilsson <hp@axis.com>
* reload.c (find_reloads_address_1) <autoincdec cases>:
- Call REG_OK_FOR_CONTEXT with the autoincdec code, not
- outer_code.
+ Call REG_OK_FOR_CONTEXT with the autoincdec code, not outer_code.
2007-11-23 Richard Guenther <rguenther@suse.de>
Michael Matz <matz@suse.de>
@@ -771,8 +777,7 @@
2007-11-07 Tom Tromey <tromey@redhat.com>
- * tree-ssa-structalias.c (ipa_pta_execute): Rename 'cfun' to
- 'func'.
+ * tree-ssa-structalias.c (ipa_pta_execute): Rename 'cfun' to 'func'.
* tree-parloops.c (create_loop_fn): Use set_cfun.
* gengtype.c (open_base_files): Emit #undef cfun.
* ipa-struct-reorg.c (do_reorg_1): Use set_cfun.
@@ -820,8 +825,7 @@
* tree-ssa-alias.c (create_overlap_variables_for): Make sure
to only create SFTs if we also create variable infos for PTA.
- * tree-ssa-structalias.c (set_uids_in_ptset): Add all overlapping
- SFTs.
+ * tree-ssa-structalias.c (set_uids_in_ptset): Add all overlapping SFTs.
2007-11-15 Richard Guenther <rguenther@suse.de>
@@ -880,8 +884,7 @@
2007-11-13 Michael Meissner <michael.meissner@amd.com>
- * config/i386/i386.c (ix86_sse5_valid_op_p): Put type on separate
- line.
+ * config/i386/i386.c (ix86_sse5_valid_op_p): Put type on separate line.
2007-11-13 Sterling Augustine <sterling@tensilica.com>
Bob Wilson <bob.wilson@acm.org>
@@ -908,39 +911,34 @@
2007-11-13 Diego Novillo <dnovillo@google.com>
PR tree-optimization/33870
- * tree.h (strcut tree_memory_tag): add field unpartitionable.
- remove field in_nested_struct.
- (struct tree_struct_field_tag): add field nesting_level.
- (sft_in_nested_struct): remove.
- (sft_nesting_level): define.
- (sft_unpartitionable_p): define.
- * tree-ssa-alias.c (mem_sym_score): if mp->var is not
+ * tree.h (strcut tree_memory_tag): Add field unpartitionable.
+ Remove field in_nested_struct.
+ (struct tree_struct_field_tag): Add field nesting_level.
+ (sft_in_nested_struct): Remove.
+ (sft_nesting_level): Define.
+ (sft_unpartitionable_p): Define.
+ * tree-ssa-alias.c (mem_sym_score): If mp->var is not
partitionable, return long_max.
- (compute_memory_partitions): do not partition sfts marked
+ (compute_memory_partitions): Do not partition sfts marked
unpartitionable.
- (create_sft): add argument nesting_level. set
- sft_nesting_level with it. update all users.
- (create_overlap_variables_for): show nesting level.
- * tree-dfa.c (dump_subvars_for): likewise.
- (dump_variable): likewise.
- show whether the sft is partitionable or not.
- * tree-flow.h (struct fieldoff): remove field
- in_nested_struct.
- add field nesting_level.
- * tree-ssa-structalias.c (struct variable_info): remove
+ (create_sft): Add argument nesting_level. Set
+ sft_nesting_level with it. Update all users.
+ (create_overlap_variables_for): Show nesting level.
+ * tree-dfa.c (dump_subvars_for): Likewise.
+ (dump_variable): Likewise. Show whether the sft is
+ partitionable or not.
+ * tree-flow.h (struct fieldoff): Remove field in_nested_struct.
+ Add field nesting_level.
+ * tree-ssa-structalias.c (struct variable_info): Remove
field in_nested_struct.
- (push_fields_onto_fieldstack): add argument
- nesting_level. update all users.
- update documentation.
- update pair->nesting_level with nesting_level.
- make recursive calls with nesting_level + 1.
- (set_uids_in_ptset): if an sft is added to the points-to
- set, mark it as unpartitionable.
- * tree-ssa-operands.c (ref_nesting_level): new.
- (add_vars_for_offset): call it.
- add argument full_ref. update
- callers.
- if var is inside a nested structure and the nesting level
+ (push_fields_onto_fieldstack): Add argument nesting_level.
+ Update all users. Update documentation. Update pair->nesting_level
+ with nesting_level. Make recursive calls with nesting_level + 1.
+ (set_uids_in_ptset): If an sft is added to the points-to set,
+ mark it as unpartitionable.
+ * tree-ssa-operands.c (ref_nesting_level): New.
+ (add_vars_for_offset): Call it. Add argument full_ref. Update
+ callers. If var is inside a nested structure and the nesting level
of full_ref is lower than the nesting level of var,
adjust offset by the offset of var.
@@ -1191,8 +1189,7 @@
PR 33870
* tree.h (struct tree_struct_field_tag): Add field in_nested_struct.
(SFT_IN_NESTED_STRUCT): Define.
- * tree-dfa.c (dump_subvars_for): Show offset of each
- sub-var.
+ * tree-dfa.c (dump_subvars_for): Show offset of each sub-var.
* tree-flow.h (struct fieldoff): Add field in_nested_struct.
* tree-ssa-structalias.c (struct variable_info): Likewise.
(push_fields_onto_fieldstack): If OFFSET is positive,
@@ -1202,8 +1199,7 @@
(set_uids_in_ptset): Set SFT_IN_NESTED_STRUCT from the
variable info object.
* tree-ssa-operands.c (add_vars_for_offset): If VAR
- belongs to a nested structure, adjust OFFSET by
- SFT_OFFSET(VAR).
+ belongs to a nested structure, adjust OFFSET by SFT_OFFSET(VAR).
2007-11-07 Eric Botcazou <ebotcazou@libertysurf.fr>
@@ -1257,8 +1253,7 @@
2007-11-06 Diego Novillo <dnovillo@google.com>
- * tree-flow.h (struct fieldoff): Reformat comment.
- Document fields.
+ * tree-flow.h (struct fieldoff): Reformat comment. Document fields.
* tree-ssa-operands.c: Tidy top-level comments.
(add_vop): Likewise.
(add_vars_for_offset): Tidy parameter formatting..
@@ -1277,8 +1272,7 @@
PR target/30961
* reload1.c (find_reloads): Also check in_reg when handling a
- simple move with an input reload and a destination of a hard
- register.
+ simple move with an input reload and a destination of a hard register.
2007-11-06 Maxim Kuvyrkov <maxim@codesourcery.com>
@@ -1355,8 +1349,7 @@
2007-11-05 Mark Mitchell <mark@codesourcery.com>
PR target/33579
- * tree.h (DECL_INIT_PRIORITY): Do not require
- DECL_HAS_INIT_PRIORITY_P.
+ * tree.h (DECL_INIT_PRIORITY): Do not require DECL_HAS_INIT_PRIORITY_P.
(DECL_FINI_PRIORITY): Likewise.
* tree.c (decl_init_priority_lookup): Remove assert.
(decl_fini_priority_insert): Likewise.
@@ -1369,8 +1362,7 @@
(compare_dtor): Likewise.
(cgraph_build_cdtor_fns): Sort the functions by priority before
calling build_cdtor.
- (cgraph_build_static_cdtor): Put the priority in the function's
- name.
+ (cgraph_build_static_cdtor): Put the priority in the function's name.
2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
@@ -1505,8 +1497,7 @@
2007-11-02 Diego Novillo <dnovillo@google.com>
* langhooks.h (struct lang_hooks_for_callgraph): Remove third
- argument from function pointer ANALYZE_EXPR. Update all
- users.
+ argument from function pointer ANALYZE_EXPR. Update all users.
* cgraph.c (debug_cgraph_node): New.
(debug_cgraph): New.
@@ -1626,8 +1617,7 @@
2007-10-31 Richard Sandiford <rsandifo@nildram.co.uk>
PR target/33948
- * config/mips/mips.c (mips_fpr_return_fields): Fix SCALAR_TYPE_P
- check.
+ * config/mips/mips.c (mips_fpr_return_fields): Fix SCALAR_TYPE_P check.
2007-10-31 Andreas Krebbel <krebbel1@de.ibm.com>
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index afed858..cac5dbe 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -3198,9 +3198,9 @@ ix86_function_regparm (const_tree type, const_tree decl)
struct function *f;
/* Make sure no regparm register is taken by a
- global register variable. */
+ fixed register or global register variable. */
for (local_regparm = 0; local_regparm < 3; local_regparm++)
- if (global_regs[local_regparm])
+ if (global_regs[local_regparm] || fixed_regs[local_regparm])
break;
/* We can't use regparm(3) for nested functions as these use
@@ -3222,11 +3222,12 @@ ix86_function_regparm (const_tree type, const_tree decl)
TYPE_ATTRIBUTES (TREE_TYPE (decl)))))
local_regparm = 2;
- /* Each global register variable increases register preassure,
- so the more global reg vars there are, the smaller regparm
- optimization use, unless requested by the user explicitly. */
+ /* Each global register variable or fixed register usage
+ increases register pressure, so less registers should be
+ used for argument passing. This functionality can be
+ overriden by explicit regparm value. */
for (regno = 0; regno < 6; regno++)
- if (global_regs[regno])
+ if (global_regs[regno] || fixed_regs[regno])
globals++;
local_regparm
= globals < local_regparm ? local_regparm - globals : 0;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 539a0a2..47b6a72 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-05 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/34312
+ * gcc.target/i386/pr34312.c: New test.
+
2007-12-05 Tobias Burnus <bU gcc/stmt.c
PR fortran/34333
@@ -104,30 +109,29 @@
* gcc.c-torture/compile/20071203-1.c: New test.
2007-12-03 Robert Dewar <dewar@adacore.com>
- Samuel Tardieu <sam@rfc1149.net>
+ Samuel Tardieu <sam@rfc1149.net>
- PR ada/34287
- * check_elaboration_code.adb: New test.
-
- * bug_elaboration_code.ads, bug_elaboration_code.adb: New support
- files.
+ PR ada/34287
+ * gnat.dg/check_elaboration_code.adb: New test.
+ * gnat.dg/bug_elaboration_code.ads, bug_elaboration_code.adb:
+ New support files.
2007-12-02 Paolo Carlini <pcarlini@suse.de>
- PR c++/34061
- * g++.dg/cpp0x/pr34061.C: New.
+ PR c++/34061
+ * g++.dg/cpp0x/pr34061.C: New.
2007-12-02 Paolo Carlini <pcarlini@suse.de>
- PR c++/34273
- * g++.dg/other/error21.C: New.
+ PR c++/34273
+ * g++.dg/other/error21.C: New.
2007-12-02 Revital Eres <eres@il.ibm.com>
* gcc.dg/sms-4.c: New testcase.
2007-12-02 Vladimir Yanovsky <yanov@il.ibm.com>
- Revital Eres <eres@il.ibm.com>
+ Revital Eres <eres@il.ibm.com>
* gcc.dg/sms-3.c: New testcase.
@@ -1304,7 +1308,7 @@
* gcc.dg/vect/vect-78.c: Likewise.
* gcc.dg/vect/no-section-anchors-vect-31.c: New test, like the original
- testcase (without no-section-anchors prefix) but with global arrays.
+ testcase (without no-section-anchors prefix) but with global arrays.
* gcc.dg/vect/no-section-anchors-vect-34.c: Likewise.
* gcc.dg/vect/no-section-anchors-vect-36.c: Likewsie.
* gcc.dg/vect/no-section-anchors-vect-64.c: Likewise.
diff --git a/gcc/testsuite/gcc.target/i386/pr34312.c b/gcc/testsuite/gcc.target/i386/pr34312.c
new file mode 100644
index 0000000..846c285
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr34312.c
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -march=pentium-m -fpic" } */
+
+typedef struct
+{
+ unsigned char seq[3];
+} JamoNormMap;
+
+static const JamoNormMap *
+JamoClusterSearch (JamoNormMap aKey, const JamoNormMap * aClusters,
+ short aClustersSize)
+{
+ unsigned short l = 0, u = aClustersSize - 1;
+ unsigned short h = (l + u) / 2;
+
+ if ((aKey.seq[1] - aClusters[h].seq[1]) < 0)
+ return JamoClusterSearch (aKey, &(aClusters[l]), h - l);
+}
+
+short
+JamoSrchReplace (const JamoNormMap * aClusters, unsigned short aClustersSize,
+ unsigned short * aIn, unsigned int * aLength,
+ unsigned short aOffset)
+{
+ JamoNormMap key;
+
+ key.seq[0] = 0;
+ key.seq[1] = 1;
+ key.seq[2] = 2;
+
+ JamoClusterSearch (key, aClusters, aClustersSize);
+}