[PATCH] D120327: compiler-rt: Add udivmodei5 to builtins and add bitint library

Matthias Gehre via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 5 00:47:00 PDT 2022


mgehre-amd added a comment.

In D120327#3492053 <https://reviews.llvm.org/D120327#3492053>, @efriedma wrote:

> Instead of putting the `__divmodei5`/`__udivmodei5` routines in compiler-rt, can we just make the backend embed them into the object file?

I agree for smaller builtin function. Here, I would need to check how much LLVM IR is necessary. I think it can be cut down significantly if we generate a specialized
division function for each bitwidth, but it would increase the overall program size when using multiple different bit width.
And the approach would also increase the size of every object file using the large division and make the linker work harder in removing those duplicated functions.

Is there an existing intrinsic/LLVM instruction for which LLVM embeds a call in the object file today?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120327/new/

https://reviews.llvm.org/D120327



More information about the llvm-commits mailing list