From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8875 invoked by alias); 1 Nov 2012 08:56:38 -0000 Received: (qmail 8866 invoked by uid 22791); 1 Nov 2012 08:56:37 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Nov 2012 08:56:32 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 70618298137; Thu, 1 Nov 2012 09:56:32 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7KSrCLoGSbGs; Thu, 1 Nov 2012 09:56:32 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 41DB4298135; Thu, 1 Nov 2012 09:56:32 +0100 (CET) From: Eric Botcazou To: Dehao Chen Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Reset source location for instructions moved out of its original residing basic block Date: Thu, 01 Nov 2012 08:56:00 -0000 Message-ID: <1826073.rNRXULK6yo@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.16-desktop; KDE/4.7.2; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00023.txt.bz2 > This patch tries to fix this problem by resetting the source location > when moving instructions to another BB. This can greatly improve the > debuggability of optimized code. For the attached unittest. Without > the patch, the debugger will always jump into line 14 even when the > branch at line 13 is not taken. With the patch, the problem is fixed. But this breaks coverage info! You cannot change the source location of instructions randomly like that; the rule should be that, once a location is set, it cannot be changed. At most it can be cleared. > gcc/ChangeLog: > 2012-10-31 Dehao Chen > > * emit-rtl.c (reorder_insns): Reset the source location for > instructions moved out of its original residing basic block. No, that isn't acceptable. -- Eric Botcazou