This is an archive of the discontinued LLVM Phabricator instance.

[ARM][MachineOutliner] Add NoLRSave mode.
ClosedPublic

Authored by yroux on May 18 2020, 8:04 AM.

Details

Summary

Outline chunks of code which don't need a save/restore mechanism of the link register.

Diff Detail

Event Timeline

yroux created this revision.May 18 2020, 8:04 AM
yroux added a comment.May 18 2020, 8:05 AM

This was splitted from D76068

Thanks for splitting this out, but how about some more testing..?

  • Instructions that read/write SP (in the presence and absence of calls and LR usage).
  • The generated return instruction.
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
5700

SmallVector?

yroux added inline comments.Jun 9 2020, 2:33 AM
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
5700

It will be passed as a parameter to outliner::OutlinedFunction which waits for an std::Vector, maybe a SmallVector can used there instead but I think it should be done in another patch

yroux updated this revision to Diff 269457.Jun 9 2020, 2:35 AM

Updated testcase

samparker accepted this revision.Jun 9 2020, 3:58 AM

Thanks, LGTM.

llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
5700

Okay, fair enough.

This revision is now accepted and ready to land.Jun 9 2020, 3:58 AM
This revision was automatically updated to reflect the committed changes.