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
Iterations
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
haskell-wasm
GHC
Commits
fcc3ae6e
Commit
fcc3ae6e
authored
5 months ago
by
Andreas Klebinger
Committed by
Marge Bot
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Clarify INLINE unfolding optimization docs.
Fixes #24660
parent
9279619f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/users_guide/exts/pragmas.rst
+8
-5
8 additions, 5 deletions
docs/users_guide/exts/pragmas.rst
with
8 additions
and
5 deletions
docs/users_guide/exts/pragmas.rst
+
8
−
5
View file @
fcc3ae6e
...
...
@@ -393,12 +393,15 @@ has a number of other effects:
pragmas is to expose functions in ``f``\'s RHS that have rewrite
rules, and it's no good if those functions have been optimised away.
So *GHC guarantees to
inlin
e precisely the code that you wrote*
, no
more and no less.
It does this by capturing a copy of the definition
So *GHC guarantees to
behav
e precisely
as if it inlined
the code that you wrote*
.
It does this by capturing a copy of the definition
of the function to use for inlining (we call this the "inline-RHS"),
which it leaves untouched, while optimising the ordinarily RHS as
usual. For externally-visible functions the inline-RHS (not the
optimised RHS) is recorded in the interface file.
which it only optimizes in ways which don't break this promise.
For example if inlining is explicitly delayed through phase control GHC will
apply optimizations which happen before the ``INLINE`` pragma becomes
active to the inline-RHS while optimising the ordinarily RHS as usual.
For externally-visible functions
the inline-RHS (not the optimised RHS) is recorded in the interface file.
- An ``INLINE`` function is not worker/wrappered by strictness analysis.
It's going to be inlined wholesale instead.
...
...
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