[llvm] [Attributor] Teach HeapToStack about conservative GC allocators (PR #113299)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 24 00:51:48 PDT 2024
aykevl wrote:
Ok.
> I am not entirely sure about the "nofree" `allockind`. This means that memory returned by the allocator will _never_ be explicitly freed. Instead, it might be better to use the `nofree` parameter attribute on the return value (which is currently not allowed). This way, the attribute can be added to a call site and each call site can opt into the "no explicit free" behavior if the compiler knows this particular allocation is never explicitly freed. What do you think?
What do you think about this? I've come to prefer this, for added flexibility. If you agree I can update the PR (or split it in two as requested depending on how it works out) to use `nofree` on the return value, similar to how `align` on the return value is currently used to set the alignment of the alloca instruction.
https://github.com/llvm/llvm-project/pull/113299
More information about the llvm-commits
mailing list