This is an archive of the discontinued LLVM Phabricator instance.

[ARM][NFC] Tidy up subtarget frame pointer routines
ClosedPublic

Authored by tmatheson on Jun 17 2021, 11:16 AM.

Details

Summary

getFramePointerReg only depends on information in ARMSubtarget,
so move it in there so it can be accessed from more places.

Make use of ARMSubtarget::getFramePointerReg to remove duplicated code.

The main use of useR7AsFramePointer is getFramePointerReg, so inline it.

Diff Detail

Event Timeline

tmatheson created this revision.Jun 17 2021, 11:16 AM
tmatheson requested review of this revision.Jun 17 2021, 11:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2021, 11:16 AM

clang-format (ignoring indentation change ARMAsmPrinter.cpp in match rest of file)

tmatheson updated this revision to Diff 352936.Jun 18 2021, 1:36 AM

clang-format everything for CI

DavidSpickett added a subscriber: DavidSpickett.

LGTM

llvm/lib/Target/ARM/ARMSubtarget.h
826

And fix this warning.

tmatheson updated this revision to Diff 352944.Jun 18 2021, 2:13 AM

Fix clang-tidy: warning: do not use 'else' after 'return'

This revision is now accepted and ready to land.Jun 18 2021, 6:29 AM
This revision was automatically updated to reflect the committed changes.
tmatheson marked an inline comment as done.