This is an archive of the discontinued LLVM Phabricator instance.

[MachineOutliner] Don't outline from functions with a section marking.
ClosedPublic

Authored by efriedma on Apr 25 2018, 4:04 PM.

Details

Summary

The program might have unusual expectations for functions with section markings; for example, the Linux kernel's build system prints an error if it finds references from .text to .init.data.

I'm not sure this is something we actually want to make any guarantees about (there isn't any explicit rule that would disallow outlining in this case), but we might want to be conservative anyway.

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma created this revision.Apr 25 2018, 4:04 PM
paquette accepted this revision.Apr 25 2018, 4:11 PM

LGTM.

(If we want to outline from these, we can probably try performing a separate outlining pass for each section. That way we can enforce that functions outlined from a specific section all come from the same section, and also end up in that *same* section.)

This revision is now accepted and ready to land.Apr 25 2018, 4:11 PM
This revision was automatically updated to reflect the committed changes.