Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,265
    • Issues 5,265
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 569
    • Merge requests 569
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #5302
Closed
Open
Issue created Jul 05, 2011 by reinerp@trac-reinerp

Unused arguments in join points

Sometimes GHC produces join points with unused parameters. In the example attached, we get join points like the following (when compiled with -O2):

...
    $j1_XHI
      :: GHC.Prim.Int#
         -> GHC.Types.Int
         -> (# Unboxed.FingerTree
                 Unboxed.Size (Unboxed.Node Unboxed.Size b_ahY),
               Unboxed.Node Unboxed.Size b_ahY,
               Unboxed.FingerTree
                 Unboxed.Size (Unboxed.Node Unboxed.Size b_ahY) #)
    [LclId, Arity=2, Str=DmdType LL]
    $j1_XHI =
      \ (x2_XE8 :: GHC.Prim.Int#) _ ->
...

which is always called as follows:

...
    $j1_XHI x2_XE2 (GHC.Types.I# x2_XE2)
...

i.e. where the second argument is a boxed version of the first. GHC should remove the dead parameter from the join point, to avoid unnecessary boxing.

I get this Core with 7.0.3 and with 7.1.20110629.

I've attached a self-contained example, as small as I can make it. (Making it smaller lets GHC do more unfolding and the problem disappears.) These join points occur inside the 'Deep' case of '$wsplitTree'.

Trac metadata
Trac field Value
Version 7.0.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking