This is an archive of the discontinued LLVM Phabricator instance.

Refactor collectChildrenInLoop to LoopUtils [NFC]
ClosedPublic

Authored by asbirlea on Sep 14 2017, 2:34 PM.

Details

Summary

Move to LoopUtils method that collects all children of a node inside a loop.

Event Timeline

asbirlea created this revision.Sep 14 2017, 2:34 PM
sanjoy accepted this revision.Sep 14 2017, 2:49 PM

LGTM

I added a couple of stylistic issues that were present in the earlier function. I'll leave it up to you if you want to fix these.

lib/Transforms/Utils/LoopUtils.cpp
1124

LLVM style is AddRegionToWorklist.

1133

For integer loop counters, I've usually seem LLVM use i instead of I.

1135

This can probably be for (DomTreeNode *Child : Worklist[i]), at which point the { braces won't be needed either.

This revision is now accepted and ready to land.Sep 14 2017, 2:49 PM
asbirlea updated this revision to Diff 115302.Sep 14 2017, 3:16 PM

Address comments.

asbirlea marked 2 inline comments as done.Sep 14 2017, 3:24 PM
asbirlea added inline comments.
lib/Transforms/Utils/LoopUtils.cpp
1133

That's true. I've seen both. Keeping I per the variable style guide.

This revision was automatically updated to reflect the committed changes.