[PATCH] D102839: [RISCV][Clang] Add -mno-idiv option to disable hardware int division
ksyx via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 20 03:56:39 PDT 2021
ksyx created this revision.
ksyx added reviewers: asb, rsmith, shiva0217.
Herald added subscribers: vkmr, frasercrmck, dang, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya.
ksyx requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, MaskRay.
Herald added projects: clang, LLVM.
With option `-mno-idiv`, hardware integral division and modulus instructions in M extension will be disabled, while leaving multiply instructions enabled.
I am not sure whether there is a better way of implementing this, so please point out if there is one, thanks.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102839
Files:
clang/include/clang/Driver/Options.td
clang/lib/Basic/Targets/RISCV.cpp
clang/lib/Basic/Targets/RISCV.h
clang/lib/Driver/ToolChains/Arch/RISCV.cpp
clang/test/Driver/riscv-no-idiv.c
llvm/lib/Target/RISCV/RISCV.td
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVInstrInfoM.td
llvm/lib/Target/RISCV/RISCVSubtarget.h
llvm/test/CodeGen/RISCV/no-idiv.ll
llvm/test/MC/RISCV/rv32m-no-idiv-div.s
llvm/test/MC/RISCV/rv32m-no-idiv-mul.s
llvm/test/MC/RISCV/rv64m-no-idiv-div.s
llvm/test/MC/RISCV/rv64m-no-idiv-mul.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102839.346687.patch
Type: text/x-patch
Size: 15606 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210520/30e11b16/attachment.bin>
More information about the llvm-commits
mailing list