This is an archive of the discontinued LLVM Phabricator instance.

[MachineOutliner] Clean up subtarget handling.
ClosedPublic

Authored by efriedma on Jul 26 2018, 3:26 PM.

Details

Summary

Call shouldOutlineFromFunctionByDefault, isFunctionSafeToOutlineFrom, getOutliningType, and getMachineOutlinerMBBFlags using the correct TargetInstrInfo. And don't create a MachineFunction for a function declaration.

The call to getOutliningCandidateInfo is still a little weird, but at least the weirdness is explicitly called out.

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma created this revision.Jul 26 2018, 3:26 PM
paquette accepted this revision.Jul 26 2018, 3:58 PM

LGTM

lib/CodeGen/MachineOutliner.cpp
979

I think this sounds reasonable. TII seems like the wrong place for a lot of the outliner hooks at this point, since a good portion of them don't really have much to do with instructions anymore.

This revision is now accepted and ready to land.Jul 26 2018, 3:58 PM
This revision was automatically updated to reflect the committed changes.