When we setup the subregion map, we should consider nested subregions. Consider the code:<br><br>struct s1 {<br> struct s2 {<br> int d;<br> } e;<br>};<br><br>void f(double timeout) {<br> struct s1 a;<br> a.e.d = (long) timeout;<br>
if (a.e.d == 10)<br> a.e.d = 4;<br>}<br><br>Current implementation only setup subregion map from 'e' to 'd', but no map from 'a' to 'e'. So we lost the binding for a.e.d. The attached patch uses a worklist to record<br>
intermediate region roots which are subregions themselves.<br>