[PATCH] D114611: [AVR] Expand STDWSPQRr & STDSPQRr, approach #2
Patryk Wychowaniec via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 25 13:15:13 PST 2021
Patryk27 added inline comments.
================
Comment at: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp:2114
+ const AVRMachineFunctionInfo *AFI = MF.getInfo<AVRMachineFunctionInfo>();
+ Register FP = AFI->hasReservedCallFrame(MF) ? AVR::R29R28 : AVR::R31R30;
+
----------------
just saw there's `MBBI.getParent()->getParent()` (or something like that) that returns associated function, too
================
Comment at: llvm/lib/Target/AVR/AVRMachineFunctionInfo.h:84
+
+ bool hasReservedCallFrame(const MachineFunction &MF) const {
+ return hasFP() && !MF.getFrameInfo().hasVarSizedObjects();
----------------
passing `MachineFunction` "back in here" feels like cheating, but I can't see another way at the moment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114611/new/
https://reviews.llvm.org/D114611
More information about the llvm-commits
mailing list