Page MenuHomePhabricator

[IRSim][IROutliner] Treating Called Functions as Values and Outlining Indirect Calls
Needs ReviewPublic

Authored by AndrewLitteken on Sep 8 2021, 9:47 AM.

Details

Reviewers
paquette
jroelofs
Summary

The outliner currently requires that function calls not be indirect calls, and have that the function name, and function type must match, as well as other attributes such as calling conventions. This patch treats called functions as values, and just another operand, and named function calls as constants. This allows functions to be treated like any other constant, or input and output into the outlined functions.

There are also debugging flags added to enforce the old behaviors where indirect calls not be allowed, and to enforce the old rule that function calls names must also match.

Diff Detail

Event Timeline

AndrewLitteken created this revision.Sep 8 2021, 9:47 AM
AndrewLitteken requested review of this revision.Sep 8 2021, 9:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 8 2021, 9:47 AM
paquette added inline comments.Sep 10 2021, 4:24 PM
llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
132
133

Can the comment include what this actually is used for?

205

Can the comment explain why you would/wouldn't match by name?

Updating details in the comments.

jroelofs added inline comments.Sep 14 2021, 8:53 AM
llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
139

I think CalleeName would be a better name for this.

211

Likewise, this should probably be: setCalleeName

Changing name of function.