This is an archive of the discontinued LLVM Phabricator instance.

[CodeGenPrepare][NFC] Rename TargetTransformInfo::expandMemCmp -> TargetTransformInfo::enableMemCmpExpansion.
ClosedPublic

Authored by courbet on Sep 22 2017, 1:40 AM.

Details

Summary

Right now there are two functions with the same name, one does the work
and the other one returns true if expansion is needed. Rename
TargetTransformInfo::expandMemCmp to make it more consistent with other
members of TargetTransformInfo.

Remove the unused Instruction* parameter.

Event Timeline

courbet created this revision.Sep 22 2017, 1:40 AM
courbet updated this revision to Diff 116336.Sep 22 2017, 5:40 AM

Fix CRTP dispatch.

nemanjai accepted this revision.Sep 22 2017, 11:39 AM

Yeah, the new name makes a lot more sense. LGTM.

include/llvm/Analysis/TargetTransformInfo.h
551

The idea with providing the instruction initially was to allow the target to choose which instances of memcmp to expand. But I agree that since it isn't used now, it should be removed. If we want to use it in the future, we can add it back.

This revision is now accepted and ready to land.Sep 22 2017, 11:39 AM
courbet marked an inline comment as done.Sep 24 2017, 11:32 PM

Thanks.

include/llvm/Analysis/TargetTransformInfo.h
551

Thanks for the explanation.

courbet closed this revision.Sep 25 2017, 4:17 AM
courbet marked an inline comment as done.

Landed as rL314096.