Hi, all,

When I read the GCC source code about register allocation,
I wonder is it true that one Pseudo  register is only corresponding to one 
basic block?
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.
But I am not sure.
Please help me.


Creative Compiler Research Group,
National University of Defense Technology, China.

Reply via email to