Answer the following questions.
A variable is a live variable at the head of a block if it is used inside block before being reassigned or if it is live at the tail of the block without having been reassigned inside the block. A variable is a live variable at the tail of a block if and only if it is live at the head of one of the following blocks.
To analyse the live variables, we can use the following method:
block do |
repeat |
block do |
until all the converge |
From this algorithm, we deduce the following table:
B0 | B1 | B2 | B3 | B4 | |
head | x | x,y,z | w,x,z | w,x,z | t,x,y |
tail | x,y,z | w,x,z | w,x,z | t,x,y,z | t,x,y,z |