We add an extra check to make sure that we do not outline calls to indirect functions, but outline whatever the IRSimilarityIdentifier finds with respect to calls.
Tests:
- Removing test/Transforms/IROutliner/illegal-calls.ll
- Adding test/Transforms/IROutliner/outlining-calls.ll
- Adding test/Transforms/IROutliner/illegal-indirect-calls.ll
I don't follow the logic behind needing a name for this to work. ISTM you could pass the callee pointer as another new arg, and everything else would Just Work (TM). What am I missing?