This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Doubt about Pseudo register uses.
- From: Ian Lance Taylor <ian at airs dot com>
- To: Chunjiang Li <chunjiang at nudt dot edu dot cn>
- Cc: gcc at gcc dot gnu dot org
- Date: 01 Aug 2005 04:56:38 -0700
- Subject: Re: Doubt about Pseudo register uses.
- References: <20050801101728.3FB1353F07E@ds20.nudt.edu.cn>
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