Add support for generics in offloadand remove no_mangle attribute#159566
Add support for generics in offloadand remove no_mangle attribute#159566Sa4dUs wants to merge 1 commit into
offloadand remove no_mangle attribute#159566Conversation
|
The job Click to see the possible cause of the failure (guessed by this bot) |
| @@ -534,11 +606,19 @@ fn symbol_export_level(tcx: TyCtxt<'_>, sym_def_id: DefId) -> SymbolExportLevel | |||
| // are not considered for export | |||
| let codegen_fn_attrs = tcx.codegen_fn_attrs(sym_def_id); | |||
| let is_extern = codegen_fn_attrs.contains_extern_indicator(); | |||
There was a problem hiding this comment.
Perhaps contains_extern_indicator should return true for offload functions?
| }); | ||
|
|
||
| // Write out the offload manifest of required generic kernel instantiations. | ||
| if let Some(path) = tcx.sess.opts.unstable_opts.offload.iter().find_map(|o| { |
There was a problem hiding this comment.
This seems like something that should be done outside of this query. I think this query can be cached, in which case nothing would be written.
| } | ||
|
|
||
| // A `HostMetadata` pass only exists to collect the set of generic kernel instantiations | ||
| // required by the host and write the offload manifest. |
There was a problem hiding this comment.
Why does this even go through codegen_crate?
|
Great improvement ( I'll review later). |
|
☔ The latest upstream changes (presumably #159610) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
implements a 3rd pass where we collect kernel instantiations required by offload to work
also enforces consistent mangling for offload functions between host and device
closes: #150985
r? @ZuseZ4