[all-commits] [llvm/llvm-project] 105ff1: [RISCV] Change RISCVABI::computeTargetABI() to ret...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Fri Sep 11 13:42:05 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 105ff16f816ffdce14b1d4895d8584971ef5192c
      https://github.com/llvm/llvm-project/commit/105ff16f816ffdce14b1d4895d8584971ef5192c
  Author: Alexander Richardson <alexrichardson at google.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M lld/test/ELF/lto/riscv-target-abi.ll
    M llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVSubtarget.cpp
    M llvm/test/CodeGen/RISCV/subtarget-features-std-ext.ll
    M llvm/test/CodeGen/RISCV/target-abi-invalid.ll
    M llvm/test/MC/RISCV/target-abi-invalid.s
    M llvm/unittests/Target/RISCV/RISCVBaseInfoTest.cpp

  Log Message:
  -----------
  [RISCV] Change RISCVABI::computeTargetABI() to return Expected<ABI>

Return Expected<ABI> instead of printing to errs()/reportFatalUsageError
internally, so callers decide whether to fall back to the default ABI
or treat the failure as fatal, and so it's unit-testable. Also fold the
duplicated Hard-float 'f'/'d' ABI checks from RISCVAsmParser.cpp and
RISCVISelLowering.cpp into computeTargetABI(), and add RISCVBaseInfoTest
coverage for the error paths.

This change was created with the help of AI tools

Reviewed By: lenary

Pull Request: https://github.com/llvm/llvm-project/pull/213410



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list