<div dir="ltr">EvaluateLogicalExpression is called only for the topmost logical operator. I need the values to survive until then, so I mark them as live. <div><br></div><div>I marked the non-leaf expressions as live, because the destructor branch can depend on any sub-expression, not just leaves. E.g. for an expression like (a || b) && A(), the destructor for A will have (a || b) as a terminator, but this value was never stored in the state before. Therefore, I compute these values in EvaluateLogicalExpression and store them in the state. I didn't try to figure out which values will be really needed, so I just stored all of them (not really all, only those that were actually computed on this path).</div>
<div><br></div><div> Now that I think about it, I think it should be possible to just mark the leaves -- the relevant non-leaf expressions should be marked as live when we visit the corresponding terminator.</div><div><br>
</div><div>I am not sure which part are you having doubts about. Could you describe it more verbosely?</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 14 August 2013 20:44, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
  I see that, but since you still need to record the explicit choice for each BinaryOperator in the state, why do you need the leaves?<br>
<br>
  (Sorry, I didn't remember that some leaves could be Unknown, which makes everything fall apart.)<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D1340" target="_blank">http://llvm-reviews.chandlerc.com/D1340</a><br>
</blockquote></div><br></div>