From patchwork Fri Aug 16 23:11:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 267923 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 82FB72C01E5 for ; Sat, 17 Aug 2013 09:11:25 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=vpE5WDQqgl/vip/TTT9ZAmKOlm5BEKrJXN+yX2pbMjRU34 Rk1HHXMErUlDdQl9LoovxICqh72hMsbdmjuDLZ4QrYrmf+Y19WLyq0u9SmSSYQjj DhCOjX839lpESS6l/zdASfxXJBtJCjH0/cMouznYbZ/9VY0qjN2XBb2sagawM= 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 :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=SviEcxhK2A6+TducM/WcbdGMG5o=; b=hyFRZsSmWbRTG0CSADDd bQrwMOVbptOkz1OwTUa16QVM6LvTD4QpQwOInvjUY84Gsv+3dDlW+XSvPHZ/Lpuy fW5X2JZtDK308Ht0X8drQlCbnKsSqPPMf8/6mG0IQIEf02sTrt8RADIAi0sIhhEf 4DXe6DwliHMpVJgzTCT7DLE= Received: (qmail 27726 invoked by alias); 16 Aug 2013 23:11:19 -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 27717 invoked by uid 89); 16 Aug 2013 23:11:19 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 Received: from mail-ie0-f179.google.com (HELO mail-ie0-f179.google.com) (209.85.223.179) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 16 Aug 2013 23:11:18 +0000 Received: by mail-ie0-f179.google.com with SMTP id c11so4416384ieb.38 for ; Fri, 16 Aug 2013 16:11:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=46ag4YGNlkEo5FHI9Jq+eKcGsJfkPRNeWVY9KpmStlA=; b=YaLUWV+YziNsRUMUwfl9/70LX9HVmlsFpFzXR1fsBqUHEKZMNcuyWP9RIeUNcZO0P6 QLP5qF1GHSRhrNmFDkrxPiDHL0fB3W+W++1QcbcHC563i7XX+gT2U2yEJlTb9yzuujPT zgS6WPrV4RnJdKUYngPRRJZ856IMf66L/I0HmIeLeaoRQAX0VXw7zYnLT6a0QvU9BkDc c3u3KCEQ3CvYotZTKpKI1kA8iJOjk6Zf+P/7W4/a4t100XkIKm58RyUC5kk+oHm5W1yW zATBa14gcgVg+V+RlGAO0fRvZ+nIs1KrcWg5mXqGQnY5bozjsKo/j7Dotxcf9kmU/Fmv PCQA== X-Gm-Message-State: ALoCoQkWZIah0FvVuk9Od/F5dnTsRKlZIckmPlPAAPdOcbrcw/jbDsKCoVKmfmw8BRaC/A0fVml3uVS01i1jeriLGADXZZMhfokiwuhL/rVDhaeHLrD15VMnV8BzbL8taQ9+e81V4rOIh/YTGQae5RbTKH6ek2+yJhJZ4jemwrL9dMhWrQBRTGM49iaarfI8WYOybSNmGY4/p5ZTVZSdABO7fVpJw1egsQ== MIME-Version: 1.0 X-Received: by 10.50.128.36 with SMTP id nl4mr33936igb.38.1376694677037; Fri, 16 Aug 2013 16:11:17 -0700 (PDT) Received: by 10.231.73.73 with HTTP; Fri, 16 Aug 2013 16:11:16 -0700 (PDT) Date: Fri, 16 Aug 2013 16:11:16 -0700 Message-ID: Subject: [GOOGLE] Add discriminator for inlined callsite From: Dehao Chen To: GCC Patches , Cary Coutant This patch emits discriminator for inlined callsite. This is important when there are two inlined callsites in the same line. Bootstrapped, testing on going. OK for google branches? Thanks, Dehao Index: gcc/dwarf2out.c =================================================================== --- gcc/dwarf2out.c (revision 201632) +++ gcc/dwarf2out.c (working copy) @@ -18807,12 +18807,16 @@ gen_label_die (tree decl, dw_die_ref context_die) static inline void add_call_src_coords_attributes (tree stmt, dw_die_ref die) { - expanded_location s = expand_location (BLOCK_SOURCE_LOCATION (stmt)); + location_t locus = BLOCK_SOURCE_LOCATION (stmt); + expanded_location s = expand_location (locus); if (dwarf_version >= 3 || !dwarf_strict) { add_AT_file (die, DW_AT_call_file, lookup_filename (s.file)); add_AT_unsigned (die, DW_AT_call_line, s.line); + unsigned discr = get_discriminator_from_locus (locus); + if (discr != 0) + add_AT_unsigned (die, DW_AT_discr, discr); } }