I second the fact that a way to outline specific function regions
independently of the partial inliner sound very useful. I am not sure
however if we would want a mode within the partialInliner or something
completely independent.As a general question, does anybody has a clear idea of what are the
constraints on the region CodeExtractor is currently able to handle ?
Going through the code, it looks like the only requirement is for the
header to dominate all the BB in the region ;
It has some additional constraints on the types of instructions that it
will actually outline, see isBlockValidForExtraction in CodeExtractor.cpp.
For example, it prevents outlining things like invokes, allocas, invokes,
etc. There is also a restriction that the user needs to handle PHI nodes
that have inputs from more than one extracted block. This is handled in
PartialInliner.cpp currently but it applies to anything that uses it. The
comment in PartialInliner.cpp:
// Special hackery is needed with PHI nodes that have inputs from more than
// one extracted block. For simplicity, just split the PHIs into a
two-level
// sequence of PHIs, some of which will go in the extracted region, and
some
// of which will go outside.
Thanks,
River Riddle