X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdriver%2Fordering-passes;h=305f3f06b48523101c5101c3306a89cdda80a411;hb=57d3c7c8a8523e375d49d2ac036210b6dcf7ec9c;hp=2f2c579f83693cbe72ffe3533bd748c21b0e95e3;hpb=e7d21ee4f8ac907665a7e170c71d59e13a01da09;p=ghc-hetmet.git diff --git a/ghc/driver/ordering-passes b/ghc/driver/ordering-passes index 2f2c579..305f3f0 100644 --- a/ghc/driver/ordering-passes +++ b/ghc/driver/ordering-passes @@ -243,15 +243,15 @@ f_worker a b c d = let x = (a,b) True -> (x,x) False -> ((1,1),(2,2)) -in this case the simplifier will remove the binding for y -as it is not used (we expected this to happen very often, but we do -not know how many "reboxers" are eventually removed and how many are -kept), and will keep the binding for x. -But notice that x is only used in *one* of the branches in the case, -but is always being allocated! The floating inwards pass would push -its definition into the True branch. +in this case the simplifier will remove the binding for y as it is not +used (we expected this to happen very often, but we do not know how +many "reboxers" are eventually removed and how many are kept), and +will keep the binding for x. But notice that x is only used in *one* +of the branches in the case, but is always being allocated! The +floating inwards pass would push its definition into the True branch. A similar benefit occurs if it is only used inside a let definition. These are basically the advantages of floating inwards, but they are -only exposed after the S.A./worker-wrapperisation of the code! -As we also have reasons to float inwards before S.A. we have to run it twice. +only exposed after the S.A./worker-wrapperisation of the code! As we +also have reasons to float inwards before S.A. we have to run it +twice.