The new code should hopefully be equivalent to the old code; it just uses a worklist to track instructions which need to visited rather than iterating over all instructions visited each time. This should be faster, but the primary benefit is that the purpose should be more clear and the diff of adding another instruction type (forthcoming) much more obvious.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | ||
---|---|---|
731 ↗ | (On Diff #30538) | Why does this need to be a SetVector (as opposed to some variant of a set)? |
734 ↗ | (On Diff #30538) | I'd put an assert(!isKnownBaseResult(Base)) to make it obvious what's going on. |
750 ↗ | (On Diff #30538) | insert (for SetVector and other set variants) returns a bool stating if the value was present in the set. So you don't need to call both .count and .insert. |