This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMITTED, IA-64] doloop optimization across calls


I noticed this while working on PR43520.  Doloop by default does not
optimize loops with call insns.  However, on IA-64, the loop counter
register is call saved, so we can and should optimize such loops.  This
is fixed by replacing the default TARGET_INVALID_WITHIN_DOLOOP hook with
the null one, just like is already done in the s390 port.

This was tested with an ia64-linux C and C++ bootstrap and make check.
There were no regressions.  This was also tested by hand on some small
testcases to verify that it was doing what I expected.

I've checked in the patch.

Jim

2010-04-19  James E. Wilson  <wilson@codesourcery.com>

	* config/ia64/ia64.c (TARGET_INVALID_WITHIN_DOLOOP): Define.

Index: ia64.c
===================================================================
--- ia64.c	(revision 158495)
+++ ia64.c	(working copy)
@@ -537,6 +537,9 @@ static const struct attribute_spec ia64_
 #undef TARGET_TRAMPOLINE_INIT
 #define TARGET_TRAMPOLINE_INIT ia64_trampoline_init
 
+#undef TARGET_INVALID_WITHIN_DOLOOP
+#define TARGET_INVALID_WITHIN_DOLOOP hook_constcharptr_const_rtx_null
+
 #undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
 #define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE ia64_override_options_after_change
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]