This is an archive of the discontinued LLVM Phabricator instance.

Emit MLIR trampoline wrapper function with LLVM private linkage
ClosedPublic

Authored by mehdi_amini on Jun 19 2023, 3:01 AM.

Details

Summary

The wrapper, as most of compiler-generated functions, are intended to serve the
IR for the current module. The safest linkage is to keep these private to avoid
any possible collision with other modules.

Diff Detail

Event Timeline

mehdi_amini created this revision.Jun 19 2023, 3:01 AM
Herald added a project: Restricted Project. · View Herald Transcript
mehdi_amini requested review of this revision.Jun 19 2023, 3:01 AM

You beat me to it ;)

I did this in parallel: https://reviews.llvm.org/D153256. My patch preserves any llvm.linkage flags on the original op, so the very last test behaves different. Not sure what is better...

We shouldn't preserve the original linkage, I'm not sure what to do with other attributes and why they are propagated actually.

ingomueller-net accepted this revision.Jun 19 2023, 3:18 AM
This revision is now accepted and ready to land.Jun 19 2023, 3:18 AM
Dinistro accepted this revision.Jun 19 2023, 3:46 AM

LGTM!

This revision was landed with ongoing or failed builds.Jun 19 2023, 3:54 AM
This revision was automatically updated to reflect the committed changes.