Cheng Shao pushed to branch wip/fix-use-std-ap-thunk at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • changelog.d/fix-use-std-ap-thunk
    1
    +section: codegen
    
    2
    +synopsis: Fix redundant AP thunk codegen when not using -ticky-ap-thunk
    
    3
    +issues: #27502
    
    4
    +mrs: !16340

  • compiler/GHC/StgToCmm/Bind.hs
    ... ... @@ -280,7 +280,7 @@ cgRhs id (StgRhsClosure fvs cc upd_flag args body _typ)
    280 280
       = do
    
    281 281
         profile <- getProfile
    
    282 282
         check_tags <- stgToCmmDoTagCheck <$> getStgToCmmConfig
    
    283
    -    use_std_ap_thunk <- stgToCmmTickyAP <$> getStgToCmmConfig
    
    283
    +    use_std_ap_thunk <- not . stgToCmmTickyAP <$> getStgToCmmConfig
    
    284 284
         mkRhsClosure profile use_std_ap_thunk check_tags id cc (nonVoidIds (dVarSetElems fvs)) upd_flag args body
    
    285 285
     
    
    286 286
     ------------------------------------------------------------------------