Currently code extractor uses parameters to pass outputs. Alloca/store/load instructions are used to get the output value in the parent functions. When there is only one output from the extracted code (this is one of the most common cases), using the function return for the only one output can facilitate the other transformations (eg, tail call opt). This is to modify the code for the extracted function to return the output value if there is only one output for the extracted region.
4.0 KiB
4.0 KiB