* [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop
@ 2011-05-08 7:39 Revital Eres
2011-05-11 8:24 ` Ayal Zaks
2011-05-11 21:21 ` Alexandre Oliva
0 siblings, 2 replies; 4+ messages in thread
From: Revital Eres @ 2011-05-08 7:39 UTC (permalink / raw)
To: zaks; +Cc: gcc-patches, Patch Tracking
Hello,
The attached patch adds code to skip DEBUG_INSNs while recognizing
doloop pattern.
The patch was tested together with the rest of the patches in this series
and on top of the patch to support do-loop for ARM (not yet in mainline,
but approved http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01718.html).
On ppc64-redhat-linux regtest as well as bootstrap with SMS flags
enabling SMS also on loops with stage count 1. Regtested on SPU.
On arm-linux-gnueabi regtseted on c,c++. Bootstrap c language with SMS
flags enabling SMS also on loops with stage count 1.
OK for mainline?
Thanks,
Revital
Changelog:
* modulo-sched.c (doloop_register_get): Ignore DEBUG_INSNs while
recognizing doloop.
Index: modulo-sched.c
===================================================================
--- modulo-sched.c (revision 173368)
+++ modulo-sched.c (working copy)
@@ -310,10 +313,10 @@ doloop_register_get (rtx head ATTRIBUTE_
either a single (parallel) branch-on-count or a (non-parallel)
branch immediately preceded by a single (decrement) insn. */
first_insn_not_to_check = (GET_CODE (PATTERN (tail)) == PARALLEL ? tail
- : PREV_INSN (tail));
+ : prev_nondebug_insn (tail));
for (insn = head; insn != first_insn_not_to_check; insn = NEXT_INSN (insn))
- if (reg_mentioned_p (reg, insn))
+ if (reg_mentioned_p (reg, insn) && !DEBUG_INSN_P (insn))
{
if (dump_file)
{
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop
2011-05-08 7:39 [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop Revital Eres
@ 2011-05-11 8:24 ` Ayal Zaks
2011-05-11 21:21 ` Alexandre Oliva
1 sibling, 0 replies; 4+ messages in thread
From: Ayal Zaks @ 2011-05-11 8:24 UTC (permalink / raw)
To: Revital Eres; +Cc: gcc-patches, Patch Tracking
> OK for mainline?
Yes, this is pretty obvious. (You don't have to change to
prev_nondebug_insn btw).
Ayal.
From: Revital Eres <revital.eres@linaro.org>
To: Ayal Zaks/Haifa/IBM@IBMIL
Cc: gcc-patches@gcc.gnu.org, Patch Tracking <patches@linaro.org>
Date: 08/05/2011 07:37 AM
Subject: [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop
Hello,
The attached patch adds code to skip DEBUG_INSNs while recognizing
doloop pattern.
The patch was tested together with the rest of the patches in this series
and on top of the patch to support do-loop for ARM (not yet in mainline,
but approved http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01718.html).
On ppc64-redhat-linux regtest as well as bootstrap with SMS flags
enabling SMS also on loops with stage count 1. Regtested on SPU.
On arm-linux-gnueabi regtseted on c,c++. Bootstrap c language with SMS
flags enabling SMS also on loops with stage count 1.
OK for mainline?
Thanks,
Revital
Changelog:
* modulo-sched.c (doloop_register_get): Ignore DEBUG_INSNs while
recognizing doloop.
Index: modulo-sched.c
===================================================================
--- modulo-sched.c (revision 173368)
+++ modulo-sched.c (working copy)
@@ -310,10 +313,10 @@ doloop_register_get (rtx head ATTRIBUTE_
either a single (parallel) branch-on-count or a (non-parallel)
branch immediately preceded by a single (decrement) insn. */
first_insn_not_to_check = (GET_CODE (PATTERN (tail)) == PARALLEL ? tail
- : PREV_INSN (tail));
+ : prev_nondebug_insn (tail));
for (insn = head; insn != first_insn_not_to_check; insn = NEXT_INSN
(insn))
- if (reg_mentioned_p (reg, insn))
+ if (reg_mentioned_p (reg, insn) && !DEBUG_INSN_P (insn))
{
if (dump_file)
{
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop
2011-05-08 7:39 [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop Revital Eres
2011-05-11 8:24 ` Ayal Zaks
@ 2011-05-11 21:21 ` Alexandre Oliva
2011-05-12 9:44 ` Revital Eres
1 sibling, 1 reply; 4+ messages in thread
From: Alexandre Oliva @ 2011-05-11 21:21 UTC (permalink / raw)
To: Revital Eres; +Cc: zaks, gcc-patches, Patch Tracking
On May 8, 2011, Revital Eres <revital.eres@linaro.org> wrote:
> + if (reg_mentioned_p (reg, insn) && !DEBUG_INSN_P (insn))
It probably makes sense to test for !DEBUG_INSN_P first, since it's much
cheaper.
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop
2011-05-11 21:21 ` Alexandre Oliva
@ 2011-05-12 9:44 ` Revital Eres
0 siblings, 0 replies; 4+ messages in thread
From: Revital Eres @ 2011-05-12 9:44 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: zaks, gcc-patches
Hello,
>> + if (reg_mentioned_p (reg, insn) && !DEBUG_INSN_P (insn))
>
> It probably makes sense to test for !DEBUG_INSN_P first, since it's much
> cheaper.
Thanks, will commit the following to fix that:
* modulo-sched.c (doloop_register_get): Check !DEBUG_INSN_P
first.
Index: modulo-sched.c
===================================================================
--- modulo-sched.c (revision 173693)
+++ modulo-sched.c (working copy)
@@ -316,7 +316,7 @@ doloop_register_get (rtx head ATTRIBUTE_
: prev_nondebug_insn (tail));
for (insn = head; insn != first_insn_not_to_check; insn = NEXT_INSN (insn))
- if (reg_mentioned_p (reg, insn) && !DEBUG_INSN_P (insn))
+ if (!DEBUG_INSN_P (insn) && reg_mentioned_p (reg, insn))
{
if (dump_file)
{
Revital
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-12 6:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-08 7:39 [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop Revital Eres
2011-05-11 8:24 ` Ayal Zaks
2011-05-11 21:21 ` Alexandre Oliva
2011-05-12 9:44 ` Revital Eres
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).