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
Model registry
Operate
Terraform modules
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
Gesh
GHC
Commits
866e77bc
Commit
866e77bc
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-05-18 04:30:22 by sof]
parent
a6e43378
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/driver/ordering-passes
+9
-9
9 additions, 9 deletions
ghc/driver/ordering-passes
with
9 additions
and
9 deletions
ghc/driver/ordering-passes
+
9
−
9
View file @
866e77bc
...
...
@@ -243,15 +243,15 @@ f_worker a b c d = let x = (a,b)
True -> (x,x)
False -> ((1,1),(2,2))
in this case the simplifier will remove the binding for y
as it is not used (we expected this to happen very often, but we do
not know how many "reboxers" are eventually removed and how many are
kept), and will keep the binding for x.
But notice that x is only used in *one* of the branches in the case,
but is always being allocated! The floating inwards pass would push
its definition into the True branch.
in this case the simplifier will remove the binding for y as it is not
used (we expected this to happen very often, but we do not know how
many "reboxers" are eventually removed and how many are kept), and
will keep the binding for x. But notice that x is only used in *one*
of the branches in the case, but is always being allocated! The
floating inwards pass would push its definition into the True branch.
A similar benefit occurs if it is only used inside a let definition.
These are basically the advantages of floating inwards, but they are
only exposed after the S.A./worker-wrapperisation of the code!
As we also have reasons to float inwards before S.A. we have to run it twice.
only exposed after the S.A./worker-wrapperisation of the code! As we
also have reasons to float inwards before S.A. we have to run it
twice.
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