Re: Doubt about Pseudo register uses.
Chunjiang Li
chunjiang@nudt.edu.cn
Mon Aug 1 14:30:00 GMT 2005
Thx.
I also guessed that.
But, for I am a rookie in GCC, I know little about GCC, need advice.
Ian Lance Taylor <ian@airs.com>:
> Chunjiang Li <chunjiang@nudt.edu.cn> writes:
>
> > I wonder is it true that one Pseudo register is only corresponding to one
> basic block?
>
> No, it isn't.
>
> > the reg_info struct is:
> >
> > typedef struct reg_info_def
> > { /* fields set by reg_scan */
> > int first_uid; /* UID of first insn to use (REG n) */
> > int last_uid; /* UID of last insn to use (REG n) */
> >
> > /* fields set by reg_scan & flow_analysis */
> > int sets; /* # of times (REG n) is set */
> >
> > /* fields set by flow_analysis */
> > int refs; /* # of times (REG n) is used or set */
> > int freq; /* # estimated frequency (REG n) is used or set */
> > int deaths; /* # of times (REG n) dies */
> > int live_length; /* # of instructions (REG n) is live */
> > int calls_crossed; /* # of calls (REG n) is live across */
> > int basic_block; /* # of basic blocks (REG n) is used in */
> > } reg_info;
> >
> > It seems that one Pseudo register is only used in one basic block.
>
> If the register is used in more than one basic block, the basic_block
> field is set to REG_BLOCK_GLOBAL. See REG_BASIC_BLOCK in
> basic-block.h and flow.c.
>
> Ian
>
Creative Compiler Research Group,
National University of Defense Technology, China.
More information about the Gcc
mailing list