[all-commits] [llvm/llvm-project] 07f0fa: [NFC][Scheduler] Refactor tryCandidate to return b...

Qiu Chaofan via All-commits all-commits at lists.llvm.org
Wed Jun 30 23:36:27 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 07f0faed1156e6ffe6b7df240ef422bd3adb9812
      https://github.com/llvm/llvm-project/commit/07f0faed1156e6ffe6b7df240ef422bd3adb9812
  Author: Qiu Chaofan <qiucofan at cn.ibm.com>
  Date:   2021-07-01 (Thu, 01 Jul 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachineScheduler.h
    M llvm/lib/CodeGen/MachineScheduler.cpp
    M llvm/lib/Target/PowerPC/PPCMachineScheduler.cpp
    M llvm/lib/Target/PowerPC/PPCMachineScheduler.h

  Log Message:
  -----------
  [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




More information about the All-commits mailing list