Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#7664 closed feature request (duplicate)

consider free variables as well as parameters in inline discounts

Reported by: nfrisby Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: 3781 Differential Rev(s):
Wiki Page:


The inliner assigns discount values for scrutinized parameters but not for scrutinized free variables.

Experimenting with an aggressive lambda float at the end of the core2core pipeline identified a situation where (effectively) assigning discounts to free variables gives a performance boost. (The free variables become parameters during the float and hence are then assigned discounts.)

For spectral/boyer2, doing the late lambda float and then simplifying results in a -7% improvement in allocation. Without the simplifications, the late lambda float alone does not change allocation: thus the lion's share of the -7% could be attained simply by assigning discounts to scrutinized free variables.

For reference: the function in boyer2 that gets inlined is a join point that arises near the top of the worker for "Rewritefns.onewayunify".

Change History (4)

comment:1 Changed 5 years ago by igloo

difficulty: Unknown
Resolution: duplicate
Status: newclosed

Duplicate of #7663

comment:2 Changed 5 years ago by nfrisby

Resolution: duplicate
Status: closednew

comment:3 Changed 5 years ago by nfrisby

Resolution: duplicate
Status: newclosed

comment:4 Changed 5 years ago by nfrisby

Sorry -- apparently got confused twice! I was intending to close #7663 as a duplicate of #3781.

Note: See TracTickets for help on using tickets.