[ARC] Update can_follow_jump hook helper.
authorClaudiu Zissulescu <claziss@synopsys.com>
Thu, 31 Aug 2017 14:35:47 +0000 (16:35 +0200)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Thu, 31 Aug 2017 14:35:47 +0000 (16:35 +0200)
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

gcc/ChangeLog
gcc/config/arc/arc.c

index c0e032b..cf1e005 100644 (file)
@@ -1,5 +1,10 @@
 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/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
        functionality moved to ...
index 4dcac18..bc73a59 100644 (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;