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]

Re: [PATCH 3/7] [ARC] Update can_follow_jump hook helper.


* 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
> 


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