liveness question

Hi
   if I have a function that has an formal argument assigned to say
register R0 and I have the following code fragment as my first basic
block

BB#0
   %reg100023<dead> = // for some reason could not be removed
      ...
                   = R0 <kill>

What prevents R0 from being allocated to %reg100023

thanks
shrey

The fact that R0 is live on entry to the block and its value is used after %reg100023 has been assigned.

-bw

Thanks Bill..Can you elaborate on which pass the info gets found and
does it depend on adding livein to machine function in argument
lowering or anything action during instruction selection. Also does
this live in info show in any dumps ?

thanks
shrey

The information is scattered throughout the code-gen modules. The live variables pass does some of it, etc. I would suggest looking at the passes in lib/CodeGen for specific information. As for what's live-in to a function, that's part of the ABI, which you will find in the lib/Target/*/ directory.

-bw