When porting statmemprof to the flambda2 branch, I noticed a few places where the current testsuite is relying on details of the compiler that are not particularly stable (whether certain functions are inlined, how much CSE occurs, etc.). So, this PR contains a few tweaks to the statmemprof testsuite to try to make it more independent of these details.
comballoc: Remove use of List.iter to be independent of inlining
comballoc: Ensure f5 is never inlined
custom: Fix minor heap size
exception_comballoc: Prevent CSE reducing allocations in f33
lists_in_minor: Prevent allocation being optimised away
moved_while_blocking: Remove workaround for unnecessary allocation
The last of these (the moved_while_blocking workaround) also makes a small change to the runtime, to remove an unnecessary allocation in bytecode that the testsuite was picking up and working around. (This change only affects bytecode, since native code already avoided the allocation through a different means)
When porting statmemprof to the flambda2 branch, I noticed a few places where the current testsuite is relying on details of the compiler that are not particularly stable (whether certain functions are inlined, how much CSE occurs, etc.). So, this PR contains a few tweaks to the statmemprof testsuite to try to make it more independent of these details.
The last of these (the moved_while_blocking workaround) also makes a small change to the runtime, to remove an unnecessary allocation in bytecode that the testsuite was picking up and working around. (This change only affects bytecode, since native code already avoided the allocation through a different means)
cc @NickBarnes