[PATCH] D100704: [Thumb1][MachineOutliner] Add Machine Outliner support for Thumb1
Yvan Roux via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 23 08:15:59 PDT 2021
yroux added a comment.
Herald added a subscriber: tmatheson.
Hi and Thanks for working on this,
I've a couple of embedded comments, and can you add some tests to check SP-relative loads and stores handling ?
================
Comment at: llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp:6396
+ // Insert a save before the outlined region
+ saveLROnStack(MBB, Front);
+ if (!AFI.isLRSpilled())
----------------
since there is not much logic in saveLROnsStack and restoreLRFromStack function what about removing them and creating the MIs here ?
================
Comment at: llvm/lib/Target/ARM/Thumb1InstrInfo.cpp:360
+ // the LR twice.
+ Register RegToSave = LiveReg ? FreeReg : ARM::LR;
+ assert(FreeReg != 0 && "No callee-saved register available?");
----------------
why not adding FreeReg to MBB's LiveIns instead of spilling LR twice ?
================
Comment at: llvm/test/CodeGen/ARM/machine-outliner-default.mir:167
+ bb.1:
+ liveins: $lr, $r0, $r1, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $r11
+ $r0, $cpsr = tMOVi8 1, 14, $noreg
----------------
I think that $r4 is not needed
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100704/new/
https://reviews.llvm.org/D100704
More information about the llvm-commits
mailing list