[ARC] Update can_follow_jump hook helper.

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.

From-SVN: r251566
This commit is contained in:
Claudiu Zissulescu 2017-08-31 16:35:47 +02:00 committed by Claudiu Zissulescu
parent 9f532472da
commit 28f4ff3524
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2017-08-31 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_can_follow_jump): Check for short
branches.
2017-08-31 Claudiu Zissulescu <claziss@synopsys.com>
* config.gcc: Use g.opt for arc.

View File

@ -9845,6 +9845,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;