Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Glasgow Haskell Compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
34728de0
Commit
34728de0
authored
Sep 04, 2013
by
nfrisby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
documentation and comments for -ffun-to-thunk and -flate-dmd-anal
parent
6fff2166
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
20 deletions
+40
-20
compiler/stranal/WwLib.lhs
compiler/stranal/WwLib.lhs
+5
-2
docs/users_guide/flags.xml
docs/users_guide/flags.xml
+17
-11
docs/users_guide/using.xml
docs/users_guide/using.xml
+18
-7
No files found.
compiler/stranal/WwLib.lhs
View file @
34728de0
...
...
@@ -214,8 +214,11 @@ the sharing of E. Since absence analysis and worker-wrapper are keen
to remove such unused arguments, we add in a void argument to prevent
the function from becoming a thunk.
The user can avoid that argument with the -ffun-to-thunk
flag. However, removing all the value argus may introduce space leaks.
The user can avoid adding the void argument with the -ffun-to-thunk
flag. However, this can create sharing, which may be bad in two ways. 1) It can
create a space leak. 2) It can prevent inlining *under a lambda*. If w/w
removes the last argument from a function f, then f now looks like a thunk, and
so f can't be inlined *under a lambda*.
Note [All One-Shot Arguments of a Worker]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
docs/users_guide/flags.xml
View file @
34728de0
...
...
@@ -1585,17 +1585,6 @@
<entry><option>
-fno-dicts-strict
</option></entry>
</row>
<row>
<entry><option>
-ffun-to-thunk
</option></entry>
<entry>
Worker-wrapper removes unused arguments; this flag
lets it thusly remove all value lambdas. Doing so creates
a thunk where it was previously a function closure, which
may save recomputation but also risks a space leak. Off by
default.
</entry>
<entry>
dynamic
</entry>
<entry><option>
-fno-fun-to-thunk
</option></entry>
</row>
<row>
<entry><option>
-fdo-eta-reduction
</option></entry>
<entry>
Enable eta-reduction. Implied by
<option>
-O
</option>
.
</entry>
...
...
@@ -1661,6 +1650,15 @@
<entry><option>
-fno-full-laziness
</option></entry>
</row>
<row>
<entry><option>
-ffun-to-thunk
</option></entry>
<entry>
Allow worker-wrapper to convert a function closure into a
thunk if the function does not use any of its arguments. Off by
default.
</entry>
<entry>
dynamic
</entry>
<entry><option>
-fno-fun-to-thunk
</option></entry>
</row>
<row>
<entry><option>
-fignore-asserts
</option></entry>
<entry>
Ignore assertions in the source
</entry>
...
...
@@ -1675,6 +1673,14 @@
<entry><option>
-fno-ignore-interface-pragmas
</option></entry>
</row>
<row>
<entry><option>
-flate-dmd-anal
</option></entry>
<entry>
Run demand analysis again, at the end of the simplification
pipeline
</entry>
<entry>
dynamic
</entry>
<entry><option>
-fno-late-dmd-anal
</option></entry>
</row>
<row>
<entry><option>
-fliberate-case
</option></entry>
<entry>
Turn on the liberate-case transformation. Implied by
<option>
-O2
</option>
.
</entry>
...
...
docs/users_guide/using.xml
View file @
34728de0
...
...
@@ -2095,16 +2095,15 @@ f "2" = 2
<varlistentry>
<term>
<option>
-
-
ffun-to-thunk
</option>
<option>
-ffun-to-thunk
</option>
<indexterm><primary><option>
-fignore-asserts
</option></primary></indexterm>
</term>
<listitem>
<para>
Worker-wrapper removes unused arguments, but usually we
do not remove them all, lest it turn a function closure into a thunk,
thereby perhaps causing extra allocation (since let-no-escape can't happen)
and/or a space leak. This flag
allows worker/wrapper to remove
<emphasis>
all
</emphasis>
value lambdas.
Off by default.
<para>
Worker-wrapper removes unused arguments, but usually we do
not remove them all, lest it turn a function closure into a thunk,
thereby perhaps creating a space leak and/or disrupting inlining.
This flag allows worker/wrapper to remove
<emphasis>
all
</emphasis>
value lambdas. Off by default.
</para>
</listitem>
</varlistentry>
...
...
@@ -2137,6 +2136,18 @@ f "2" = 2
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>
-flate-dmd-anal
</option>
<indexterm><primary><option>
-flate-dmd-anal
</option></primary></indexterm>
</term>
<listitem>
<para><emphasis>
Off by default.
</emphasis>
Run demand analysis
again, at the end of the simplification pipeline
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>
-fliberate-case
</option>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment