|
Jlm
|
Performs function inlining on functions that are determined to be good candidates, such as private functions that are only called from a single call site. More...
#include <inlining.hpp>


Classes | |
| struct | Context |
| class | Statistics |
Public Member Functions | |
| ~FunctionInlining () noexcept override | |
| FunctionInlining () | |
| FunctionInlining (const FunctionInlining &)=delete | |
| FunctionInlining & | operator= (const FunctionInlining &)=delete |
| void | Run (rvsdg::RvsdgModule &module, util::StatisticsCollector &statisticsCollector) override |
| Perform RVSDG transformation. More... | |
Public Member Functions inherited from jlm::rvsdg::Transformation | |
| virtual | ~Transformation () noexcept |
| Transformation (std::string_view Name) | |
| const std::string_view & | GetName () const noexcept |
| void | Run (RvsdgModule &module) |
| Perform RVSDG transformation. More... | |
Static Public Member Functions | |
| static void | inlineCall (rvsdg::SimpleNode &callNode, const rvsdg::LambdaNode &callee) |
| static bool | canBeInlined (const rvsdg::LambdaNode &callee) |
Private Member Functions | |
| bool | shouldInline (rvsdg::SimpleNode &callNode, rvsdg::LambdaNode &caller, rvsdg::LambdaNode &callee) |
| void | considerCallForInlining (rvsdg::SimpleNode &callNode, rvsdg::LambdaNode &callerLambda) |
| void | visitIntraProceduralRegion (rvsdg::Region ®ion, rvsdg::LambdaNode &lambda) |
| void | visitLambda (rvsdg::LambdaNode &lambda) |
| void | visitInterProceduralRegion (rvsdg::Region ®ion) |
Static Private Member Functions | |
| static void | inlineCall (rvsdg::SimpleNode &callNode, rvsdg::LambdaNode &caller, const rvsdg::LambdaNode &callee) |
| static bool | canBeInlined (rvsdg::Region ®ion, bool topLevelRegion) |
Private Attributes | |
| std::unique_ptr< Context > | context_ |
Performs function inlining on functions that are determined to be good candidates, such as private functions that are only called from a single call site.
Definition at line 24 of file inlining.hpp.
|
overridedefaultnoexcept |
| jlm::llvm::FunctionInlining::FunctionInlining | ( | ) |
Definition at line 89 of file inlining.cpp.
|
delete |
|
static |
Determines if there is anything in the function callee that prevents it from being inlined.
Definition at line 395 of file inlining.cpp.
|
staticprivate |
Determines if there is anything in the region that would prevent a function from being inlined. Recurses into subregions.
| region | the region in question |
| topLevelRegion | true if the region is the top level region in its lambda node |
Definition at line 344 of file inlining.cpp.
|
private |
Determines if the given callNode is a call that can be inlined, and if it should be inlined. If yes, inlining is performed.
| callNode | the node containing the CallOperation |
| callerLambda | the lambda containing the call node, a.k.a. the caller |
Definition at line 411 of file inlining.cpp.
|
static |
Performs inlining of the given call node, targeting the given callee function
| callNode | the call to inline |
| callee | the function being inlined |
Definition at line 337 of file inlining.cpp.
|
staticprivate |
Performs inlining of the given call
| callNode | the node containing the CallOperation |
| caller | the lambda node of the caller |
| callee | the lambda node of the callee |
Definition at line 278 of file inlining.cpp.
|
delete |
|
overridevirtual |
Perform RVSDG transformation.
| module | RVSDG module the transformation is performed on. |
| statisticsCollector | Statistics collector for collecting transformation statistics. |
Implements jlm::rvsdg::Transformation.
Definition at line 504 of file inlining.cpp.
|
private |
Determines if the given call should be inlined or not.
| callNode | the node containing the CallOperation |
| caller | the lambda node of the caller |
| callee | the lambda node of the callee |
Definition at line 401 of file inlining.cpp.
|
private |
Visits all lambda nodes in the given region, including in subregions. In each visited lambda, inlining transformations are applied if determined to be beneficial.
| region | the region in question |
Definition at line 486 of file inlining.cpp.
|
private |
Recursively visits all call operations in the region and its subregions, and performs inlining if determined to be beneficial.
| region | the region being visited |
| lambda | the function to which the region belongs |
Definition at line 443 of file inlining.cpp.
|
private |
Visits the given function, performing inlining of calls inside it, and storing facts about it that may be relevant when considering inlining calls to the function.
| lambda | the function in question |
Definition at line 467 of file inlining.cpp.
|
private |
Definition at line 129 of file inlining.hpp.