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