Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Travis Whitaker
GHC
Commits
5c058a0f
Commit
5c058a0f
authored
12 years ago
by
batterseapower
Browse files
Options
Downloads
Patches
Plain Diff
Mark module SUPERINLINABLE by default (otherwise SC is almost an identity transformation)
parent
680f9313
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compiler/supercompile/Supercompile.hs
+2
-1
2 additions, 1 deletion
compiler/supercompile/Supercompile.hs
compiler/supercompile/Supercompile/StaticFlags.hs
+3
-0
3 additions, 0 deletions
compiler/supercompile/Supercompile/StaticFlags.hs
with
5 additions
and
1 deletion
compiler/supercompile/Supercompile.hs
+
2
−
1
View file @
5c058a0f
...
...
@@ -17,6 +17,7 @@ module Supercompile (supercompileProgram, supercompileProgramSelective) where
-- Probably can't/shouldn't do this if the wildcard binder y is used in the RHS.
import
Supercompile.GHC
import
Supercompile.StaticFlags
import
Supercompile.Utilities
import
qualified
Supercompile.Core.Syntax
as
S
import
qualified
Supercompile.Core.FreeVars
as
S
...
...
@@ -263,7 +264,7 @@ supercompile e = -- liftM (termToCoreExpr . snd) $
where
unfs
=
termUnfoldings
e'
-- NB: ensure we mark any child bindings of bindings marked SUPERINLINABLE in *this module* as SUPERINLINABLE,
-- just like we would if we imported a SUPERINLINABLE binding
e'
=
superinlinableLexically
False
$
runParseM
anfUniqSupply'
$
coreExprToTerm
e
e'
=
superinlinableLexically
mODULE_SUPERINLINABLE
$
runParseM
anfUniqSupply'
$
coreExprToTerm
e
supercompileProgram
::
[
CoreBind
]
->
IO
[
CoreBind
]
supercompileProgram
binds
=
supercompileProgramSelective
selector
binds
...
...
This diff is collapsed.
Click to expand it.
compiler/supercompile/Supercompile/StaticFlags.hs
+
3
−
0
View file @
5c058a0f
...
...
@@ -161,6 +161,9 @@ pOSITIVE_INFORMATION = lookUp $ fsLit "-fsupercompiler-positive-information"
pREINITALIZE_MEMO_TABLE
::
Bool
pREINITALIZE_MEMO_TABLE
=
not
$
lookUp
$
fsLit
"-fsupercompiler-no-preinitalize"
mODULE_SUPERINLINABLE
::
Bool
mODULE_SUPERINLINABLE
=
not
$
lookUp
$
fsLit
"-fsupercompiler-no-module-superinlinable"
-- FIXME: turning this off is actually broken right now
uSE_LET_BINDINGS
::
Bool
uSE_LET_BINDINGS
=
not
$
lookUp
$
fsLit
"-fsupercompiler-no-let-bindings"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment