[PATCH] D120327: compiler-rt: Add udivmodei5 to builtins and add bitint library
Jacob Lifshay via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 09:15:57 PDT 2022
programmerjake added a comment.
In D120327#3398754 <https://reviews.llvm.org/D120327#3398754>, @FreddyYe wrote:
> So everyone is OK with use malloc(), right? That was my biggest concern.
imho if at all possible, the temporary buffers should be passed in from the caller rather than malloc-ed, that way they can be allocated on the stack (or heap, or somewhere else) by the caller who knows exactly how big they should be and can have them be a local variable -- no dynamic alloca or malloc needed. This would allow using >128-bit ints on embedded systems without malloc, and also allows the caller to use the same temporary for multiple division operations, rather than having to call the memory allocator every time.
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