base: Make Foreign.Marshal.Alloc.allocBytes[Aligned] NOINLINE

Authored by bgamari on Oct 24 2017, 11:19 AM.

Description

base: Make Foreign.Marshal.Alloc.allocBytes[Aligned] NOINLINE

As noted in Trac #14346, touch# may be optimized away when the simplifier can see
that the continuation passed to allocaBytes will not return. Marking CPS-style
functions with NOINLINE ensures that the simplier can't draw any unsound
conclusions.

Ultimately the right solution here will be to do away with touch# and instead
introduce a scoped primitive as is suggested in Trac #14375.

Note: This was present in 8.2 but was never merged to 8.4 in hopes that
we would have Trac #14375 implemented in time. This meant that the issue
regressed again in 8.4. Thankfully we caught it in time to fix it for
8.6.

(cherry picked from commit 404bf05ed3193e918875cd2f6c95ae0da5989be2)