Extracted regions can have both inputs and outputs. In addition, the CodeExtractor removes inputs that are only used in llvm.assumes, and sunken allocas (values are used entirely in the extracted region as denoted by lifetime intrinsics). We also cannot combine sections that have different constants in the same structural location, and these constants will have to elevated to argument. This patch deduplicates extracted functions that only have inputs and non of the special cases.
Details
Diff Detail
Event Timeline
There's quite a few dead variables added in this patch. Do they belong in later patches in the series?
llvm/lib/Transforms/IPO/IROutliner.cpp | ||
---|---|---|
281 | non-rhetorical question: should it be marked noduplicate too? | |
294 | dead variable | |
405 | ArrayRef | |
408 | elsewhere you have usually called them IRSC | |
420–422 | ||
430 | I think this needs to be folded into the assertion to avoid -Wundef in Release builds. | |
434 | emplace | |
476 | both of these variables are dead | |
542–544 | Unless you need to filter them for some reason? | |
561 | variable is dead | |
563 | I'd sink this to where it's used. | |
568 | Why is the first one skipped, and can this be a range-for? |
A lot of the dead variables belong to future patches, I'll make sure to weed them out in the next diff.
llvm/lib/Transforms/IPO/IROutliner.cpp | ||
---|---|---|
281 | I'm not entirely sure, it seems like it might be a good idea for safety. | |
568 | The first extracted function is used to construct the overall outlined function, so it is handled slightly differently. |
The URL was not included in commit message for 5cdc4f57e50bbe0d211c109517c17defe78e0b73. Closing manually.
non-rhetorical question: should it be marked noduplicate too?