This is an archive of the discontinued LLVM Phabricator instance.

[NFC][PowerPC] Refactor the tryAndWithMask()
ClosedPublic

Authored by steven.zhang on Jan 6 2020, 2:28 AM.

Details

Summary

This NFC patch is to address to comments of https://reviews.llvm.org/D71693 to split the tryAndWithMask into several small calls.

Diff Detail

Event Timeline

steven.zhang created this revision.Jan 6 2020, 2:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2020, 2:28 AM
lkail set the repository for this revision to rG LLVM Github Monorepo.Jan 6 2020, 7:08 PM
amyk added a comment.Jan 17 2020, 3:46 PM

Just some minor comments, I think it overall LGTM but am curious in knowing any comments from others.

llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
4370

Just curious, but any reason on why we split up the declaration of variables? I mean since the original had Imm, SH, MB, ME declared together?

4384

Unnecessary whitespace change between { } (also seen in other places for SDValue Ops[] brackets as well)?

4413

I think it would be more clear if it is read, ". . . replace the contents of [0 - 32) with [32 - 64) even if we didn't rotate it.

4750

I think it would still be valuable to have a comment here to document this case with AND.

steven.zhang marked 2 inline comments as done.Feb 9 2020, 5:57 PM
steven.zhang added inline comments.
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
4370

Personally, I prefer to move the declaration to the places that where it is really needed to make it more clear instead of declare all the declaration first.

4384

That was done by clang format. I will update other places that has extra spaces.

steven.zhang added a project: Restricted Project.

Address comments.

shchenz accepted this revision.Feb 16 2020, 6:51 PM

LGTM. Thanks for refactoring this.

This revision is now accepted and ready to land.Feb 16 2020, 6:51 PM

I will hold on for several days in case someone else has more comments.

amyk accepted this revision.Feb 23 2020, 7:33 PM

I think this overall LGTM for the refactoring.

This revision was automatically updated to reflect the committed changes.