diff mbox

[3/7,ARC] Update can_follow_jump hook helper.

Message ID 1500885779-12930-4-git-send-email-claziss@synopsys.com
State New
Headers show

Commit Message

Claudiu Zissulescu July 24, 2017, 8:42 a.m. UTC
From: claziss <claziss@synopsys.com>

Short branches cannot be used to jump between hot/cold
sections. Update the hook.

gcc/
2017-04-26  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_can_follow_jump): Check for short
	branches.
---
 gcc/config/arc/arc.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Andrew Burgess Aug. 15, 2017, 1:39 p.m. UTC | #1
* Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com> [2017-07-24 10:42:55 +0200]:

> From: claziss <claziss@synopsys.com>
> 
> Short branches cannot be used to jump between hot/cold
> sections. Update the hook.
> 
> gcc/
> 2017-04-26  Claudiu Zissulescu  <claziss@synopsys.com>
> 
> 	* config/arc/arc.c (arc_can_follow_jump): Check for short
> 	branches.

This looks fine.

Thanks,
Andrew

> ---
>  gcc/config/arc/arc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
> index cf52df8..3980a0f 100644
> --- a/gcc/config/arc/arc.c
> +++ b/gcc/config/arc/arc.c
> @@ -9941,6 +9941,9 @@ arc_can_follow_jump (const rtx_insn *follower, const rtx_insn *followee)
>    if (CROSSING_JUMP_P (followee))
>      switch (get_attr_type (u.r))
>        {
> +      case TYPE_BRANCH:
> +	if (get_attr_length (u.r) != 2)
> +	  break;
>        case TYPE_BRCC:
>        case TYPE_BRCC_NO_DELAY_SLOT:
>  	return false;
> -- 
> 1.9.1
>
Claudiu Zissulescu Aug. 31, 2017, 2:36 p.m. UTC | #2
> This looks fine.
> 

Committed. Thank you for your review,
Claudiu
diff mbox

Patch

diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index cf52df8..3980a0f 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -9941,6 +9941,9 @@  arc_can_follow_jump (const rtx_insn *follower, const rtx_insn *followee)
   if (CROSSING_JUMP_P (followee))
     switch (get_attr_type (u.r))
       {
+      case TYPE_BRANCH:
+	if (get_attr_length (u.r) != 2)
+	  break;
       case TYPE_BRCC:
       case TYPE_BRCC_NO_DELAY_SLOT:
 	return false;