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
57a11b6b
Commit
57a11b6b
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-09-09 17:57:07 by sof]
import update;
parent
2204f685
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/simplCore/SimplEnv.lhs
+9
-6
9 additions, 6 deletions
ghc/compiler/simplCore/SimplEnv.lhs
with
9 additions
and
6 deletions
ghc/compiler/simplCore/SimplEnv.lhs
+
9
−
6
View file @
57a11b6b
...
...
@@ -50,14 +50,15 @@ IMP_Ubiq(){-uitous-}
IMPORT_DELOOPER(SmplLoop) -- breaks the MagicUFs / SimplEnv loop
#endif
import BinderInfo ( orBinderInfo, andBinderInfo, noBinderInfo,
BinderInfo(..){-instances, too-}, FunOrArg, DuplicationDanger, InsideSCC
import BinderInfo ( orBinderInfo, andBinderInfo, noBinderInfo, isOneOcc,
okToInline,
BinderInfo {-instances, too-}
)
import CmdLineOpts ( switchIsOn, intSwitchSet, opt_UnfoldingCreationThreshold,
SimplifierSwitch(..), SwitchResult(..)
)
import CoreSyn
import CoreUnfold ( mkFormSummary,
okToInline,
couldBeSmallEnoughToInline,
import CoreUnfold ( mkFormSummary, couldBeSmallEnoughToInline,
whnfOrBottom,
Unfolding(..), UfExpr, RdrName,
SimpleUnfolding(..), FormSummary(..),
calcUnfoldingGuidance, UnfoldingGuidance(..)
...
...
@@ -602,7 +603,9 @@ extendEnvGivenBinding env@(SimplEnv chkr encl_cc ty_env in_id_env out_id_env con
occ_info out_id rhs
= SimplEnv chkr encl_cc ty_env in_id_env new_out_id_env new_con_apps
where
new_out_id_env | okToInline form occ_info (couldBeSmallEnoughToInline guidance)
new_out_id_env | okToInline (whnfOrBottom form)
(couldBeSmallEnoughToInline guidance)
occ_info
= out_id_env_with_unfolding
| otherwise
= out_id_env
...
...
@@ -647,8 +650,8 @@ extendEnvGivenBinding env@(SimplEnv chkr encl_cc ty_env in_id_env out_id_env con
is_interesting v = _scc_ "eegnr.mkidset"
case lookupIdEnv out_id_env v of
Just (_,
OneOcc _ _ _ _ _, _) -> True
other
-> False
Just (_,
occ, _) -> isOneOcc occ
other
-> False
-- Compute unfolding details
rhs_info = OutUnfolding unf_cc (SimpleUnfolding form guidance template)
...
...
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