Commit 28f4ff35 by Claudiu Zissulescu Committed by Claudiu Zissulescu

[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
parent 9f532472
2017-08-31 Claudiu Zissulescu <claziss@synopsys.com> 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. * config.gcc: Use g.opt for arc.
* config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted, * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
functionality moved to ... functionality moved to ...
......
...@@ -9845,6 +9845,9 @@ arc_can_follow_jump (const rtx_insn *follower, const rtx_insn *followee) ...@@ -9845,6 +9845,9 @@ arc_can_follow_jump (const rtx_insn *follower, const rtx_insn *followee)
if (CROSSING_JUMP_P (followee)) if (CROSSING_JUMP_P (followee))
switch (get_attr_type (u.r)) switch (get_attr_type (u.r))
{ {
case TYPE_BRANCH:
if (get_attr_length (u.r) != 2)
break;
case TYPE_BRCC: case TYPE_BRCC:
case TYPE_BRCC_NO_DELAY_SLOT: case TYPE_BRCC_NO_DELAY_SLOT:
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment