This is an archive of the discontinued LLVM Phabricator instance.

NFC: refactor replaceDominatedUsesWith
ClosedPublic

Authored by Prazek on May 3 2017, 4:44 AM.

Details

Summary

Since I will post patch with some changes to
replaceDominatedUsesWith, it would be good to avoid
duplicating code again.

Diff Detail

Repository
rL LLVM

Event Timeline

Prazek created this revision.May 3 2017, 4:44 AM
Prazek updated this revision to Diff 97606.May 3 2017, 4:51 AM

Add early exit. I also tried to change the iterators for
range, but this would change the behavior (and it would crash)

davide requested changes to this revision.May 3 2017, 10:43 AM

I'm fine with this refactoring, but I'd like to understand what's your long(er) term plan for this first?

This revision now requires changes to proceed.May 3 2017, 10:43 AM
Prazek added a comment.May 5 2017, 2:38 PM

I'm fine with this refactoring, but I'd like to understand what's your long(er) term plan for this first?

I am not sure how it will go, because I've found the flaw in my idea when writing this. Check out my recent post on mailing list.
Anyway, even if I won't gonna change this code later, I think it make sense to do the refactor.

davide accepted this revision.May 9 2017, 12:16 PM

LGTM.

This revision is now accepted and ready to land.May 9 2017, 12:16 PM
This revision was automatically updated to reflect the committed changes.