[PATCH] WIP Fix for temporary destructors in conditionals

Jordan Rose jordan_rose at apple.com
Mon Aug 5 17:31:59 PDT 2013


  I downloaded this patch and rebuilt, and this already doesn't pass the destructors::testConsistency test in temporaries.cpp. That might match your "I don't think the patch is complete yet".

  More importantly, however, your test case doesn't actually trigger the environment cleanup. Try adding a trivial inlined function ("return true") and I think you'll see there's a problem. Liveness isn't cumulative as you go backwards; it's more like a flashlight, where a small set of live things are true. We're not currently taking so much advantage of this, but it's convenient to know the difference between an expression that //happens// not to have a value and one that //should// not have a value.

  ```if (isa<Expr>(S)) {
    val.liveStmts = LV.SSetFact.remove(val.liveStmts, S);
  }```

  I'd be happy if your conjecture does turn out to be true (and admit that LiveVariables was written a long time ago and so my mental model is rusty), but I think it's going to turn out to be more work than that.

http://llvm-reviews.chandlerc.com/D1259



More information about the cfe-commits mailing list