[NFC][Scheduler] Refactor tryCandidate to return boolean
authorQiu Chaofan <qiucofan@cn.ibm.com>
Thu, 1 Jul 2021 06:31:47 +0000 (14:31 +0800)
committerQiu Chaofan <qiucofan@cn.ibm.com>
Thu, 1 Jul 2021 06:31:47 +0000 (14:31 +0800)
commit07f0faed1156e6ffe6b7df240ef422bd3adb9812
tree6fc288ef517154242619138b0e6b8d8962fe1cfb
parentb9c24257c7b4da398798934ffefdd30015152180
[NFC][Scheduler] Refactor tryCandidate to return boolean

This patch changes return type of tryCandidate from void to bool:

1. Methods in some targets already follow this convention.
2. This would help if some target wants to re-use generic code.
3. It looks more intuitive if these try-method returns the same type.

We may need to change return type of them from bool to some enum
further, to make it less confusing.

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D103951
llvm/include/llvm/CodeGen/MachineScheduler.h
llvm/lib/CodeGen/MachineScheduler.cpp
llvm/lib/Target/PowerPC/PPCMachineScheduler.cpp
llvm/lib/Target/PowerPC/PPCMachineScheduler.h