Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loopification #868

Merged
merged 6 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/Eta/Main/DynFlags.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3512,7 +3512,7 @@ optLevelFlags -- see Note [Documenting optimisation flags]
, ([1,2], Opt_FloatIn)
, ([1,2], Opt_FullLaziness)
, ([1,2], Opt_IgnoreAsserts)
, ([1,2], Opt_Loopification)
, ([0,1,2], Opt_Loopification) -- always to avoid SOE on JVM (#866)
, ([1,2], Opt_Specialise)
, ([1,2], Opt_Strictness)
, ([1,2], Opt_UnboxSmallStrictFields)
Expand Down
7 changes: 7 additions & 0 deletions compiler/Eta/Prelude/PrimOp.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4877,6 +4877,13 @@ primOpHasSideEffects WriteJFloatArrayOp = True
primOpHasSideEffects NewJDoubleArrayOp = True
primOpHasSideEffects ReadJDoubleArrayOp = True
primOpHasSideEffects WriteJDoubleArrayOp = True
-- Start
-- These don't technically do any side effects since they either return one of the args, or
-- a new Object, but will be treated as such to avoid speculation in the optimizer.
primOpHasSideEffects FreshStateTokenOp = True
primOpHasSideEffects FreshObjectTokenOp = True
primOpHasSideEffects FreshNullObjectTokenOp = True
-- End
primOpHasSideEffects _ = False

primOpCanFail :: PrimOp -> Bool
Expand Down
6 changes: 4 additions & 2 deletions compiler/Eta/StrAnal/DmdAnal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import Eta.Types.FamInstEnv
import Eta.Utils.Util
import Eta.Utils.Maybes ( isJust )
import Eta.Prelude.TysWiredIn
import Eta.Prelude.TysPrim ( realWorldStatePrimTy )
import Eta.Prelude.TysPrim ( realWorldStatePrimTy, jobjectPrimTyCon )
import Eta.Main.ErrUtils ( dumpIfSet_dyn )
import Eta.BasicTypes.Name ( getName, stableNameCmp )
import Data.Function ( on )
Expand Down Expand Up @@ -343,7 +343,9 @@ io_hack_reqd :: CoreExpr -> DataCon -> [Var] -> Bool
io_hack_reqd scrut con bndrs
| (bndr:_) <- bndrs
, con == tupleCon UnboxedTuple 2
, idType bndr `eqType` realWorldStatePrimTy
, let bndrType = idType bndr
, bndrType `eqType` realWorldStatePrimTy ||
maybe False (\(tc,_) -> tc == jobjectPrimTyCon) (splitTyConApp_maybe bndrType)
, (fun, _) <- collectArgs scrut
= case fun of
Var f -> not (isPrimOpId f)
Expand Down
2 changes: 1 addition & 1 deletion eta-serv/eta-serv.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: eta-serv
-- @VERSION_CHANGE@
-- @BUILD_NUMBER@
version: 0.8.6.2
version: 0.8.6.3
license: BSD3
license-file: LICENSE
maintainer: typeleadhq@gmail.com
Expand Down
2 changes: 1 addition & 1 deletion eta.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: eta
-- @VERSION_CHANGE@
-- @BUILD_NUMBER@
version: 0.8.6.2
version: 0.8.6.3
description: Modern Haskell on the JVM
license: BSD3
license-file: LICENSE
Expand Down
2 changes: 1 addition & 1 deletion libraries/eta-meta/eta-meta.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: eta-meta
version: 0.8.6.2
version: 0.8.6.3
license: BSD3
license-file: LICENSE
category: Metaprogamming
Expand Down
2 changes: 1 addition & 1 deletion libraries/eta-repl/eta-repl.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: eta-repl
-- @VERSION_CHANGE@
-- @BUILD_NUMBER@
version: 0.8.6.2
version: 0.8.6.3
license: BSD3
license-file: LICENSE
category: Eta Tools
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
public class RuntimeInternalError extends Error {

public RuntimeInternalError(String message) {
// @VERSION_CHANGE@
// @BUILD_NUMBER@
// @BUILD_NUMBER_INTERNAL@
super("\n[Eta v0.8.6b2] " + message + "\nPlease report this as a bug: https://github.com/typelead/eta/issues");
super("\n[Eta Panic] " + message + "\nPlease report this as a bug: https://github.com/typelead/eta/issues");
}
}
2 changes: 1 addition & 1 deletion tests/suite/Driver.hs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ goldenVsFileDiff' name cmdf ref new act =
upd _ = BS.readFile new >>= BS.writeFile ref

ignored :: Set String
ignored = S.fromList ["Echo", "FullExportTest", "tc141", "tc168", "tc211",
ignored = S.fromList ["Echo", "tc141", "tc168", "tc211",
"T14163", "T4912", "T6018", "T7541", "InstanceMethod", "TcTypeNatSimple",
"TcTypeSymbolSimple", "tcfail150", "tcfail205", "annrun01", "TH_overloadedlabels"]

Expand Down
9 changes: 8 additions & 1 deletion tests/suite/ffi/run/FullExportTest.stdout
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
ExitFailure 1Error: Could not find or load main class eta.main
89
89
144
144
233
233
377
377
2 changes: 1 addition & 1 deletion utils/eta-pkg/eta-pkg.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: eta-pkg
-- @VERSION_CHANGE@
-- @BUILD_NUMBER@
-- @BUILD_NUMBER_INTERNAL@
version: 0.8.6.2
version: 0.8.6.3
copyright: XXX
license: BSD3
-- XXX License-File: LICENSE
Expand Down