[all-commits] [llvm/llvm-project] 41e9c4: [NFC][Outliner] Delete default ctors for Candidate...

Amara Emerson via All-commits all-commits at lists.llvm.org
Mon Mar 20 11:17:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41e9c4b88c28b0a6f3820b45000cedeced89206c
      https://github.com/llvm/llvm-project/commit/41e9c4b88c28b0a6f3820b45000cedeced89206c
  Author: Amara Emerson <amara at apple.com>
  Date:   2023-03-20 (Mon, 20 Mar 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachineOutliner.h
    M llvm/include/llvm/CodeGen/TargetInstrInfo.h
    M llvm/lib/CodeGen/MachineOutliner.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.h
    M llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
    M llvm/lib/Target/ARM/ARMBaseInstrInfo.h
    M llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
    M llvm/lib/Target/RISCV/RISCVInstrInfo.h
    M llvm/lib/Target/X86/X86InstrInfo.cpp
    M llvm/lib/Target/X86/X86InstrInfo.h

  Log Message:
  -----------
  [NFC][Outliner] Delete default ctors for Candidate & OutlinedFunction.

I think it's good practice to avoid having default ctors unless they're really
valid/useful. For OutlinedFunction the default ctor was used to represent a
bail-out value for getOutliningCandidateInfo(), so I changed the API to return
an optional<getOutliningCandidateInfo> instead which seems a tad cleaner.

Differential Revision: https://reviews.llvm.org/D146375




More information about the All-commits mailing list