[PATCH] D100704: [Thumb1][MachineOutliner] Add Machine Outliner support for Thumb1
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 23 15:31:07 PDT 2021
efriedma added a comment.
tTAILJMPdND isn't generally available in Thumb mode, only in Thumb2 or armv8m.base.
> PUSH R4 ;; Free up an auxilary register
> PUSH LR ;; LR must go on the top of the stack
>
> ...... ;; Original sequence of instructions
>
> POP R4 ;; Pop LR off the stack into R4
> ;; (Cannot be directly popped into LR)
> MOV LR, R4 ;; Move LR into the correct register
> POP R4 ;; Pop the original value of R4 into R4
Can we instead do something like:
push lr
.... ; Original sequence
mov ip, r4
pop r4
mov lr, r4
mov r4, ip
================
Comment at: llvm/lib/Target/ARM/Thumb1InstrInfo.cpp:257
+ LiveRegUnits UsedInSequence,
+ LiveRegUnits BeforeSequence) const {
+ const ARMBaseRegisterInfo *ARI = static_cast<const ARMBaseRegisterInfo *>(
----------------
BeforeSequence is unused here?
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