From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7553 invoked by alias); 1 Nov 2012 23:07:33 -0000 Received: (qmail 7534 invoked by uid 22791); 1 Nov 2012 23:07:32 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-qc0-f175.google.com (HELO mail-qc0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Nov 2012 23:07:26 +0000 Received: by mail-qc0-f175.google.com with SMTP id j3so2257758qcs.20 for ; Thu, 01 Nov 2012 16:07:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-system-of-record:x-gm-message-state; bh=3IF0PLVwCds0EYCKrti61qSNrZARJV3qx/xKKngiKWk=; b=KIX+8LXbA+sNfVKITHsB+Apn6Q+aMADaJzY4/0gTyLz14zHNDziVzRcYnRoRZ4T6Cy 5ZqFFIdDf2jdgBoZTsvBcBKalzFVefhYFlQG3PxgFOm5I/ZfqWA7X8nYdpeh4lNr3KUN E334HvheHui1fVVZQQPwnsLP1my4Zqh196rKZQK4pWVanMiW247biDleMLJKQsr1Mx11 1Zco06aPktf60S1OqLhZKoqC6ElAxBtfr4csGFmiJ5D8v/qwnbw/OmJncKdp7CInvo78 7zGSCNp+VDSg5Fhuckw+WEmJKgKYRU896DlkNwJHCeRptcs+xS/mMm1/f7L7lHI565BT pPXA== MIME-Version: 1.0 Received: by 10.224.189.65 with SMTP id dd1mr59157qab.79.1351811245206; Thu, 01 Nov 2012 16:07:25 -0700 (PDT) Received: by 10.49.104.142 with HTTP; Thu, 1 Nov 2012 16:07:25 -0700 (PDT) In-Reply-To: References: <1826073.rNRXULK6yo@polaris> <3309385.mAl1npuha0@polaris> Date: Thu, 01 Nov 2012 23:07:00 -0000 Message-ID: Subject: Re: [PATCH] Reset source location for instructions moved out of its original residing basic block From: Xinliang David Li To: Ian Lance Taylor Cc: Dehao Chen , Eric Botcazou , GCC Patches Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-Gm-Message-State: ALoCoQlSyD3KhohwXYKcqFS08ZJCitdUElDUCj1YdywHBZyzC/XyCNxZrSAQXTMjIRZ+uM/qY/aigAARFJ0kZ1ml2eSveFXkkBZqf3ZJ70BCRCRM/mjJLx8FKTDn9vRKMWFAEC5cFGvlCZ3acNDLIAkw9INh6M2tXsPTs89/Pjxnznaf1vA0ICtFHPQ6gZPLNc9n9EjjKzET X-IsSubscribed: yes 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/msg00151.txt.bz2 On Thu, Nov 1, 2012 at 3:57 PM, Ian Lance Taylor wrote: > On Thu, Nov 1, 2012 at 10:00 AM, Dehao Chen wrote: >> >> I see your point. How about we guard these changes with a flag, say >> -gless-jumpy, so that people can always choose between better coverage >> and less jumpy gdb behavior (it's also important for some other >> clients like AutoFDO). I will have a series of patches to follow soon >> that can be guarded by this flag. > > This feels to me like an attempt to address the problem in the wrong > place. It seems to me that it would be better to do one of: > > * Use -Og and ensure that -Og does not move the code around. > Presumably this would lead to worse runtime performance and better > performance in the debugger. > > * Add heuristics to the debugger to jump around less. > > * Add a new debug facility to mark the statement as attached to a > particular source location, but moved relative to other source > locations. Add facilities to the debugger to take that into account. > > That said, I suppose I can imagine a mode like you suggest. It > shouldn't be a -g option, it should be a -f option, like > -fdiscard-moved-insn-debug-locations or something. That would be > along the lines of -fno-var-tracking: we generate worse debug info > upon user request. > Or have a common umbrella option to guard all changes that improves DOC. David > Ian