Re: Access RTX register information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Is it possible to access this information directly, ie get the variable
name stored in a string instead of printing it out?

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.
Thanks in advance.

Eashan



On Wed, May 6, 2020 at 4:36 AM Jeff Law <law@xxxxxxxxxx> wrote:

> On Wed, 2020-05-06 at 04:27 +0530, eashan gupta via Gcc-help wrote:
> > Hi,
> > Is it possible to access the variable name if we have an RTX which is a
> reg
> > that corresponds to a variable declared by the user?
> >
> > I have found the macro REG_USERVAR_P (RTX) in rtl.h which returns the
> > boolean "1 if RTX is a reg that corresponds to a variable declared by the
> > user." But I am unable to get a suitable macro to get the variable name
> the
> > reg corresponds to.
> >
> > On dumping the rtl output using the command:
> >
> > print_rtl_single(stdout, in_rtx);
> >
> > I get output:
> >
> > (reg/v:SI 68 [ c ])
> >
> > where "c" was the variable name defined by me. How do I access "c" given
> > the rtx statement, "in_rtx"?
> If/when this information is available it would be in the REG_EXPR field
> which
> would point back to the tree declaration.
>
> jeff
>
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux