summaryrefslogtreecommitdiff
path: root/compiler/GHC/CmmToAsm/X86
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-12-16 17:19:44 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-17 21:26:24 -0500
commit9529d859fef6fe353081588ba96257519a20728a (patch)
tree1d1e7aca75bf23e415a92b7536e8ddf8bdba0246 /compiler/GHC/CmmToAsm/X86
parenta3552934a559ed8813dabc640f5dec0689d62f9e (diff)
downloadhaskell-9529d859fef6fe353081588ba96257519a20728a.tar.gz
Perf: avoid using (replicateM . length) when possible
Extracted from !6622
Diffstat (limited to 'compiler/GHC/CmmToAsm/X86')
-rw-r--r--compiler/GHC/CmmToAsm/X86/Instr.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/GHC/CmmToAsm/X86/Instr.hs b/compiler/GHC/CmmToAsm/X86/Instr.hs
index 6418144bb8..e055fafb61 100644
--- a/compiler/GHC/CmmToAsm/X86/Instr.hs
+++ b/compiler/GHC/CmmToAsm/X86/Instr.hs
@@ -66,7 +66,6 @@ import GHC.Types.Unique.Supply
import GHC.Types.Basic (Alignment)
import GHC.Cmm.DebugBlock (UnwindTable)
-import Control.Monad
import Data.Maybe (fromMaybe)
-- Format of an x86/x86_64 memory address, in bytes.
@@ -957,7 +956,7 @@ allocMoreStack _ _ top@(CmmData _ _) = return (top,[])
allocMoreStack platform slots proc@(CmmProc info lbl live (ListGraph code)) = do
let entries = entryBlocks proc
- uniqs <- replicateM (length entries) getUniqueM
+ uniqs <- getUniquesM
let
delta = ((x + stackAlign - 1) `quot` stackAlign) * stackAlign -- round up