This is an archive of the discontinued LLVM Phabricator instance.

[FuncSpec] Replace markArgInFuncSpecialization with handleCallArguments.
AbandonedPublic

Authored by labrinea on Mar 29 2023, 3:16 AM.

Details

Summary

This will propagate constant arguments to the body of specializations that we would have otherwise missed, i.e literal constants since specializing such arguments is disabled by default.

Diff Detail

Event Timeline

labrinea created this revision.Mar 29 2023, 3:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 3:16 AM
labrinea requested review of this revision.Mar 29 2023, 3:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 3:16 AM
chill added inline comments.Apr 3 2023, 2:09 AM
llvm/lib/Transforms/Utils/SCCPSolver.cpp
843

I understand that with this change we will propagate literal constant arguments into the specialized functions. But, going forward, we intend to enable funcspec-for-literal-constant by default and then this functions here has the potential to be more efficient.

Thus I would suggest not deleting it for now.

labrinea added inline comments.Apr 9 2023, 4:02 AM
llvm/lib/Transforms/Utils/SCCPSolver.cpp
843

markArgInFuncSpecialization() does not handle struct arguments as is. I fixed that in D145374, but on the review we agreed replacing it with handleCallArguments() is cleaner. Perhaps I could rework that patch and drop this one then.

labrinea updated this revision to Diff 512896.Apr 12 2023, 10:42 AM

Put markArgInFuncSpecialization back in.

labrinea abandoned this revision.May 24 2023, 4:54 AM