From patchwork Thu Oct 30 16:37:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Enkovich X-Patchwork-Id: 405093 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 EF21C14007D for ; Fri, 31 Oct 2014 03:38:15 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=uQz0joSDNVzWPEbC6 dUUPBaJH8qZjetymSysWehft0Ed2EwLmks/TZ0IhGMspoEC7dJAKMJ7z6/My/c6L pGlD06s0AoKx+7djOcH6Z1F/UGRi0zKCh3nWXHRyOoTBFVoMsQfpx82mYu1sUCXY 5ueKfS4yGanPIvq3FaqXhQaGW0= 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=M/0+0D3mk3Wp67IDa5YZJwS LuLg=; b=ha/hRt+RUvI+hQffh2FqApzgARMuHNQneHvfuyu0izK1BoZgiuPPBf+ 9/YOOS+D4rF7QQOX3FW3xvmjivTdJzYLVCFSvznCuRV6rj+w67VCiaLFtXHQoOrn uqzq3sZ0ixkzvJm85gVnlrDX+cuB/IuNr8W+hByMFn/wrMOStr7M= Received: (qmail 26591 invoked by alias); 30 Oct 2014 16:38:08 -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 26577 invoked by uid 89); 30 Oct 2014 16:38:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f180.google.com Received: from mail-pd0-f180.google.com (HELO mail-pd0-f180.google.com) (209.85.192.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 30 Oct 2014 16:38:05 +0000 Received: by mail-pd0-f180.google.com with SMTP id ft15so5469604pdb.11 for ; Thu, 30 Oct 2014 09:38:04 -0700 (PDT) X-Received: by 10.70.35.229 with SMTP id l5mr18642372pdj.47.1414687083803; Thu, 30 Oct 2014 09:38:03 -0700 (PDT) Received: from msticlxl57.ims.intel.com ([192.55.54.40]) by mx.google.com with ESMTPSA id fz1sm7555441pbb.80.2014.10.30.09.38.01 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Oct 2014 09:38:03 -0700 (PDT) Date: Thu, 30 Oct 2014 19:37:53 +0300 From: Ilya Enkovich To: Jeff Law Cc: gcc-patches Subject: Re: [PATCH, Pointer Bounds Checker 14/x] Passes [1/n] Expand interfaces Message-ID: <20141030163753.GA51241@msticlxl57.ims.intel.com> References: <20141008185054.GA13454@msticlxl57.ims.intel.com> <543C400E.1050706@redhat.com> <5451CE7C.1000209@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5451CE7C.1000209@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes On 29 Oct 23:37, Jeff Law wrote: > On 10/15/14 11:54, Ilya Enkovich wrote: > > > >Thanks for review! I see no more patches not reviewed at all. I see > >4 more patches requiring approve before I can start a merge. > > > >Two of them are parts of split #14 (Passes): #14.3 (Helper functions) > >and #14.16 (Reduce bounds lifetime) > These are fine. We can revisit LCM/anticipated in the future for > the bounds lifetime reduction. > > > > > >There is also #32 (hooks for i386 target). It has concern about TBAA > >which I believe is not a problem in my case because accesses using > >different types are not mixed. > OK. That was the only pending issue with that patch, so it's good > to go as well. > > > > >The final one is #33 (MPX ABI). I still see fail on one benchmark but > >I don't feel ICE in LRA should prevent patch from been committed. > Assuming it doesn't fail unless you've turned on MPX, that seems > reasonable at this stage. Obviously we'd like to get that fixed > during the general bugfixing phase. > > As I discussed with Areg, I wanted this stuff to wait until the > Darwin port had settled a bit after the recent problems. While > Darwin isn't happy yet, I think the remaining problems are > manageable and isolated to the i686 code generator. So if you could > bootstrap Darwin 64 bit as a sanity test along with a final > bootstrap & regression test on x86_64 linux, then I think we're good > to go. > > jeff > > Hi, I rebased patches on current trunk. Bootstrap and check are clean on linux-x86_64. Darwin bootstrap has few issues due to IPA ICF pass. I also found my patches introduce an unused variable warning due to conditional code (under #ifdef ASM_OUTPUT_DEF) in varasm. With IPA ICF disabled and this warning fixed Darwin 64 bootstrap is OK. ARM cross build revealed another problem with conditional code. Function immed_double_const was put under #if (TARGET_SUPPORTS_WIDE_INT == 0) some time ago but I missed it and didn't update my patches. With this fixed cross build is also OK. Below are required changes. If these fixes are OK, I'm ready to commit whole series (I'm going to commit it as a single patch because didn't test each part separately). Thanks, Ilya diff --git a/gcc/varasm.c b/gcc/varasm.c index eb68fd3..40eeb5e 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -5522,7 +5522,6 @@ vec *alias_pairs; void do_assemble_alias (tree decl, tree target) { - tree orig_decl = decl; tree id; /* Emulated TLS had better not get this var. */ @@ -5533,11 +5532,6 @@ do_assemble_alias (tree decl, tree target) if (TREE_ASM_WRITTEN (decl)) return; - if (TREE_CODE (decl) == FUNCTION_DECL - && cgraph_node::get (decl)->instrumentation_clone - && cgraph_node::get (decl)->instrumented_version) - orig_decl = cgraph_node::get (decl)->instrumented_version->decl; - id = DECL_ASSEMBLER_NAME (decl); ultimate_transparent_alias_target (&id); @@ -5572,6 +5566,13 @@ do_assemble_alias (tree decl, tree target) } #ifdef ASM_OUTPUT_DEF + tree orig_decl = decl; + + if (TREE_CODE (decl) == FUNCTION_DECL + && cgraph_node::get (decl)->instrumentation_clone + && cgraph_node::get (decl)->instrumented_version) + orig_decl = cgraph_node::get (decl)->instrumented_version->decl; + /* Make name accessible from other files, if appropriate. */ if (TREE_PUBLIC (decl) || TREE_PUBLIC (orig_decl)) diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 41c616d..04f677e 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -6133,7 +6133,10 @@ init_emit_once (void) for (mode = GET_CLASS_NARROWEST_MODE (MODE_POINTER_BOUNDS); mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) - const_tiny_rtx[0][mode] = immed_double_const (0, 0, mode); + { + wide_int wi_zero = wi::zero (GET_MODE_PRECISION (mode)); + const_tiny_rtx[0][mode] = immed_wide_int_const (wi_zero, mode); + } pc_rtx = gen_rtx_fmt_ (PC, VOIDmode); ret_rtx = gen_rtx_fmt_ (RETURN, VOIDmode);