From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id 0332A385E830 for ; Wed, 6 May 2020 17:35:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0332A385E830 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-29-gWRF87RiOeqC3YpykJOIKg-1; Wed, 06 May 2020 13:35:15 -0400 X-MC-Unique: gWRF87RiOeqC3YpykJOIKg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C8C7D18FF663; Wed, 6 May 2020 17:35:14 +0000 (UTC) Received: from ovpn-112-113.phx2.redhat.com (ovpn-112-113.phx2.redhat.com [10.3.112.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 731DD2B4B6; Wed, 6 May 2020 17:35:14 +0000 (UTC) Message-ID: Subject: Re: Access RTX register information From: Jeff Law Reply-To: law@redhat.com To: eashan gupta Cc: gcc-help@gcc.gnu.org Date: Wed, 06 May 2020 11:35:13 -0600 In-Reply-To: References: <786dd932f06faa247e7fd3717e2d0ee39fc23581.camel@redhat.com> Organization: Red Hat User-Agent: Evolution 3.36.1 (3.36.1-1.fc32) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2020 17:35:19 -0000 On Wed, 2020-05-06 at 05:12 +0530, eashan gupta wrote: > Hi, > Thanks a lot for replying. > I have tried tracing the print_rtl_single too following the REG_EXPR but it > ends up in the code of printing the complete tree. Right. It's that tree structure that will have the name emebedded in it. > > Is it possible to access this information directly, ie get the variable name > stored in a string instead of printing it out? Probably something like DECL_NAME (REG_EXPR (object)) or DECL_ASSEMBLER_NAME (REG_EXPR (object)) > I am not too familiar with the code for the tree and it would be very helpful > to me if I could get the method to get the variable name stored/extracted from > the tree. You're almost certainly going to need to refer to tree.h and tree.def to understand how to dig out the information you want. jeff >