This is an archive of the discontinued LLVM Phabricator instance.

[ARM][MachineOutliner] Add NoLRSave and Register modes.
AbandonedPublic

Authored by yroux on Mar 12 2020, 8:00 AM.

Details

Summary

Outline chunks of code which doesn't need a save/restore mechanism of
the link register or use a spare register to do it.

This is a follow-up of ARM Machine Outliner support RFC D57054 and
should be applied on top of D76066

Diff Detail

Event Timeline

yroux created this revision.Mar 12 2020, 8:00 AM

Again, I was expecting more tests... I think if you're going to dedicate a couple of paragraphs describing the logic around SP, we need to test it too!

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

SmallVector instead?

llvm/test/CodeGen/ARM/machine-outliner-nosave-and-regs.mir
3

I think it would be good practise to add a thumb-1 target to any of the tests added.

For the testcases here, can you just use llvm/utils/update_mir_test_checks.py? That would make it easy to check save/restore sequences for outlined calls.

I think that it would be good to split this up into two separate patches: one for the NoLRSave case, and one for the Register case.

yroux marked 2 inline comments as done.Mar 25 2020, 7:12 AM

Thanks for the review Jessica and Sam,

I'll split it into two separate patches and thanks for the pointer to llvm/utils/update_mir_test_checks.py !

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

well, this is passed as a parameter to outliner::OutlinedFunction which takes an std::Vector, maybe a SmallVector can used there instead but I think it should be done in another patch

llvm/test/CodeGen/ARM/machine-outliner-nosave-and-regs.mir
3

Agreed

yroux abandoned this revision.Sep 1 2020, 5:04 AM

Thsi was committed as D80125 and D80127