id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
7663	consider free variables as well as parameters in inline discounts	nfrisby		"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""."	feature request	closed	normal		Compiler	7.7	duplicate			Unknown/Multiple	Unknown/Multiple	None/Unknown					
