This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] add a new subtarget feature FastMFLR
ClosedPublic

Authored by shchenz on Nov 7 2022, 10:43 PM.

Details

Reviewers
RolandF
Group Reviewers
Restricted Project
Commits
rG454758ab6931: [PowerPC] add a new subtarget feature fastMFLR
Summary

This is to address code review comments in https://reviews.llvm.org/D137423#3912332

Add a new subtarget feature FastMFLR, so that we don't reply on ISA version to check a processor level feature.

This caller of this new feature is in D137423 and the tests are also there.

Diff Detail

Event Timeline

shchenz created this revision.Nov 7 2022, 10:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 7 2022, 10:43 PM
shchenz requested review of this revision.Nov 7 2022, 10:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 7 2022, 10:43 PM
RolandF added inline comments.Nov 8 2022, 12:48 PM
llvm/lib/Target/PowerPC/PPC.td
320

I would suggest fast-MFLR rather than cheap-MFLR, and for the description I would suggest "MFLR is a fast instruction"

llvm/lib/Target/PowerPC/PPCSubtarget.h
443

As this function has only a return, it can be a one line function and be put with the other one line functions.

shchenz updated this revision to Diff 474123.Nov 8 2022, 5:32 PM
shchenz retitled this revision from [PowerPC] add a new subtarget feature CheapMFLR to [PowerPC] add a new subtarget feature FastMFLR.
shchenz edited the summary of this revision. (Show Details)

address comments

shchenz marked 2 inline comments as done.Nov 8 2022, 5:32 PM
RolandF accepted this revision.Nov 9 2022, 7:13 AM

LGTM

This revision is now accepted and ready to land.Nov 9 2022, 7:13 AM
This revision was automatically updated to reflect the committed changes.