Chunjiang Li <[EMAIL PROTECTED]> 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

Reply via email to