diff options
m--------- | .arc-linters/arcanist-external-json-linter | 0 | ||||
-rw-r--r-- | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 40 | ||||
m--------- | libffi-tarballs | 0 | ||||
m--------- | libraries/Cabal | 0 | ||||
m--------- | libraries/Win32 | 0 | ||||
m--------- | libraries/array | 0 | ||||
m--------- | libraries/binary | 0 | ||||
m--------- | libraries/containers | 0 | ||||
m--------- | libraries/deepseq | 0 | ||||
m--------- | libraries/directory | 0 | ||||
m--------- | libraries/dph | 0 | ||||
m--------- | libraries/filepath | 0 | ||||
m--------- | libraries/haskeline | 0 | ||||
m--------- | libraries/hpc | 0 | ||||
m--------- | libraries/parallel | 0 | ||||
m--------- | libraries/pretty | 0 | ||||
m--------- | libraries/primitive | 0 | ||||
m--------- | libraries/process | 0 | ||||
m--------- | libraries/random | 0 | ||||
m--------- | libraries/stm | 0 | ||||
m--------- | libraries/terminfo | 0 | ||||
m--------- | libraries/transformers | 0 | ||||
m--------- | libraries/unix | 0 | ||||
m--------- | libraries/vector | 0 | ||||
m--------- | libraries/xhtml | 0 | ||||
m--------- | nofib | 0 | ||||
m--------- | utils/haddock | 0 | ||||
m--------- | utils/hsc2hs | 0 |
28 files changed, 2 insertions, 38 deletions
diff --git a/.arc-linters/arcanist-external-json-linter b/.arc-linters/arcanist-external-json-linter -Subproject 957f9e4e8eb422dcb72f02f07767a1ed5969baa +Subproject 85ece0f8653e7b1e7de6024d372cfeaf36ab5fa diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs index 81791628d5..3a56b33753 100644 --- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs +++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs @@ -14,7 +14,7 @@ import LlvmCodeGen.Base import LlvmCodeGen.Regs import BlockId -import CodeGen.Platform ( activeStgRegs, callerSaves ) +import CodeGen.Platform ( activeStgRegs ) import CLabel import Cmm import PprCmm @@ -211,7 +211,6 @@ genCall t@(PrimTarget (MO_Prefetch_Data localityInt)) [] args fptr <- liftExprData $ getFunPtr funTy t argVars' <- castVarsW Signed $ zip argVars argTy - doTrashStmts let argSuffix = [mkIntLit i32 0, mkIntLit i32 localityInt, mkIntLit i32 1] statement $ Expr $ Call StdCall fptr (argVars' ++ argSuffix) [] | otherwise = panic $ "prefetch locality level integer must be between 0 and 3, given: " ++ (show localityInt) @@ -294,7 +293,6 @@ genCall t@(PrimTarget op) [] args fptr <- getFunPtrW funTy t argVars' <- castVarsW Signed $ zip argVars argTy - doTrashStmts let alignVal = mkIntLit i32 align arguments = argVars' ++ (alignVal:isVolVal) statement $ Expr $ Call StdCall fptr arguments [] @@ -449,7 +447,6 @@ genCall target res args = runStmtsDecls $ do | never_returns = statement $ Unreachable | otherwise = return () - doTrashStmts -- make the actual call case retTy of @@ -1786,12 +1783,9 @@ genLit _ CmmHighStackMark funPrologue :: LiveGlobalRegs -> [CmmBlock] -> LlvmM StmtData funPrologue live cmmBlocks = do - trash <- getTrashRegs let getAssignedRegs :: CmmNode O O -> [CmmReg] getAssignedRegs (CmmAssign reg _) = [reg] - -- Calls will trash all registers. Unfortunately, this needs them to - -- be stack-allocated in the first place. - getAssignedRegs (CmmUnsafeForeignCall _ rs _) = map CmmGlobal trash ++ map CmmLocal rs + getAssignedRegs (CmmUnsafeForeignCall _ rs _) = map CmmLocal rs getAssignedRegs _ = [] getRegsBlock (_, body, _) = concatMap getAssignedRegs $ blockToList body assignedRegs = nub $ concatMap (getRegsBlock . blockSplit) cmmBlocks @@ -1848,31 +1842,6 @@ funEpilogue live = do let (vars, stmts) = unzip loads return (catMaybes vars, concatOL stmts) - --- | A series of statements to trash all the STG registers. --- --- In LLVM we pass the STG registers around everywhere in function calls. --- So this means LLVM considers them live across the entire function, when --- in reality they usually aren't. For Caller save registers across C calls --- the saving and restoring of them is done by the Cmm code generator, --- using Cmm local vars. So to stop LLVM saving them as well (and saving --- all of them since it thinks they're always live, we trash them just --- before the call by assigning the 'undef' value to them. The ones we --- need are restored from the Cmm local var and the ones we don't need --- are fine to be trashed. -getTrashStmts :: LlvmM LlvmStatements -getTrashStmts = do - regs <- getTrashRegs - stmts <- flip mapM regs $ \ r -> do - reg <- getCmmReg (CmmGlobal r) - let ty = (pLower . getVarType) reg - return $ Store (LMLitVar $ LMUndefLit ty) reg - return $ toOL stmts - -getTrashRegs :: LlvmM [GlobalReg] -getTrashRegs = do plat <- getLlvmPlatform - return $ filter (callerSaves plat) (activeStgRegs plat) - -- | Get a function pointer to the CLabel specified. -- -- This is for Haskell functions, function type is assumed, so doesn't work @@ -1994,11 +1963,6 @@ getCmmRegW = lift . getCmmReg genLoadW :: Atomic -> CmmExpr -> CmmType -> WriterT LlvmAccum LlvmM LlvmVar genLoadW atomic e ty = liftExprData $ genLoad atomic e ty -doTrashStmts :: WriterT LlvmAccum LlvmM () -doTrashStmts = do - stmts <- lift getTrashStmts - tell $ LlvmAccum stmts mempty - -- | Return element of single-element list; 'panic' if list is not a single-element list singletonPanic :: String -> [a] -> a singletonPanic _ [x] = x diff --git a/libffi-tarballs b/libffi-tarballs -Subproject 96d02800759dcedb9c98a18a5797b86eb3b6e7c +Subproject ec37a68838566cb830c33cb30bfade003a306cf diff --git a/libraries/Cabal b/libraries/Cabal -Subproject fe10982db1f2fa7d828fc5f8ddaa5beedceadde +Subproject 082cf2066b7206d3b12a9f92d832236e2484b4c diff --git a/libraries/Win32 b/libraries/Win32 -Subproject ca5fbc12851b98a52f96a43ea19c54c9ecf0f9e +Subproject 147a0af92ac74ec58b209e16aeb1cf03bddf948 diff --git a/libraries/array b/libraries/array -Subproject 82a29b198a67f54de2f72d96ca077800afbfbe4 +Subproject 9a23feac0b78e713c0f7877066fa24dbc2217c2 diff --git a/libraries/binary b/libraries/binary -Subproject 38adf7ce1ad6a497fba61de500c3f35b186303a +Subproject d4a030ab448191f664fc734bfbee61450a6fa5a diff --git a/libraries/containers b/libraries/containers -Subproject e5b3bbaeb79cbf3a2c99bd14257d4199cc651b7 +Subproject 6414704b892a6dc56a1b17e3a530d777b70f56a diff --git a/libraries/deepseq b/libraries/deepseq -Subproject 4f031810fc0eaf5ba12d805ff8df7f15e561e40 +Subproject 0b22c9825ef79c1ee41d2f19e7c997f5cdc9349 diff --git a/libraries/directory b/libraries/directory -Subproject e9debc1d4a9c4b608a32f60bae173ed10f89fdc +Subproject af307f52ca94ed232d1372fc6760a4b3efa243c diff --git a/libraries/dph b/libraries/dph new file mode 160000 +Subproject 64eca669f13f4d216af9024474a3fc73ce10179 diff --git a/libraries/filepath b/libraries/filepath -Subproject b10724be8a907e191d153ad6674415be0c1325f +Subproject 141cddb606fd6f6a60f730fed3d57502b93c14a diff --git a/libraries/haskeline b/libraries/haskeline -Subproject 84a7b2b0afb9325cfcedc3ca56603539f0e8af3 +Subproject d5ef581a19218b96946921c5f092bafe1739e30 diff --git a/libraries/hpc b/libraries/hpc -Subproject 85e04edd6e29de549301cf10d2c725cbf29b209 +Subproject 1544cf04c38ab3b613dba1e0737de49c3332165 diff --git a/libraries/parallel b/libraries/parallel -Subproject 5015bc74127beac29b4d08dcb3beb230149fed2 +Subproject d2e2a5e630fdfa0e9bc8c2d8c7d134ad3500b5d diff --git a/libraries/pretty b/libraries/pretty -Subproject c3a1469306b35fa5d023dc570554f97f1a90435 +Subproject 56bc78e2c2cfcc850f6fec87fe79743750d4c8b diff --git a/libraries/primitive b/libraries/primitive new file mode 160000 +Subproject 1af89788d5c9ab7a0a93ff6764e1770e6c80d95 diff --git a/libraries/process b/libraries/process -Subproject 36a3ad577e31e8c3336c7464b252fc2c9b01a20 +Subproject 423a9efa8b1b22304af0acc8b950289026b288e diff --git a/libraries/random b/libraries/random new file mode 160000 +Subproject c72dd0a01ae6255bead2d4fad33f002bb568403 diff --git a/libraries/stm b/libraries/stm -Subproject 5f4d7c6d07a760d935c9d96e62999f1ad38a5e4 +Subproject 9c3c3bb28834d1ba9574be7f887c8914afd4232 diff --git a/libraries/terminfo b/libraries/terminfo -Subproject 27e82750fac178fc6e049fe44be6de45f24814a +Subproject 02ebf00cb2ab59d7924909306b7a791c7959f70 diff --git a/libraries/transformers b/libraries/transformers -Subproject 80557845cdc0e72bc05cec19cf7a1bf5495e9e6 +Subproject 10348c4bbf60debbfc82463e1035aca1cb7b51b diff --git a/libraries/unix b/libraries/unix -Subproject f4f500d53b4c73e542a377a5c675309dbbe5774 +Subproject fcaa530a8fdd3897353bdf246752a91d675aad4 diff --git a/libraries/vector b/libraries/vector new file mode 160000 +Subproject 224eccbac0125b7bd302f24063bbb473b2c2e1d diff --git a/libraries/xhtml b/libraries/xhtml -Subproject 721779acc35dccd6a43a292b24099b65d93d390 +Subproject 6358594eb5139f6760e2ada72718d69fed5a101 diff --git a/nofib b/nofib -Subproject a80baacfc29cc2e7ed50e94f3cd2648d11b1d7d +Subproject eccf532410eee45f30c07f389f7029871fd603d diff --git a/utils/haddock b/utils/haddock -Subproject b5372b7d86e3058b419076641dd3048258c4ddf +Subproject 7cecbd969298d5aa576750864a69fa5f70f71c3 diff --git a/utils/hsc2hs b/utils/hsc2hs -Subproject 769ac3cda8bd766e9a41a74eb681e2de1bac679 +Subproject 936b0885ee794db83dc8473e17e153936e56d62 |