[Git][ghc/ghc][wip/romes/12935] 4 commits: fix

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Fri Aug 30 13:28:14 UTC 2024



Matthew Pickering pushed to branch wip/romes/12935 at Glasgow Haskell Compiler / GHC


Commits:
ce1e370d by Matthew Pickering at 2024-08-30T14:17:42+01:00
fix

- - - - -
7f7f9753 by Matthew Pickering at 2024-08-30T14:21:16+01:00
Whitespace

- - - - -
bf7f0708 by Matthew Pickering at 2024-08-30T14:25:24+01:00
Fix linters

- - - - -
a1c4b8d5 by Matthew Pickering at 2024-08-30T14:27:55+01:00
Fix unused nr_wanted

- - - - -


4 changed files:

- compiler/GHC/Cmm/UniqueRenamer.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Driver/CodeOutput.hs
- compiler/GHC/StgToCmm.hs


Changes:

=====================================
compiler/GHC/Cmm/UniqueRenamer.hs
=====================================
@@ -134,7 +134,7 @@ detRenameCmmGroup dufm group = swap (runState (mapM detRenameCmmDecl group) dufm
       = mapFromList <$> mapM (detRenamePair detRenameLabel detRenameBlock) b
 
     detRenameCmmStatics :: CmmStatics -> DetRnM CmmStatics
-    detRenameCmmStatics 
+    detRenameCmmStatics
       (CmmStatics clbl info ccs lits1 lits2)
         = CmmStatics <$> detRenameCLabel clbl <*> detRenameCmmInfoTable info <*> pure ccs <*> mapM detRenameCmmLit lits1 <*> mapM detRenameCmmLit lits2
     detRenameCmmStatics


=====================================
compiler/GHC/Core/Opt/Simplify/Iteration.hs
=====================================
@@ -2306,7 +2306,7 @@ rebuildCall env info@(ArgInfo { ai_fun = fun, ai_args = rev_args
 -- See Note [Rewrite rules and inlining]
 -- See also Note [Trying rewrite rules]
 rebuildCall env info@(ArgInfo { ai_fun = fun, ai_args = rev_args
-                              , ai_rewrite = TryRules nr_wanted rules }) cont
+                              , ai_rewrite = TryRules _nr_wanted rules }) cont
   | {- nr_wanted == 0 || -} no_more_args
   = -- We've accumulated a simplified call in <fun,rev_args>
     -- so try rewrite rules; see Note [RULES apply to simplified arguments]


=====================================
compiler/GHC/Driver/CodeOutput.hs
=====================================
@@ -198,7 +198,7 @@ outputAsm :: Logger
           -> Stream IO RawCmmGroup a
           -> IO a
 outputAsm logger dflags this_mod location filenm cmm_stream = do
-  let ncg_uniqs = initDUniqSupply 'n' 0 {- See Note [Cmm Local Deterministic Uniques], or should we receive it as input?-}
+  let ncg_uniqs = initDUniqSupply 'n' 0
   debugTraceMsg logger 4 (text "Outputing asm to" <+> text filenm)
   let ncg_config = initNCGConfig dflags this_mod
   {-# SCC "OutputAsm" #-} doOutput filenm $
@@ -262,10 +262,8 @@ outputForeignStubs
 outputForeignStubs logger tmpfs dflags unit_state mod location stubs
  = do
    let stub_h = unsafeDecodeUtf $ mkStubPaths (initFinderOpts dflags) (moduleName mod) location
-   tmp_dir <- getTempDir logger tmpfs (tmpDir dflags)
-   let stub_c = tmp_dir </> (unitIdString (moduleUnitId mod) ++ "_" ++ moduleNameString (moduleName mod) ++ "_stub") <.> "c"
 
-   addFilesToClean tmpfs TFL_CurrentModule [stub_c]
+   stub_c <- newTempName logger tmpfs (tmpDir dflags) TFL_CurrentModule "c"
 
    case stubs of
      NoStubs ->


=====================================
compiler/GHC/StgToCmm.hs
=====================================
@@ -161,7 +161,7 @@ codeGen logger tmpfs cfg (InfoTableProvMap denv _ _) data_tycons
         }
 
 {-
-Note [Object Determinism]
+Note [Object determinism]
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 Object determinism means that GHC, for the same exact input, produces,
 deterministically, byte-for-byte identical objects (.o files, executables,



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8a1214826a513d4b8960c013c85cd5dc26c8e5d9...a1c4b8d5ffe2c90a36771c6d7f47369fd858da1f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8a1214826a513d4b8960c013c85cd5dc26c8e5d9...a1c4b8d5ffe2c90a36771c6d7f47369fd858da1f
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240830/b7c0db89/attachment-0001.html>


More information about the ghc-commits mailing list