This is an archive of the discontinued LLVM Phabricator instance.

[NFC][PowerPC] Refactor ppcUserFeaturesCheck()
ClosedPublic

Authored by lei on Apr 16 2020, 9:54 AM.

Details

Reviewers
nemanjai
stefanp
jsji
Group Reviewers
Restricted Project
Commits
rG10b60dde7670: [PowerPC] Refactor ppcUserFeaturesCheck()
Summary

This function keeps growing, refactor to use lambda.

Diff Detail

Event Timeline

lei created this revision.Apr 16 2020, 9:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 16 2020, 9:54 AM
jsji added a reviewer: Restricted Project.Apr 16 2020, 10:26 AM
jsji added a project: Restricted Project.
lei updated this revision to Diff 258119.Apr 16 2020, 11:55 AM
This comment was removed by lei.
lei updated this revision to Diff 258121.Apr 16 2020, 12:02 PM
This comment was removed by lei.
lei updated this revision to Diff 258175.Apr 16 2020, 2:33 PM

updated.

nemanjai accepted this revision.Apr 16 2020, 6:14 PM

LGTM. Thanks for refactoring this.

This revision is now accepted and ready to land.Apr 16 2020, 6:14 PM
jsji added a subscriber: jsji.Apr 16 2020, 7:44 PM
jsji added inline comments.
clang/lib/Basic/Targets/PPC.cpp
240

Looks like this is will cause behavior change.. And NOT NFC at all..

Before refactor, we will return false when *ANY* of the subfeature is ON.
After refactor, we will only return false, when *ALL* of the subfeature are ON, Passed will be set to true when any of subfeature are off .

Can you please double check?

lei marked an inline comment as done.Apr 17 2020, 10:26 AM
lei added inline comments.
clang/lib/Basic/Targets/PPC.cpp
240

You are right... will post an update.

lei updated this revision to Diff 258375.Apr 17 2020, 11:00 AM

Address review comments

jsji accepted this revision.Apr 17 2020, 11:07 AM

LGTM. Since there is an improvement for multi errors, we should remove [NFC] in title and commit messages. Thanks.

This revision was automatically updated to reflect the committed changes.
lei marked an inline comment as done.