[PATCH] D71693: [NFC][PowerPC] Add a function tryAndWithMask
qshanz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 2 18:44:12 PST 2020
steven.zhang added a comment.
Yes, it is just moving the code into a new function to avoid too much code in the switch case. And it is definition more clear if moving the condition into small functions. As there are several different conditions that could produce the same instruction with different arguments. I will do it as follows.
bool tryAndWithMask(...) {
if (tryCodeGenAsSingleRLWINM())
return true;
if (tryCodeGenAsPairRLWINM())
return true;
...
}
Maybe, the tryAndWithMask is NOT needed if we move the small pieces of code into functions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71693/new/
https://reviews.llvm.org/D71693
More information about the llvm-commits
mailing list