This is an archive of the discontinued LLVM Phabricator instance.

[LoopUtils] Make duplicate method a utility. [NFCI]
ClosedPublic

Authored by asbirlea on Jan 28 2020, 11:22 AM.

Details

Summary

Method appendLoopsToWorklist is duplicate in LoopUnroll and in the
LoopPassManager as an internal method. Make it an utility.

Diff Detail

Event Timeline

asbirlea created this revision.Jan 28 2020, 11:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2020, 11:22 AM

Unit tests: pass. 62278 tests passed, 0 failed and 827 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

hjyamauchi added inline comments.Jan 31 2020, 12:55 PM
llvm/lib/Transforms/Utils/LoopUtils.cpp
1482

It seems like there's a double reverse for the LI version. I don't know if it'd be optimized away or would matter, but would there be a way to avoid double reverse? For example, by having a shared internal version of appendLoopsToWorklist which doesn't do any reversing internally and the RangeT version does a reverse before calling it and the LoopInfo version does no reverse?

asbirlea updated this revision to Diff 241818.Jan 31 2020, 2:37 PM
asbirlea marked an inline comment as done.

Updated to address comment.

Unit tests: pass. 62375 tests passed, 0 failed and 839 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

This revision is now accepted and ready to land.Jan 31 2020, 4:05 PM
This revision was automatically updated to reflect the committed changes.