From patchwork Mon Jul 24 08:42:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Zissulescu X-Patchwork-Id: 792681 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-458749-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="EBFq6w9a"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xGFP56PjJz9s74 for ; Mon, 24 Jul 2017 18:47:21 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=Ty0n72k1aSV/4kxB MSdg4Ju86OliNK3RkDhcGlAcb7el9eWb5tiUZ4Rvtlt2BaSu5oGMR/pDJ/vX0Rte PXejW/PnR3H5iyzVvKR285Ksqb4Hs8EJXUGHLbnlVvuy/ymErKN6qy+FRqR1xbST si3FCbrY6wsV6n4mSw0czWe53HE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=default; bh=PbxX91BsHvS+q65bkuXn5h zRO58=; b=EBFq6w9aS7JllSYz6uN3ndQM0EKXEzsW9SsWatRSn/xZzOn/1FzhPd +VQeVY/3IW12O50rIntOpVhmOVSlM4fpK+0FM62+FKjcQgTzoz7Rv0hpJ1MjMxXc RqERozrO0b04SF0Jwr7WUVOzAnyPgCvWriIL/QKJCYITMjhrH/uLs= Received: (qmail 54546 invoked by alias); 24 Jul 2017 08:46:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 53371 invoked by uid 89); 24 Jul 2017 08:46:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=ur, Hx-languages-length:801 X-HELO: smtprelay.synopsys.com Received: from smtprelay.synopsys.com (HELO smtprelay.synopsys.com) (198.182.60.111) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Jul 2017 08:46:22 +0000 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 8D89310C157B; Mon, 24 Jul 2017 01:46:21 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 765C878C; Mon, 24 Jul 2017 01:46:21 -0700 (PDT) Received: from US01WEHTC2.internal.synopsys.com (us01wehtc2-vip.internal.synopsys.com [10.12.239.238]) by mailhost.synopsys.com (Postfix) with ESMTP id 5ECBD787; Mon, 24 Jul 2017 01:46:21 -0700 (PDT) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WEHTC2.internal.synopsys.com (10.12.239.237) with Microsoft SMTP Server (TLS) id 14.3.266.1; Mon, 24 Jul 2017 01:46:21 -0700 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.104) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.266.1; Mon, 24 Jul 2017 14:16:20 +0530 Received: from nl20droid1.internal.synopsys.com (10.100.24.228) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.266.1; Mon, 24 Jul 2017 14:16:19 +0530 From: Claudiu Zissulescu To: CC: , , , Subject: [PATCH 3/7] [ARC] Update can_follow_jump hook helper. Date: Mon, 24 Jul 2017 10:42:55 +0200 Message-ID: <1500885779-12930-4-git-send-email-claziss@synopsys.com> In-Reply-To: <1500885779-12930-1-git-send-email-claziss@synopsys.com> References: <1500885779-12930-1-git-send-email-claziss@synopsys.com> MIME-Version: 1.0 From: claziss Short branches cannot be used to jump between hot/cold sections. Update the hook. gcc/ 2017-04-26 Claudiu Zissulescu * config/arc/arc.c (arc_can_follow_jump): Check for short branches. --- 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;