This is an archive of the discontinued LLVM Phabricator instance.

[Instruction] add moveAfter() convenience function; NFCI
ClosedPublic

Authored by spatel on Aug 28 2017, 5:15 PM.

Diff Detail

Event Timeline

spatel created this revision.Aug 28 2017, 5:15 PM
dberlin added inline comments.Aug 28 2017, 5:28 PM
lib/IR/Instruction.cpp
105

I believe you can just use moveBefore(*MovePos->getParent(), ++MovePos->getIterator());

(Which should be a bit more efficient, and also will match the moveBefore code)

spatel updated this revision to Diff 113086.Aug 29 2017, 6:51 AM
spatel marked an inline comment as done.

Patch updated:
Implement moveAfter with moveBefore for symmetry and efficiency.

fhahn accepted this revision.Aug 29 2017, 7:00 AM
fhahn added a subscriber: fhahn.

LGTM, I haven't done much work in this area but @dberlin's comment has been addressed and it looks like a straight forward NFC.

This revision is now accepted and ready to land.Aug 29 2017, 7:00 AM
This revision was automatically updated to reflect the committed changes.