Commit 8707911a authored by Gabor Greif's avatar Gabor Greif 💬

Minor performance optimisation

only concat once
parent 4343d5af
{-# LANGUAGE CPP, TypeFamilies #-}
{-# LANGUAGE CPP, TypeFamilies, ViewPatterns #-}
-- -----------------------------------------------------------------------------
-- | This is the top-level module in the LLVM code generator.
......@@ -125,13 +125,13 @@ cmmDataLlvmGens :: [(Section,CmmStatics)] -> LlvmM ()
cmmDataLlvmGens statics
= do lmdatas <- mapM genLlvmData statics
let (gss, tss) = unzip lmdatas
let (concat -> gs, tss) = unzip lmdatas
let regGlobal (LMGlobal (LMGlobalVar l ty _ _ _ _) _)
= funInsert l ty
regGlobal _ = return ()
mapM_ regGlobal (concat gss)
gss' <- mapM aliasify $ concat gss
regGlobal _ = pure ()
mapM_ regGlobal gs
gss' <- mapM aliasify $ gs
renderLlvm $ pprLlvmData (concat gss', concat tss)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment