ΒΆllvm::CallInst* replaceCalledFunction(
    llvm::Module& M,
    llvm::OutlinableRegion& Region)

Description

Replace the extracted function in the Region with a call to the overall function constructed from the deduplicated similar regions, replacing and remapping the values passed to the extracted function as arguments to the new arguments of the overall function.

Declared at: llvm/lib/Transforms/IPO/IROutliner.cpp:1421

Parameters

llvm::Module& M
- The module to outline from.
llvm::OutlinableRegion& Region
- The regions of extracted code to be replaced with a new function.

Returns

a call instruction with the replaced function.