[OCaml] Omit unnecessary GC root registrations
authorJosh Berdine <josh@berdine.net>
Sun, 28 Mar 2021 20:54:25 +0000 (21:54 +0100)
committerJosh Berdine <josh@berdine.net>
Mon, 5 Apr 2021 09:55:07 +0000 (10:55 +0100)
commitd9bbd9864578204fb0bdeea685d0bcfda2f0aecf
tree60abbddfea875ecfbb9da7ff013ddbc48db2caea
parent2c82ea1849dc77eedeedb59a73c870717229ed37
[OCaml] Omit unnecessary GC root registrations

The current code does not follow the simple interface to the OCaml GC,
where GC roots are registered conservatively, only initializing
allocations are performed, etc. This is intentional, as stated in the
opening file comments. On the other hand, the current code does
register GC roots in many situations where it is not strictly
necessary. This diff omits many of them.

Differential Revision: https://reviews.llvm.org/D99475
llvm/bindings/ocaml/llvm/llvm_ocaml.c