[PATCH] D64485: [MIPS GlobalISel] RegBankSelect for chains of ambiguous instructions
Simon Atanasyan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 23:10:11 PDT 2019
atanasyan accepted this revision.
atanasyan added a comment.
This revision is now accepted and ready to land.
LGTM with a nit
================
Comment at: lib/Target/Mips/MipsRegisterBankInfo.cpp:235
+ return true;
+ } else {
+ // Excluding WaitingForTypeOfMI, MI is either connected to chains of
----------------
Please remove "else-after-return".
================
Comment at: lib/Target/Mips/MipsRegisterBankInfo.cpp:268
if (isAmbiguous(AdjMI->getOpcode())) {
+ // When AdjMI was visited first, MI has to continue to explore remaining
----------------
The same code with less `continue` statements.
```
// Defaults to integer instruction. Includes G_MERGE_VALUES and
// G_UNMERGE_VALUES.
if (!isAmbiguous(AdjMI->getOpcode())) {
setTypes(MI, InstType::Integer);
return true;
}
// When AdjMI was visited first, MI has to continue to explore remaining
// adjacent instructions and determine InstType without visiting AdjMI.
if (!wasVisited(AdjMI) ||
getRecordedTypeForInstr(AdjMI) != InstType::NotDetermined) {
if (visit(AdjMI, MI)) {
// InstType is successfully determined and is same as for AdjMI.
setTypes(MI, getRecordedTypeForInstr(AdjMI));
return true;
}
}
```
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64485/new/
https://reviews.llvm.org/D64485
More information about the llvm-commits
mailing list