This is an archive of the discontinued LLVM Phabricator instance.

[HardwareLoops] NFC - move loop with irreducible control flow checking logic to isHardwareLoopProfitable()
ClosedPublic

Authored by shchenz on Jun 25 2019, 9:51 PM.

Details

Summary

This is a NFC patch.

Moving the codes to isHardwareLoopProfitable() can avoid duplicated codes for HardwareLoops::TryConvertLoop() and the new added target hook canSaveCmp() in https://reviews.llvm.org/D63477

Diff Detail

Event Timeline

shchenz created this revision.Jun 25 2019, 9:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 25 2019, 9:51 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
samparker accepted this revision.Jun 26 2019, 12:27 AM

LGTM, thanks.

This revision is now accepted and ready to land.Jun 26 2019, 12:27 AM

codes moved to class TargetTransformInfo can not be called by both class HardwareLoops and class PPCTargetTransformInfo.
Move the code to class HardwareLoopInfo in NFC patch https://reviews.llvm.org/rL364415. FYI @samparker