This is an archive of the discontinued LLVM Phabricator instance.

Codegen: Factor tail duplication into a utility class. NFC
ClosedPublic

Authored by iteratee on Mar 23 2016, 11:51 AM.

Details

Reviewers
echristo
Summary

This is in preparation for tail duplication during block placement. See D18226.
This needs to be a utility class for 2 reasons. No passes may run after block
placement, and also, tail-duplication affects subsequent layout decisions, so
it must be interleaved with placement, and can't be separated out into its own
pass. The original pass is still useful, and now runs by delegating to the
utility class.

Diff Detail

Event Timeline

iteratee updated this revision to Diff 51456.Mar 23 2016, 11:51 AM
iteratee retitled this revision from to Codegen: Factor tail duplication into a utility class. NFC.
iteratee updated this object.
iteratee set the repository for this revision to rL LLVM.
iteratee added subscribers: llvm-commits, timshen, chandlerc.
echristo edited edge metadata.Mar 23 2016, 2:54 PM

Please clang format :)

One inline comment as well.

Question: Is your next patch going to call this from another pass? If so, I think it makes sense to pull it out from TailDuplication.cpp (yes, leaving that as one of the most boring passes in existence). If not, then I think it's fine as is.

Thanks!

-eric

include/llvm/CodeGen/TailDuplicator.h
2

Ahem.

iteratee updated this revision to Diff 52993.Apr 7 2016, 9:09 PM
iteratee edited edge metadata.
iteratee removed rL LLVM as the repository for this revision.

clang-format and split into 2 separate files as requested.

Sorry about the delay, was attempting to get performance numbers for the following change.

echristo accepted this revision.Apr 8 2016, 1:26 AM
echristo edited edge metadata.

One inline comment, otherwise I'm assuming this is just copying from one location to another and running clang-format on the resulting files :)

-eric

include/llvm/CodeGen/TailDuplicator.h
3

Still missed the comment here :)

This revision is now accepted and ready to land.Apr 8 2016, 1:26 AM
iteratee updated this revision to Diff 53052.Apr 8 2016, 11:43 AM
iteratee edited edge metadata.
iteratee marked 2 inline comments as done.

Comment fixed.