Fix a bug in change 246133. I didn't handle the case where we had a cycle in the use graph and could add an instruction we were about to erase back on to the worklist. Oddly, I have not been able to write a small test case for this, even with the AssertingVH added. I have confirmed the basic theory for the fix on a large failing example, but all attempts to reduce that to something appropriate for a test case have failed.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
lgtm with minor nits inline.
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | ||
---|---|---|
616 ↗ | (On Diff #33863) | Not directly related to this change, but does this invariant actually hold? We're constructing a BDVState below with status == Conflict and a non-nullptr base. |
1048 ↗ | (On Diff #33863) | Can there be non Instruction uses of BaseI. If not, maybe this should be a cast<>? |
1056 ↗ | (On Diff #33863) | Can we assert states.count(BDV) here? Or maybe even states[BDV].base == BaseI? |
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | ||
---|---|---|
616 ↗ | (On Diff #33863) | The comment does need updated. Actually, I think I should just extend the Status enum to include a new state because that's really what this is. |
1048 ↗ | (On Diff #33863) | I'm not sure about metadata and other weird values. I'd prefer to leave this as is. |
1056 ↗ | (On Diff #33863) | Yep, will do. |