-
Notifications
You must be signed in to change notification settings - Fork 2
Function inlining pass #1030
Copy link
Copy link
Open
Labels
codegenIssues related with code generation on any backendIssues related with code generation on any backendloweringRelated to the general lowering of AST into simpler AST and/or IRsRelated to the general lowering of AST into simpler AST and/or IRs
Metadata
Metadata
Assignees
Labels
codegenIssues related with code generation on any backendIssues related with code generation on any backendloweringRelated to the general lowering of AST into simpler AST and/or IRsRelated to the general lowering of AST into simpler AST and/or IRs
Another powerful optimisation pass which any serious compiler will perform.
The function inlining pass will attempt to small functions into other functions to avoid the "cost" of a call.
There is no definitive answer to when a function should be inlined in or not, it often depends on a number of heuristics and cost-optimisation approaches.