summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmExtCode.hs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-04-22 19:48:06 +0100
committerIan Lynagh <ian@well-typed.com>2013-04-23 20:24:10 +0100
commitb49307f5b69a3ee9c7d1bcaf9d0dec3c9b3c2440 (patch)
treeb2f268c9fe1970fb3e96cd0a8d6a7866188bd258 /compiler/codeGen/StgCmmExtCode.hs
parenta496e9aa5f248d950e39181f530cfb8ef15ecdf0 (diff)
downloadhaskell-b49307f5b69a3ee9c7d1bcaf9d0dec3c9b3c2440.tar.gz
Don't duplicate decls unnecessarily in the environment
In loopDecls, as far as I can see the globalDecls will always already be in the environment, so don't add them again.
Diffstat (limited to 'compiler/codeGen/StgCmmExtCode.hs')
-rw-r--r--compiler/codeGen/StgCmmExtCode.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/codeGen/StgCmmExtCode.hs b/compiler/codeGen/StgCmmExtCode.hs
index 941fef0e3b..2c36442639 100644
--- a/compiler/codeGen/StgCmmExtCode.hs
+++ b/compiler/codeGen/StgCmmExtCode.hs
@@ -94,7 +94,7 @@ instance HasDynFlags CmmParse where
loopDecls :: CmmParse a -> CmmParse a
loopDecls (EC fcode) =
EC $ \e globalDecls -> do
- (_, a) <- F.fixC (\ ~(decls, _) -> fcode (addListToUFM e (decls ++ globalDecls)) globalDecls)
+ (_, a) <- F.fixC (\ ~(decls, _) -> fcode (addListToUFM e decls) globalDecls)
return (globalDecls, a)