diff mbox

[ARM] Fix checking RTL error in cortex_a9_sched_adjust_cost

Message ID 56339107.2080302@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov Oct. 30, 2015, 3:47 p.m. UTC
On 30/10/15 14:37, Ramana Radhakrishnan wrote:
>

> On 29/10/15 16:02, Kyrill Tkachov wrote:

>> Hi all,

>>

>> An arm-none-eabi build with RTL checking and --with-cpu=cortex-a9 fails because

>> cortex_a9_sched_adjust_cost tries to access the SET_DEST of a PARALLEL.

>> The correct thing to do is to call single_set on dep, which will return a simple SET

>> that we can take the SET_DEST of or NULL if there's more than one SET.

>>

>> This patch does that.

>> The arm-none-eabi build passes.

>> Bootstrapped and tested on arm-none-linux-gnueabihf.

>>

>> Ok for trunk?

>>

>> Thanks,

>> Kyrill

>>

>> 2015-10-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

>>

>>      * config/arm/arm.c (cortex_a9_sched_adjust_cost): Use reg_set_p to

>>      check for dependencies.

> Ok - but I think we also need a patch to improve the comment for reg_set_p, probably because it started life as internal function but now has wider visibility.


Thanks,

Here's a patch for the reg_set_p comment.
Committing as obvious.

Kyrill

>

>

> Thanks,

> Ramana

>

Comments

Kyrylo Tkachov Nov. 6, 2015, 11:37 a.m. UTC | #1
Ping.
https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03170.html

Thanks,
Kyrill
On 30/10/15 15:47, Kyrill Tkachov wrote:
>

> On 30/10/15 14:37, Ramana Radhakrishnan wrote:

>>

>> On 29/10/15 16:02, Kyrill Tkachov wrote:

>>> Hi all,

>>>

>>> An arm-none-eabi build with RTL checking and --with-cpu=cortex-a9 fails because

>>> cortex_a9_sched_adjust_cost tries to access the SET_DEST of a PARALLEL.

>>> The correct thing to do is to call single_set on dep, which will return a simple SET

>>> that we can take the SET_DEST of or NULL if there's more than one SET.

>>>

>>> This patch does that.

>>> The arm-none-eabi build passes.

>>> Bootstrapped and tested on arm-none-linux-gnueabihf.

>>>

>>> Ok for trunk?

>>>

>>> Thanks,

>>> Kyrill

>>>

>>> 2015-10-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

>>>

>>>      * config/arm/arm.c (cortex_a9_sched_adjust_cost): Use reg_set_p to

>>>      check for dependencies.

>> Ok - but I think we also need a patch to improve the comment for reg_set_p, probably because it started life as internal function but now has wider visibility.

>

> Thanks,

>

> Here's a patch for the reg_set_p comment.

> Committing as obvious.

>

> Kyrill

>

>>

>>

>> Thanks,

>> Ramana

>>

>
Kyrylo Tkachov Nov. 6, 2015, 11:38 a.m. UTC | #2
On 06/11/15 11:37, Kyrill Tkachov wrote:
> Ping.

> https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03170.html


My apologies, I meant to ping another patch.
Please disregard that.

Kyrill

>

> Thanks,

> Kyrill

> On 30/10/15 15:47, Kyrill Tkachov wrote:

>>

>> On 30/10/15 14:37, Ramana Radhakrishnan wrote:

>>>

>>> On 29/10/15 16:02, Kyrill Tkachov wrote:

>>>> Hi all,

>>>>

>>>> An arm-none-eabi build with RTL checking and --with-cpu=cortex-a9 fails because

>>>> cortex_a9_sched_adjust_cost tries to access the SET_DEST of a PARALLEL.

>>>> The correct thing to do is to call single_set on dep, which will return a simple SET

>>>> that we can take the SET_DEST of or NULL if there's more than one SET.

>>>>

>>>> This patch does that.

>>>> The arm-none-eabi build passes.

>>>> Bootstrapped and tested on arm-none-linux-gnueabihf.

>>>>

>>>> Ok for trunk?

>>>>

>>>> Thanks,

>>>> Kyrill

>>>>

>>>> 2015-10-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

>>>>

>>>>      * config/arm/arm.c (cortex_a9_sched_adjust_cost): Use reg_set_p to

>>>>      check for dependencies.

>>> Ok - but I think we also need a patch to improve the comment for reg_set_p, probably because it started life as internal function but now has wider visibility.

>>

>> Thanks,

>>

>> Here's a patch for the reg_set_p comment.

>> Committing as obvious.

>>

>> Kyrill

>>

>>>

>>>

>>> Thanks,

>>> Ramana

>>>

>>

>
diff mbox

Patch

diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 23b2c45..d7201ea 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -1207,7 +1207,8 @@  reg_set_between_p (const_rtx reg, const rtx_insn *from_insn,
   return 0;
 }
 
-/* Internals of reg_set_between_p.  */
+/* Return true if REG is set or clobbered inside INSN.  */
+
 int
 reg_set_p (const_rtx reg, const_rtx insn)
 {