StgCmmForeign: Push local register creation into code generation
authorBen Gamari <bgamari.foss@gmail.com>
Tue, 5 Jan 2016 21:10:28 +0000 (22:10 +0100)
committerBen Gamari <ben@smart-cactus.org>
Tue, 5 Jan 2016 21:10:28 +0000 (22:10 +0100)
commitbbee3e167b79d66d4a5973ea1242e2f02c2ddf13
tree49e1ba383a2642755ffb5812d9b5a4824dd2a115
parente32a6e1f4ac847272598776fd15f4a98069690e5
StgCmmForeign: Push local register creation into code generation

The interfaces to {save,load}ThreadState were quite messy due to the
need to pass in local registers (produced with draws from a unique
supply) since they were used from both FCode and UniqSM.

This, however, is entirely unnecessary as we already have an
abstraction to capture this effect: MonadUnique. Use it.

This is part of an effort to properly represent stack unwinding
information
for foreign calls.

Test Plan: validate

Reviewers: austin, simonmar

Reviewed By: simonmar

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1733
compiler/cmm/CmmLayoutStack.hs
compiler/codeGen/StgCmmForeign.hs
compiler/codeGen/StgCmmMonad.hs
compiler/codeGen/StgCmmUtils.hs