[Git][ghc/ghc][wip/T23577] 4 commits: Add -fpolymorphic-specialisation flag (off by default at all optimisation levels)
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Fri Jun 30 14:33:33 UTC 2023
Ben Gamari pushed to branch wip/T23577 at Glasgow Haskell Compiler / GHC
Commits:
9f01d14b by Matthew Pickering at 2023-06-29T04:13:41-04:00
Add -fpolymorphic-specialisation flag (off by default at all optimisation levels)
Polymorphic specialisation has led to a number of hard to diagnose
incorrect runtime result bugs (see #23469, #23109, #21229, #23445) so
this commit introduces a flag `-fpolymorhphic-specialisation` which
allows users to turn on this experimental optimisation if they are
willing to buy into things going very wrong.
Ticket #23469
- - - - -
b1e611d5 by Ben Gamari at 2023-06-29T04:14:17-04:00
Rip out runtime linker/compiler checks
We used to choose flags to pass to the toolchain at runtime based on the
platform running GHC, and in this commit we drop all of those runtime
linker checks
Ultimately, this represents a change in policy: We no longer adapt at
runtime to the toolchain being used, but rather make final decisions
about the toolchain used at /configure time/
(we have deleted Note [Run-time linker info] altogether!).
This works towards the goal of having all toolchain configuration logic
living in the same place, which facilities the work towards a
runtime-retargetable GHC (see #19877).
As of this commit, the runtime linker/compiler logic was moved to
autoconf, but soon it, and the rest of the existing toolchain
configuration logic, will live in the standalone ghc-toolchain program
(see !9263)
In particular, what used to be done at runtime is now as follows:
* The flags -Wl,--no-as-needed for needed shared libs are configured
into settings
* The flag -fstack-check is configured into settings
* The check for broken tables-next-to-code was outdated
* We use the configured c compiler by default as the assembler program
* We drop `asmOpts` because we already configure -Qunused-arguments flag
into settings (see !10589)
Fixes #23562
Co-author: Rodrigo Mesquita (@alt-romes)
- - - - -
fd3e06f6 by Ben Gamari at 2023-06-30T10:33:12-04:00
rts: Don't rely on initializers for sigaction_t
As noted in #23577, CentOS's ancient toolchain throws spurious
missing-field-initializer warnings.
- - - - -
b360c896 by Ben Gamari at 2023-06-30T10:33:12-04:00
hadrian: Don't treat -Winline warnings as fatal
Such warnings are highly dependent upon the toolchain, platform, and
build configuration. It's simply too fragile to rely on these.
- - - - -
20 changed files:
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Driver/Backend.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Linker/ExtraObj.hs
- compiler/GHC/SysTools.hs
- − compiler/GHC/SysTools/Info.hs
- compiler/GHC/SysTools/Tasks.hs
- compiler/ghc.cabal.in
- docs/users_guide/9.8.1-notes.rst
- docs/users_guide/using-optimisation.rst
- hadrian/src/Flavour.hs
- + m4/fp_link_supports_no_as_needed.m4
- m4/fptools_set_c_ld_flags.m4
- rts/posix/Signals.c
- testsuite/tests/simplCore/should_compile/T8331.stderr
- testsuite/tests/simplCore/should_compile/all.T
Changes:
=====================================
compiler/GHC/Core/Opt/Specialise.hs
=====================================
@@ -2490,6 +2490,12 @@ specArgFreeIds (SpecDict dx) = exprFreeIds dx
specArgFreeIds UnspecType = emptyVarSet
specArgFreeIds UnspecArg = emptyVarSet
+specArgFreeVars :: SpecArg -> VarSet
+specArgFreeVars (SpecType ty) = tyCoVarsOfType ty
+specArgFreeVars (SpecDict dx) = exprFreeVars dx
+specArgFreeVars UnspecType = emptyVarSet
+specArgFreeVars UnspecArg = emptyVarSet
+
isSpecDict :: SpecArg -> Bool
isSpecDict (SpecDict {}) = True
isSpecDict _ = False
@@ -2798,6 +2804,12 @@ non-dictionary bindings too.
Note [Specialising polymorphic dictionaries]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Note June 2023: This has proved to be quite a tricky optimisation to get right
+see (#23469, #23109, #21229, #23445) so it is now guarded by a flag
+`-fpolymorphic-specialisation`.
+
+
Consider
class M a where { foo :: a -> Int }
@@ -2988,14 +3000,23 @@ getTheta = fmap piTyBinderType . filter isInvisiblePiTyBinder . filter isAnonPiT
------------------------------------------------------------
-singleCall :: Id -> [SpecArg] -> UsageDetails
-singleCall id args
+singleCall :: SpecEnv -> Id -> [SpecArg] -> UsageDetails
+singleCall spec_env id args
= MkUD {ud_binds = emptyFDBs,
ud_calls = unitDVarEnv id $ CIS id $
unitBag (CI { ci_key = args
, ci_fvs = call_fvs }) }
where
- call_fvs = foldr (unionVarSet . specArgFreeIds) emptyVarSet args
+ call_fvs =
+ foldr (unionVarSet . free_var_fn) emptyVarSet args
+
+ free_var_fn =
+ if gopt Opt_PolymorphicSpecialisation (se_dflags spec_env)
+ then specArgFreeIds
+ else specArgFreeVars
+
+
+
-- specArgFreeIds: we specifically look for free Ids, not TyVars
-- see (MP1) in Note [Specialising polymorphic dictionaries]
--
@@ -3014,7 +3035,7 @@ mkCallUDs' env f args
| wantCallsFor env f -- We want it, and...
, not (null ci_key) -- this call site has a useful specialisation
= -- pprTrace "mkCallUDs: keeping" _trace_doc
- singleCall f ci_key
+ singleCall env f ci_key
| otherwise -- See also Note [Specialisations already covered]
= -- pprTrace "mkCallUDs: discarding" _trace_doc
=====================================
compiler/GHC/Driver/Backend.hs
=====================================
@@ -58,8 +58,6 @@ module GHC.Driver.Backend
, DefunctionalizedCodeOutput(..)
-- *** Back-end functions for assembly
, DefunctionalizedPostHscPipeline(..)
- , DefunctionalizedAssemblerProg(..)
- , DefunctionalizedAssemblerInfoGetter(..)
-- *** Other back-end functions
, DefunctionalizedCDefs(..)
-- ** Names of back ends (for API clients of version 9.4 or earlier)
@@ -94,8 +92,6 @@ module GHC.Driver.Backend
, backendSupportsHpc
, backendSupportsCImport
, backendSupportsCExport
- , backendAssemblerProg
- , backendAssemblerInfoGetter
, backendCDefs
, backendCodeOutput
, backendUseJSLinker
@@ -348,40 +344,6 @@ data PrimitiveImplementation
deriving Show
--- | Names a function that runs the assembler, of this type:
---
--- > Logger -> DynFlags -> Platform -> [Option] -> IO ()
---
--- The functions so named are defined in "GHC.Driver.Pipeline.Execute".
-
-data DefunctionalizedAssemblerProg
- = StandardAssemblerProg
- -- ^ Use the standard system assembler
- | JSAssemblerProg
- -- ^ JS Backend compile to JS via Stg, and so does not use any assembler
- | DarwinClangAssemblerProg
- -- ^ If running on Darwin, use the assembler from the @clang@
- -- toolchain. Otherwise use the standard system assembler.
-
-
-
--- | Names a function that discover from what toolchain the assembler
--- is coming, of this type:
---
--- > Logger -> DynFlags -> Platform -> IO CompilerInfo
---
--- The functions so named are defined in "GHC.Driver.Pipeline.Execute".
-
-data DefunctionalizedAssemblerInfoGetter
- = StandardAssemblerInfoGetter
- -- ^ Interrogate the standard system assembler
- | JSAssemblerInfoGetter
- -- ^ If using the JS backend; return 'Emscripten'
- | DarwinClangAssemblerInfoGetter
- -- ^ If running on Darwin, return `Clang`; otherwise
- -- interrogate the standard system assembler.
-
-
-- | Names a function that generates code and writes the results to a
-- file, of this type:
--
@@ -767,45 +729,6 @@ backendSupportsCExport (Named JavaScript) = True
backendSupportsCExport (Named Interpreter) = False
backendSupportsCExport (Named NoBackend) = True
--- | This (defunctionalized) function runs the assembler
--- used on the code that is written by this back end. A
--- program determined by a combination of back end,
--- `DynFlags`, and `Platform` is run with the given
--- `Option`s.
---
--- The function's type is
--- @
--- Logger -> DynFlags -> Platform -> [Option] -> IO ()
--- @
---
--- This field is usually defaulted.
-backendAssemblerProg :: Backend -> DefunctionalizedAssemblerProg
-backendAssemblerProg (Named NCG) = StandardAssemblerProg
-backendAssemblerProg (Named LLVM) = DarwinClangAssemblerProg
-backendAssemblerProg (Named ViaC) = StandardAssemblerProg
-backendAssemblerProg (Named JavaScript) = JSAssemblerProg
-backendAssemblerProg (Named Interpreter) = StandardAssemblerProg
-backendAssemblerProg (Named NoBackend) = StandardAssemblerProg
-
--- | This (defunctionalized) function is used to retrieve
--- an enumeration value that characterizes the C/assembler
--- part of a toolchain. The function caches the info in a
--- mutable variable that is part of the `DynFlags`.
---
--- The function's type is
--- @
--- Logger -> DynFlags -> Platform -> IO CompilerInfo
--- @
---
--- This field is usually defaulted.
-backendAssemblerInfoGetter :: Backend -> DefunctionalizedAssemblerInfoGetter
-backendAssemblerInfoGetter (Named NCG) = StandardAssemblerInfoGetter
-backendAssemblerInfoGetter (Named LLVM) = DarwinClangAssemblerInfoGetter
-backendAssemblerInfoGetter (Named ViaC) = StandardAssemblerInfoGetter
-backendAssemblerInfoGetter (Named JavaScript) = JSAssemblerInfoGetter
-backendAssemblerInfoGetter (Named Interpreter) = StandardAssemblerInfoGetter
-backendAssemblerInfoGetter (Named NoBackend) = StandardAssemblerInfoGetter
-
-- | When using this back end, it may be necessary or
-- advisable to pass some `-D` options to a C compiler.
-- This (defunctionalized) function produces those
=====================================
compiler/GHC/Driver/DynFlags.hs
=====================================
@@ -116,7 +116,6 @@ import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Reader (ReaderT)
import Control.Monad.Trans.Writer (WriterT)
-import Data.IORef
import System.IO
import System.IO.Error (catchIOError)
import System.Environment (lookupEnv)
@@ -420,15 +419,6 @@ data DynFlags = DynFlags {
avx512pf :: Bool, -- Enable AVX-512 PreFetch Instructions.
fma :: Bool, -- ^ Enable FMA instructions.
- -- | Run-time linker information (what options we need, etc.)
- rtldInfo :: IORef (Maybe LinkerInfo),
-
- -- | Run-time C compiler information
- rtccInfo :: IORef (Maybe CompilerInfo),
-
- -- | Run-time assembler information
- rtasmInfo :: IORef (Maybe CompilerInfo),
-
-- Constants used to control the amount of optimization done.
-- | Max size, in bytes, of inline array allocations.
@@ -490,9 +480,6 @@ class ContainsDynFlags t where
initDynFlags :: DynFlags -> IO DynFlags
initDynFlags dflags = do
let
- refRtldInfo <- newIORef Nothing
- refRtccInfo <- newIORef Nothing
- refRtasmInfo <- newIORef Nothing
canUseUnicode <- do let enc = localeEncoding
str = "‘’"
(withCString enc str $ \cstr ->
@@ -514,9 +501,6 @@ initDynFlags dflags = do
useColor = useColor',
canUseColor = stderrSupportsAnsiColors,
colScheme = colScheme',
- rtldInfo = refRtldInfo,
- rtccInfo = refRtccInfo,
- rtasmInfo = refRtasmInfo,
tmpDir = TempDir tmp_dir
}
@@ -695,9 +679,6 @@ defaultDynFlags mySettings =
avx512f = False,
avx512pf = False,
fma = False,
- rtldInfo = panic "defaultDynFlags: no rtldInfo",
- rtccInfo = panic "defaultDynFlags: no rtccInfo",
- rtasmInfo = panic "defaultDynFlags: no rtasmInfo",
maxInlineAllocSize = 128,
maxInlineMemcpyInsns = 32,
=====================================
compiler/GHC/Driver/Flags.hs
=====================================
@@ -257,6 +257,7 @@ data GeneralFlag
| Opt_Specialise
| Opt_SpecialiseAggressively
| Opt_CrossModuleSpecialise
+ | Opt_PolymorphicSpecialisation
| Opt_InlineGenerics
| Opt_InlineGenericsAggressively
| Opt_StaticArgumentTransformation
=====================================
compiler/GHC/Driver/Main.hs
=====================================
@@ -110,7 +110,6 @@ module GHC.Driver.Main
import GHC.Prelude
import GHC.Platform
-import GHC.Platform.Ways
import GHC.Driver.Plugins
import GHC.Driver.Session
@@ -345,41 +344,11 @@ initHscEnv mb_top_dir = do
mySettings <- initSysTools top_dir
dflags <- initDynFlags (defaultDynFlags mySettings)
hsc_env <- newHscEnv top_dir dflags
- checkBrokenTablesNextToCode (hsc_logger hsc_env) dflags
setUnsafeGlobalDynFlags dflags
-- c.f. DynFlags.parseDynamicFlagsFull, which
-- creates DynFlags and sets the UnsafeGlobalDynFlags
return hsc_env
--- | The binutils linker on ARM emits unnecessary R_ARM_COPY relocations which
--- breaks tables-next-to-code in dynamically linked modules. This
--- check should be more selective but there is currently no released
--- version where this bug is fixed.
--- See https://sourceware.org/bugzilla/show_bug.cgi?id=16177 and
--- https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333
-checkBrokenTablesNextToCode :: Logger -> DynFlags -> IO ()
-checkBrokenTablesNextToCode logger dflags = do
- let invalidLdErr = "Tables-next-to-code not supported on ARM \
- \when using binutils ld (please see: \
- \https://sourceware.org/bugzilla/show_bug.cgi?id=16177)"
- broken <- checkBrokenTablesNextToCode' logger dflags
- when broken (panic invalidLdErr)
-
-checkBrokenTablesNextToCode' :: Logger -> DynFlags -> IO Bool
-checkBrokenTablesNextToCode' logger dflags
- | not (isARM arch) = return False
- | ways dflags `hasNotWay` WayDyn = return False
- | not tablesNextToCode = return False
- | otherwise = do
- linkerInfo <- liftIO $ GHC.SysTools.getLinkerInfo logger dflags
- case linkerInfo of
- GnuLD _ -> return True
- _ -> return False
- where platform = targetPlatform dflags
- arch = platformArch platform
- tablesNextToCode = platformTablesNextToCode platform
-
-
-- -----------------------------------------------------------------------------
getDiagnostics :: Hsc (Messages GhcMessage)
=====================================
compiler/GHC/Driver/Pipeline/Execute.hs
=====================================
@@ -287,12 +287,6 @@ runAsPhase :: Bool -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> IO F
runAsPhase with_cpp pipe_env hsc_env location input_fn = do
let dflags = hsc_dflags hsc_env
let logger = hsc_logger hsc_env
- let unit_env = hsc_unit_env hsc_env
- let platform = ue_platform unit_env
-
- -- LLVM from version 3.0 onwards doesn't support the OS X system
- -- assembler, so we use clang as the assembler instead. (#5636)
- let as_prog = applyAssemblerProg $ backendAssemblerProg (backend dflags)
let cmdline_include_paths = includePaths dflags
let pic_c_flags = picCCOpts dflags
@@ -310,9 +304,8 @@ runAsPhase with_cpp pipe_env hsc_env location input_fn = do
includePathsQuoteImplicit cmdline_include_paths]
let runAssembler inputFilename outputFilename
= withAtomicRename outputFilename $ \temp_outputFilename ->
- as_prog
+ runAs
logger dflags
- platform
(local_includes ++ global_includes
-- See Note [-fPIC for assembler]
++ map GHC.SysTools.Option pic_c_flags
@@ -392,22 +385,6 @@ runForeignJsPhase pipe_env hsc_env _location input_fn = do
embedJsFile logger dflags tmpfs unit_env input_fn output_fn
return output_fn
-
-applyAssemblerProg
- :: DefunctionalizedAssemblerProg
- -> Logger -> DynFlags -> Platform -> [Option] -> IO ()
-applyAssemblerProg StandardAssemblerProg logger dflags _platform =
- runAs logger dflags
-applyAssemblerProg JSAssemblerProg logger dflags _platform =
- runEmscripten logger dflags
-applyAssemblerProg DarwinClangAssemblerProg logger dflags platform =
- if platformOS platform == OSDarwin then
- runClang logger dflags
- else
- runAs logger dflags
-
-
-
runCcPhase :: Phase -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> IO FilePath
runCcPhase cc_phase pipe_env hsc_env location input_fn = do
let dflags = hsc_dflags hsc_env
=====================================
compiler/GHC/Driver/Session.hs
=====================================
@@ -2432,6 +2432,7 @@ fFlagsDeps = [
flagSpec "specialize-aggressively" Opt_SpecialiseAggressively,
flagSpec "cross-module-specialise" Opt_CrossModuleSpecialise,
flagSpec "cross-module-specialize" Opt_CrossModuleSpecialise,
+ flagSpec "polymorphic-specialisation" Opt_PolymorphicSpecialisation,
flagSpec "inline-generics" Opt_InlineGenerics,
flagSpec "inline-generics-aggressively" Opt_InlineGenericsAggressively,
flagSpec "static-argument-transformation" Opt_StaticArgumentTransformation,
=====================================
compiler/GHC/Linker/ExtraObj.hs
=====================================
@@ -12,7 +12,6 @@ module GHC.Linker.ExtraObj
, mkNoteObjsToLinkIntoBinary
, checkLinkInfo
, getLinkInfo
- , getCompilerInfo
, ghcLinkInfoSectionName
, ghcLinkInfoNoteName
, platformSupportsSavingLinkOpts
@@ -40,10 +39,8 @@ import qualified GHC.Data.ShortText as ST
import GHC.SysTools.Elf
import GHC.SysTools.Tasks
-import GHC.SysTools.Info
import GHC.Linker.Unit
-import Control.Monad.IO.Class
import Control.Monad
import Data.Maybe
@@ -52,7 +49,6 @@ mkExtraObj logger tmpfs dflags unit_state extn xs
= do cFile <- newTempName logger tmpfs (tmpDir dflags) TFL_CurrentModule extn
oFile <- newTempName logger tmpfs (tmpDir dflags) TFL_GhcSession "o"
writeFile cFile xs
- ccInfo <- liftIO $ getCompilerInfo logger dflags
runCc Nothing logger tmpfs dflags
([Option "-c",
FileOption "" cFile,
@@ -60,7 +56,7 @@ mkExtraObj logger tmpfs dflags unit_state extn xs
FileOption "" oFile]
++ if extn /= "s"
then cOpts
- else asmOpts ccInfo)
+ else [])
return oFile
where
-- Pass a different set of options to the C compiler depending one whether
@@ -70,14 +66,6 @@ mkExtraObj logger tmpfs dflags unit_state extn xs
++ map (FileOption "-I" . ST.unpack)
(unitIncludeDirs $ unsafeLookupUnit unit_state rtsUnit)
- -- When compiling assembler code, we drop the usual C options, and if the
- -- compiler is Clang, we add an extra argument to tell Clang to ignore
- -- unused command line options. See trac #11684.
- asmOpts ccInfo =
- if any (ccInfo ==) [Clang, AppleClang, AppleClang51]
- then [Option "-Qunused-arguments"]
- else []
-
-- When linking a binary, we need to create a C main() function that
-- starts everything off. This used to be compiled statically as part
-- of the RTS, but that made it hard to change the -rtsopts setting,
=====================================
compiler/GHC/SysTools.hs
=====================================
@@ -17,7 +17,6 @@ module GHC.SysTools (
-- * Interface to system tools
module GHC.SysTools.Tasks,
- module GHC.SysTools.Info,
-- * Fast file copy
copyFile,
@@ -35,8 +34,6 @@ import GHC.Prelude
import GHC.Utils.Panic
import GHC.Driver.Session
-import GHC.Linker.ExtraObj
-import GHC.SysTools.Info
import GHC.SysTools.Tasks
import GHC.SysTools.BaseDir
import GHC.Settings.IO
=====================================
compiler/GHC/SysTools/Info.hs deleted
=====================================
@@ -1,243 +0,0 @@
-{-# LANGUAGE ScopedTypeVariables #-}
------------------------------------------------------------------------------
---
--- Compiler information functions
---
--- (c) The GHC Team 2017
---
------------------------------------------------------------------------------
-module GHC.SysTools.Info where
-
-import GHC.Utils.Exception
-import GHC.Utils.Error
-import GHC.Driver.Session
-import GHC.Utils.Outputable
-import GHC.Utils.Misc
-import GHC.Utils.Logger
-
-import Data.List ( isInfixOf, isPrefixOf )
-import Data.IORef
-
-import System.IO
-
-import GHC.Platform
-import GHC.Prelude
-
-import GHC.SysTools.Process
-
-{- Note [Run-time linker info]
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-See also: #5240, #6063, #10110
-
-Before 'runLink', we need to be sure to get the relevant information
-about the linker we're using at runtime to see if we need any extra
-options.
-
-Generally, the linker changing from what was detected at ./configure
-time has always been possible using -pgml, but on Linux it can happen
-'transparently' by installing packages like binutils-gold, which
-change what /usr/bin/ld actually points to.
-
-Clang vs GCC notes:
-
-For gcc, 'gcc -Wl,--version' gives a bunch of output about how to
-invoke the linker before the version information string. For 'clang',
-the version information for 'ld' is all that's output. For this
-reason, we typically need to slurp up all of the standard error output
-and look through it.
-
-Other notes:
-
-We cache the LinkerInfo inside DynFlags, since clients may link
-multiple times. The definition of LinkerInfo is there to avoid a
-circular dependency.
-
--}
-
-{- Note [ELF needed shared libs]
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Some distributions change the link editor's default handling of
-ELF DT_NEEDED tags to include only those shared objects that are
-needed to resolve undefined symbols. For Template Haskell we need
-the last temporary shared library also if it is not needed for the
-currently linked temporary shared library. We specify --no-as-needed
-to override the default. This flag exists in GNU ld and GNU gold.
-
-The flag is only needed on ELF systems. On Windows (PE) and Mac OS X
-(Mach-O) the flag is not needed.
-
--}
-
-neededLinkArgs :: LinkerInfo -> [Option]
-neededLinkArgs (GnuLD o) = o
-neededLinkArgs (Mold o) = o
-neededLinkArgs (GnuGold o) = o
-neededLinkArgs (LlvmLLD o) = o
-neededLinkArgs (DarwinLD o) = o
-neededLinkArgs (SolarisLD o) = o
-neededLinkArgs (AixLD o) = o
-neededLinkArgs UnknownLD = []
-
--- Grab linker info and cache it in DynFlags.
-getLinkerInfo :: Logger -> DynFlags -> IO LinkerInfo
-getLinkerInfo logger dflags = do
- info <- readIORef (rtldInfo dflags)
- case info of
- Just v -> return v
- Nothing -> do
- v <- getLinkerInfo' logger dflags
- writeIORef (rtldInfo dflags) (Just v)
- return v
-
--- See Note [Run-time linker info].
-getLinkerInfo' :: Logger -> DynFlags -> IO LinkerInfo
-getLinkerInfo' logger dflags = do
- let platform = targetPlatform dflags
- os = platformOS platform
- (pgm,args0) = pgm_l dflags
- args1 = map Option (getOpts dflags opt_l)
- args2 = args0 ++ args1
- args3 = filter notNull (map showOpt args2)
-
- -- Try to grab the info from the process output.
- parseLinkerInfo stdo _stde _exitc
- | any ("GNU ld" `isPrefixOf`) stdo =
- -- Set DT_NEEDED for all shared libraries. #10110.
- return (GnuLD $ map Option [-- ELF specific flag
- -- see Note [ELF needed shared libs]
- "-Wl,--no-as-needed"])
-
- | any ("mold" `isPrefixOf`) stdo =
- return (Mold $ map Option [ --see Note [ELF needed shared libs]
- "-Wl,--no-as-needed"])
-
- | any ("GNU gold" `isPrefixOf`) stdo =
- -- GNU gold only needs --no-as-needed. #10110.
- -- ELF specific flag, see Note [ELF needed shared libs]
- return (GnuGold [Option "-Wl,--no-as-needed"])
-
- | any (\line -> "LLD" `isPrefixOf` line || "LLD" `elem` words line) stdo =
- return (LlvmLLD $ map Option [ --see Note [ELF needed shared libs]
- "-Wl,--no-as-needed" | osElfTarget os || os == OSMinGW32 ])
-
- -- Unknown linker.
- | otherwise = fail "invalid --version output, or linker is unsupported"
-
- -- Process the executable call
- catchIO (
- case os of
- OSSolaris2 ->
- -- Solaris uses its own Solaris linker. Even all
- -- GNU C are recommended to configure with Solaris
- -- linker instead of using GNU binutils linker. Also
- -- all GCC distributed with Solaris follows this rule
- -- precisely so we assume here, the Solaris linker is
- -- used.
- return $ SolarisLD []
- OSAIX ->
- -- IBM AIX uses its own non-binutils linker as well
- return $ AixLD []
- OSDarwin ->
- -- Darwin has neither GNU Gold or GNU LD, but a strange linker
- -- that doesn't support --version. We can just assume that's
- -- what we're using.
- return $ DarwinLD []
- OSMinGW32 ->
- -- GHC doesn't support anything but GNU ld on Windows anyway.
- -- Process creation is also fairly expensive on win32, so
- -- we short-circuit here.
- return $ GnuLD $ map Option
- [ -- Emit stack checks
- -- See Note [Windows stack allocations]
- "-fstack-check"
- ]
- _ -> do
- -- In practice, we use the compiler as the linker here. Pass
- -- -Wl,--version to get linker version info.
- (exitc, stdo, stde) <- readProcessEnvWithExitCode pgm
- (["-Wl,--version"] ++ args3)
- c_locale_env
- -- Split the output by lines to make certain kinds
- -- of processing easier. In particular, 'clang' and 'gcc'
- -- have slightly different outputs for '-Wl,--version', but
- -- it's still easy to figure out.
- parseLinkerInfo (lines stdo) (lines stde) exitc
- )
- (\err -> do
- debugTraceMsg logger 2
- (text "Error (figuring out linker information):" <+>
- text (show err))
- errorMsg logger $ hang (text "Warning:") 9 $
- text "Couldn't figure out linker information!" $$
- text "Make sure you're using GNU ld, GNU gold" <+>
- text "or the built in OS X linker, etc."
- return UnknownLD
- )
-
--- | Grab compiler info and cache it in DynFlags.
-getCompilerInfo :: Logger -> DynFlags -> IO CompilerInfo
-getCompilerInfo logger dflags = do
- info <- readIORef (rtccInfo dflags)
- case info of
- Just v -> return v
- Nothing -> do
- let pgm = pgm_c dflags
- v <- getCompilerInfo' logger pgm
- writeIORef (rtccInfo dflags) (Just v)
- return v
-
--- | Grab assembler info and cache it in DynFlags.
-getAssemblerInfo :: Logger -> DynFlags -> IO CompilerInfo
-getAssemblerInfo logger dflags = do
- info <- readIORef (rtasmInfo dflags)
- case info of
- Just v -> return v
- Nothing -> do
- let (pgm, _) = pgm_a dflags
- v <- getCompilerInfo' logger pgm
- writeIORef (rtasmInfo dflags) (Just v)
- return v
-
--- See Note [Run-time linker info].
-getCompilerInfo' :: Logger -> String -> IO CompilerInfo
-getCompilerInfo' logger pgm = do
- let -- Try to grab the info from the process output.
- parseCompilerInfo _stdo stde _exitc
- -- Regular GCC
- | any ("gcc version" `isInfixOf`) stde =
- return GCC
- -- Regular clang
- | any ("clang version" `isInfixOf`) stde =
- return Clang
- -- FreeBSD clang
- | any ("FreeBSD clang version" `isInfixOf`) stde =
- return Clang
- -- Xcode 5.1 clang
- | any ("Apple LLVM version 5.1" `isPrefixOf`) stde =
- return AppleClang51
- -- Xcode 5 clang
- | any ("Apple LLVM version" `isPrefixOf`) stde =
- return AppleClang
- -- Xcode 4.1 clang
- | any ("Apple clang version" `isPrefixOf`) stde =
- return AppleClang
- -- Unknown compiler.
- | otherwise = fail $ "invalid -v output, or compiler is unsupported (" ++ pgm ++ "): " ++ unlines stde
-
- -- Process the executable call
- catchIO (do
- (exitc, stdo, stde) <-
- readProcessEnvWithExitCode pgm ["-v"] c_locale_env
- -- Split the output by lines to make certain kinds
- -- of processing easier.
- parseCompilerInfo (lines stdo) (lines stde) exitc
- )
- (\err -> do
- debugTraceMsg logger 2
- (text "Error (figuring out C compiler information):" <+>
- text (show err))
- errorMsg logger $ hang (text "Warning:") 9 $
- text "Couldn't figure out C compiler information!" $$
- text "Make sure you're using GNU gcc, or clang"
- return UnknownCC
- )
=====================================
compiler/GHC/SysTools/Tasks.hs
=====================================
@@ -19,7 +19,6 @@ import GHC.CmmToLlvm.Config (LlvmVersion, llvmVersionStr, supportedLlvmVersionUp
import GHC.Settings
import GHC.SysTools.Process
-import GHC.SysTools.Info
import GHC.Driver.Session
@@ -292,15 +291,12 @@ figureLlvmVersion logger dflags = traceSystoolCommand logger "llc" $ do
runLink :: Logger -> TmpFs -> DynFlags -> [Option] -> IO ()
runLink logger tmpfs dflags args = traceSystoolCommand logger "linker" $ do
- -- See Note [Run-time linker info]
- --
-- `-optl` args come at the end, so that later `-l` options
-- given there manually can fill in symbols needed by
-- Haskell libraries coming in via `args`.
- linkargs <- neededLinkArgs `fmap` getLinkerInfo logger dflags
let (p,args0) = pgm_l dflags
optl_args = map Option (getOpts dflags opt_l)
- args2 = args0 ++ linkargs ++ args ++ optl_args
+ args2 = args0 ++ args ++ optl_args
mb_env <- getGccEnv args2
runSomethingResponseFile logger tmpfs dflags ld_filter "Linker" p args2 mb_env
where
=====================================
compiler/ghc.cabal.in
=====================================
@@ -715,7 +715,6 @@ Library
GHC.SysTools.BaseDir
GHC.SysTools.Cpp
GHC.SysTools.Elf
- GHC.SysTools.Info
GHC.SysTools.Process
GHC.SysTools.Tasks
GHC.SysTools.Terminal
=====================================
docs/users_guide/9.8.1-notes.rst
=====================================
@@ -174,11 +174,16 @@ Compiler
D(D2)
)
D = D1 | D2
-
+
This allows for changing the structure of a library without immediately breaking user code,
but instead being able to warn the user that a change in the library interface
will occur in the future.
+- Guard polymorphic specialisation behind the flag :ghc-flag:`-fpolymorphic-specialisation`.
+ This optimisation has led to a number of incorrect runtime result bugs, so we are disabling it
+ by default for now whilst we consider more carefully an appropiate fix.
+ (See :ghc-ticket:`23469`, :ghc-ticket:`23109`, :ghc-ticket:`21229`, :ghc-ticket:`23445`)
+
GHCi
~~~~
@@ -241,8 +246,8 @@ Runtime system
We use this functionality in GHCi to modify how some messages are displayed.
- The extensions fields of constructors of ``IE`` now take ``Maybe (WarningTxt p)``
- in ``GhcPs`` and ``GhcRn`` variants of the Syntax Tree.
- This represents the warning assigned to a certain export item,
+ in ``GhcPs`` and ``GhcRn`` variants of the Syntax Tree.
+ This represents the warning assigned to a certain export item,
which is used for :ref:`deprecated-exports`.
``ghc-heap`` library
=====================================
docs/users_guide/using-optimisation.rst
=====================================
@@ -1113,6 +1113,21 @@ as such you shouldn't need to set any of them explicitly. A flag
which they are called in this module. Note that specialisation must be
enabled (by ``-fspecialise``) for this to have any effect.
+.. ghc-flag:: -fpolymorphic-specialisation
+ :shortdesc: Allow specialisation to abstract over free type variables
+ :type: dynamic
+ :reverse: -fno-polymorphic-specialisation
+ :category:
+
+ :default: off
+
+ Warning, this feature is highly experimental and may lead to incorrect runtime
+ results. Use at your own risk (:ghc-ticket:`23469`, :ghc-ticket:`23109`, :ghc-ticket:`21229`, :ghc-ticket:`23445`).
+
+ Enable specialisation of function calls to known dictionaries with free type variables.
+ The created specialisation will abstract over the type variables free in the dictionary.
+
+
.. ghc-flag:: -flate-specialise
:shortdesc: Run a late specialisation pass
:type: dynamic
=====================================
hadrian/src/Flavour.hs
=====================================
@@ -138,6 +138,8 @@ werror =
[ arg "-optc-Werror"
-- clang complains about #pragma GCC pragmas
, arg "-optc-Wno-error=unknown-pragmas"
+ -- rejected inlinings are highly dependent upon toolchain and way
+ , arg "-optc-Wno-error=inline"
]
-- N.B. We currently don't build the boot libraries' C sources with -Werror
-- as this tends to be a portability nightmare.
=====================================
m4/fp_link_supports_no_as_needed.m4
=====================================
@@ -0,0 +1,33 @@
+# FP_LINK_SUPPORTS_NO_AS_NEEDED
+# ----------------------------------
+# Set the Cc linker flag -Wl,--no-as-needed if it is supported
+# $1 is the name of the linker flags variable when linking with gcc
+# See also Note [ELF needed shared libs]
+AC_DEFUN([FP_LINK_SUPPORTS_NO_AS_NEEDED],
+[
+ AC_MSG_CHECKING([whether Cc linker supports -Wl,--no-as-needed])
+ echo 'int f(int a) {return 2*a;}' > conftest.a.c
+ echo 'int f(int a); int main(int argc, char **argv) {return f(0);}' > conftest.b.c
+ $CC -c -o conftest.a.o conftest.a.c > /dev/null 2>&1
+ $CC -c -o conftest.b.o conftest.b.c > /dev/null 2>&1
+ if "$CC" "$$1" -Wl,--no-as-needed -o conftest conftest.a.o conftest.b.o > /dev/null 2>&1
+ then
+ $1="$$1 -Wl,--no-as-needed"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ rm -f conftest*
+])
+
+# Note [ELF needed shared libs]
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# Some distributions change the link editor's default handling of
+# ELF DT_NEEDED tags to include only those shared objects that are
+# needed to resolve undefined symbols. For Template Haskell we need
+# the last temporary shared library also if it is not needed for the
+# currently linked temporary shared library. We specify --no-as-needed
+# to override the default. This flag exists in GNU ld and GNU gold.
+#
+# The flag is only needed on ELF systems. On Windows (PE) and Mac OS X
+# (Mach-O) the flag is not needed.
=====================================
m4/fptools_set_c_ld_flags.m4
=====================================
@@ -17,6 +17,21 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
;;
esac
+ # See Note [ELF needed shared libs]
+ case $$1 in
+ *-linux|*-freebsd*)
+ FP_LINK_SUPPORTS_NO_AS_NEEDED([$3])
+ ;;
+ esac
+
+ # Emit stack checks
+ # See Note [Windows stack allocations]
+ case $$1 in
+ *-mingw32*)
+ $3="$$3 -fstack-check"
+ ;;
+ esac
+
case $$1 in
i386-unknown-mingw32)
$2="$$2 -march=i686"
=====================================
rts/posix/Signals.c
=====================================
@@ -368,9 +368,11 @@ int
stg_sig_install(int sig, int spi, void *mask)
{
sigset_t signals, osignals;
- struct sigaction action;
StgInt previous_spi;
+ struct sigaction action;
+ memset(&action, 0, sizeof(struct sigaction));
+
ACQUIRE_LOCK(&sig_mutex);
// Block the signal until we figure out what to do
@@ -619,6 +621,7 @@ static void
set_sigtstp_action (bool handle)
{
struct sigaction sa;
+ memset(&sa, 0, sizeof(struct sigaction));
if (handle) {
sa.sa_handler = sigtstp_handler;
} else {
@@ -635,7 +638,8 @@ set_sigtstp_action (bool handle)
void
install_vtalrm_handler(int sig, TickProc handle_tick)
{
- struct sigaction action = {};
+ struct sigaction action;
+ memset(&action, 0, sizeof(struct sigaction));
action.sa_handler = handle_tick;
@@ -677,8 +681,11 @@ install_vtalrm_handler(int sig, TickProc handle_tick)
void
initDefaultHandlers(void)
{
- struct sigaction action = {};
- struct sigaction oact = {};
+ // N.B. We can't use initializers here as CentOS's ancient toolchain throws
+ // spurious warnings. See #23577.
+ struct sigaction action, oact;
+ memset(&oact, 0, sizeof(struct sigaction));
+ memset(&action, 0, sizeof(struct sigaction));
// install the SIGINT handler
action.sa_handler = shutdown_handler;
=====================================
testsuite/tests/simplCore/should_compile/T8331.stderr
=====================================
@@ -1,149 +1,5 @@
==================== Tidy Core rules ====================
-"SPEC $c*> @(ST s) @_"
- forall (@s) (@r) ($dApplicative :: Applicative (ST s)).
- $fApplicativeReaderT_$c*> @(ST s) @r $dApplicative
- = ($fApplicativeReaderT2 @s @r)
- `cast` (forall (a :: <*>_N) (b :: <*>_N).
- <ReaderT r (ST s) a>_R
- %<'Many>_N ->_R <ReaderT r (ST s) b>_R
- %<'Many>_N ->_R <r>_R %<'Many>_N ->_R Sym (N:ST[0] <s>_N <b>_R)
- ; Sym (N:ReaderT[0] <*>_N <r>_R <ST s>_R <b>_N)
- :: Coercible
- (forall {a} {b}.
- ReaderT r (ST s) a -> ReaderT r (ST s) b -> r -> STRep s b)
- (forall {a} {b}.
- ReaderT r (ST s) a -> ReaderT r (ST s) b -> ReaderT r (ST s) b))
-"SPEC $c<$ @(ST s) @_"
- forall (@s) (@r) ($dFunctor :: Functor (ST s)).
- $fFunctorReaderT_$c<$ @(ST s) @r $dFunctor
- = ($fApplicativeReaderT6 @s @r)
- `cast` (forall (a :: <*>_N) (b :: <*>_N).
- <a>_R
- %<'Many>_N ->_R <ReaderT r (ST s) b>_R
- %<'Many>_N ->_R <r>_R %<'Many>_N ->_R Sym (N:ST[0] <s>_N <a>_R)
- ; Sym (N:ReaderT[0] <*>_N <r>_R <ST s>_R <a>_N)
- :: Coercible
- (forall {a} {b}. a -> ReaderT r (ST s) b -> r -> STRep s a)
- (forall {a} {b}. a -> ReaderT r (ST s) b -> ReaderT r (ST s) a))
-"SPEC $c<* @(ST s) @_"
- forall (@s) (@r) ($dApplicative :: Applicative (ST s)).
- $fApplicativeReaderT_$c<* @(ST s) @r $dApplicative
- = ($fApplicativeReaderT1 @s @r)
- `cast` (forall (a :: <*>_N) (b :: <*>_N).
- <ReaderT r (ST s) a>_R
- %<'Many>_N ->_R <ReaderT r (ST s) b>_R
- %<'Many>_N ->_R <r>_R %<'Many>_N ->_R Sym (N:ST[0] <s>_N <a>_R)
- ; Sym (N:ReaderT[0] <*>_N <r>_R <ST s>_R <a>_N)
- :: Coercible
- (forall {a} {b}.
- ReaderT r (ST s) a -> ReaderT r (ST s) b -> r -> STRep s a)
- (forall {a} {b}.
- ReaderT r (ST s) a -> ReaderT r (ST s) b -> ReaderT r (ST s) a))
-"SPEC $c<*> @(ST s) @_"
- forall (@s) (@r) ($dApplicative :: Applicative (ST s)).
- $fApplicativeReaderT9 @(ST s) @r $dApplicative
- = ($fApplicativeReaderT4 @s @r)
- `cast` (forall (a :: <*>_N) (b :: <*>_N).
- <ReaderT r (ST s) (a -> b)>_R
- %<'Many>_N ->_R <ReaderT r (ST s) a>_R
- %<'Many>_N ->_R <r>_R
- %<'Many>_N ->_R Sym (N:ST[0] <s>_N <b>_R)
- :: Coercible
- (forall {a} {b}.
- ReaderT r (ST s) (a -> b) -> ReaderT r (ST s) a -> r -> STRep s b)
- (forall {a} {b}.
- ReaderT r (ST s) (a -> b) -> ReaderT r (ST s) a -> r -> ST s b))
-"SPEC $c>> @(ST s) @_"
- forall (@s) (@r) ($dMonad :: Monad (ST s)).
- $fMonadReaderT1 @(ST s) @r $dMonad
- = $fMonadAbstractIOSTReaderT_$s$c>> @s @r
-"SPEC $c>>= @(ST s) @_"
- forall (@s) (@r) ($dMonad :: Monad (ST s)).
- $fMonadReaderT2 @(ST s) @r $dMonad
- = ($fMonadAbstractIOSTReaderT2 @s @r)
- `cast` (forall (a :: <*>_N) (b :: <*>_N).
- <ReaderT r (ST s) a>_R
- %<'Many>_N ->_R <a -> ReaderT r (ST s) b>_R
- %<'Many>_N ->_R <r>_R
- %<'Many>_N ->_R Sym (N:ST[0] <s>_N <b>_R)
- :: Coercible
- (forall {a} {b}.
- ReaderT r (ST s) a -> (a -> ReaderT r (ST s) b) -> r -> STRep s b)
- (forall {a} {b}.
- ReaderT r (ST s) a -> (a -> ReaderT r (ST s) b) -> r -> ST s b))
-"SPEC $cfmap @(ST s) @_"
- forall (@s) (@r) ($dFunctor :: Functor (ST s)).
- $fFunctorReaderT_$cfmap @(ST s) @r $dFunctor
- = ($fApplicativeReaderT7 @s @r)
- `cast` (forall (a :: <*>_N) (b :: <*>_N).
- <a -> b>_R
- %<'Many>_N ->_R <ReaderT r (ST s) a>_R
- %<'Many>_N ->_R <r>_R %<'Many>_N ->_R Sym (N:ST[0] <s>_N <b>_R)
- ; Sym (N:ReaderT[0] <*>_N <r>_R <ST s>_R <b>_N)
- :: Coercible
- (forall {a} {b}. (a -> b) -> ReaderT r (ST s) a -> r -> STRep s b)
- (forall {a} {b}.
- (a -> b) -> ReaderT r (ST s) a -> ReaderT r (ST s) b))
-"SPEC $cliftA2 @(ST s) @_"
- forall (@s) (@r) ($dApplicative :: Applicative (ST s)).
- $fApplicativeReaderT_$cliftA2 @(ST s) @r $dApplicative
- = ($fApplicativeReaderT3 @s @r)
- `cast` (forall (a :: <*>_N) (b :: <*>_N) (c :: <*>_N).
- <a -> b -> c>_R
- %<'Many>_N ->_R <ReaderT r (ST s) a>_R
- %<'Many>_N ->_R <ReaderT r (ST s) b>_R
- %<'Many>_N ->_R <r>_R %<'Many>_N ->_R Sym (N:ST[0] <s>_N <c>_R)
- ; Sym (N:ReaderT[0] <*>_N <r>_R <ST s>_R <c>_N)
- :: Coercible
- (forall {a} {b} {c}.
- (a -> b -> c)
- -> ReaderT r (ST s) a -> ReaderT r (ST s) b -> r -> STRep s c)
- (forall {a} {b} {c}.
- (a -> b -> c)
- -> ReaderT r (ST s) a -> ReaderT r (ST s) b -> ReaderT r (ST s) c))
-"SPEC $cp1Applicative @(ST s) @_"
- forall (@s) (@r) ($dApplicative :: Applicative (ST s)).
- $fApplicativeReaderT_$cp1Applicative @(ST s) @r $dApplicative
- = $fApplicativeReaderT_$s$fFunctorReaderT @s @r
-"SPEC $cp1Monad @(ST s) @_"
- forall (@s) (@r) ($dMonad :: Monad (ST s)).
- $fMonadReaderT_$cp1Monad @(ST s) @r $dMonad
- = $fApplicativeReaderT_$s$fApplicativeReaderT @s @r
-"SPEC $cpure @(ST s) @_"
- forall (@s) (@r) ($dApplicative :: Applicative (ST s)).
- $fApplicativeReaderT_$cpure @(ST s) @r $dApplicative
- = ($fApplicativeReaderT5 @s @r)
- `cast` (forall (a :: <*>_N).
- <a>_R
- %<'Many>_N ->_R <r>_R %<'Many>_N ->_R Sym (N:ST[0] <s>_N <a>_R)
- ; Sym (N:ReaderT[0] <*>_N <r>_R <ST s>_R <a>_N)
- :: Coercible
- (forall {a}. a -> r -> STRep s a)
- (forall {a}. a -> ReaderT r (ST s) a))
-"SPEC $creturn @(ST s) @_"
- forall (@s) (@r) ($dMonad :: Monad (ST s)).
- $fMonadReaderT_$creturn @(ST s) @r $dMonad
- = ($fApplicativeReaderT5 @s @r)
- `cast` (forall (a :: <*>_N).
- <a>_R
- %<'Many>_N ->_R <r>_R %<'Many>_N ->_R Sym (N:ST[0] <s>_N <a>_R)
- ; Sym (N:ReaderT[0] <*>_N <r>_R <ST s>_R <a>_N)
- :: Coercible
- (forall {a}. a -> r -> STRep s a)
- (forall {a}. a -> ReaderT r (ST s) a))
-"SPEC $fApplicativeReaderT @(ST s) @_"
- forall (@s) (@r) ($dApplicative :: Applicative (ST s)).
- $fApplicativeReaderT @(ST s) @r $dApplicative
- = $fApplicativeReaderT_$s$fApplicativeReaderT @s @r
-"SPEC $fFunctorReaderT @(ST s) @_"
- forall (@s) (@r) ($dFunctor :: Functor (ST s)).
- $fFunctorReaderT @(ST s) @r $dFunctor
- = $fApplicativeReaderT_$s$fFunctorReaderT @s @r
-"SPEC $fMonadReaderT @(ST s) @_"
- forall (@s) (@r) ($dMonad :: Monad (ST s)).
- $fMonadReaderT @(ST s) @r $dMonad
- = $fMonadAbstractIOSTReaderT_$s$fMonadReaderT @s @r
"USPEC useAbstractMonad @(ReaderT Int (ST s))"
forall (@s)
($dMonadAbstractIOST :: MonadAbstractIOST (ReaderT Int (ST s))).
=====================================
testsuite/tests/simplCore/should_compile/all.T
=====================================
@@ -435,7 +435,7 @@ test('T21851', [grep_errmsg(r'case.*w\$sf') ], multimod_compile, ['T21851', '-O
# One module, T22097.hs, has OPTIONS_GHC -ddump-simpl
test('T22097', [grep_errmsg(r'case.*wgoEven') ], multimod_compile, ['T22097', '-O -dno-typeable-binds -dsuppress-uniques'])
-test('T13873', [ grep_errmsg(r'SPEC') ], compile, ['-O -ddump-rules'])
+test('T13873', [ grep_errmsg(r'SPEC') ], compile, ['-O -ddump-rules -fpolymorphic-specialisation'])
test('T22357', normal, compile, ['-O'])
test('T22471', normal, compile, ['-O'])
test('T22347', normal, compile, ['-O -fno-full-laziness'])
@@ -443,8 +443,8 @@ test('T22347a', normal, compile, ['-O2 -fno-full-laziness'])
# T17366: expecting to see a rule
# Rule fired: SPEC/T17366 f @(Tagged tag) @_ (T17366)
-test('T17366', normal, multimod_compile, ['T17366', '-O -v0 -ddump-rule-firings'])
-test('T17366_AR', [grep_errmsg(r'SPEC')], multimod_compile, ['T17366_AR', '-O -v0 -ddump-rule-firings'])
+test('T17366', normal, multimod_compile, ['T17366', '-O -v0 -ddump-rule-firings -fpolymorphic-specialisation'])
+test('T17366_AR', [grep_errmsg(r'SPEC')], multimod_compile, ['T17366_AR', '-O -v0 -ddump-rule-firings -fpolymorphic-specialisation'])
test('T22375', normal, compile, ['-O -ddump-simpl -dsuppress-uniques -dno-typeable-binds -dsuppress-unfoldings'])
# One module, T21851_2.hs, has OPTIONS_GHC -ddump-simpl
@@ -467,7 +467,7 @@ test('T22623', normal, multimod_compile, ['T22623', '-O -v0'])
test('T22662', normal, compile, [''])
test('T22725', normal, compile, ['-O'])
test('T22502', normal, compile, ['-O'])
-test('T22611', [when(wordsize(32), skip), grep_errmsg(r'\$salterF') ], compile, ['-O -ddump-simpl -dsuppress-uniques -dsuppress-all'])
+test('T22611', [when(wordsize(32), skip), grep_errmsg(r'\$salterF') ], compile, ['-O -ddump-simpl -dsuppress-uniques -dsuppress-all -fpolymorphic-specialisation'])
test('T22715_2', normal, multimod_compile, ['T22715_2', '-v0 -O -fspecialise-aggressively'])
test('T22802', normal, compile, ['-O'])
test('T15205', normal, compile, ['-O -ddump-simpl -dno-typeable-binds -dsuppress-uniques'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fac496bc326c78275d1aba3e0d06f2693274e7d2...b360c896b389eec86e2fdc2565ae2021f30ee226
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fac496bc326c78275d1aba3e0d06f2693274e7d2...b360c896b389eec86e2fdc2565ae2021f30ee226
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/20230630/e1b125f3/attachment-0001.html>
More information about the ghc-commits
mailing list