[PATCH] D87136: [ARM][MachineOutliner] Add calls default handling.
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 04:39:57 PDT 2020
samparker added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp:5694
+ FrameDefault(target.isThumb() ? 2 : 4),
+ SaveRestoreLROnStack(target.isThumb() ? 8 : 8) {}
};
----------------
yroux wrote:
> samparker wrote:
> > So this is the cost of the store and load, but don't we also need to consider the frame setup too?
> The variable NumBytesToCreateFrame is initialized to the default cost of the frame setup and then incremented by the cost of the load/store if needed
So I'm sorry if I'm just being a bit blind (and/or horribly confused!) But I see:
```
unsigned NumBytesToCreateFrame = Costs.FrameDefault;
NumBytesToCreateFrame += Costs.SaveRestoreLROnStack;
```
Does this really translate the the cost of inserting:
- a call to the outlined function.
- a sub to adjust the stack pointer in the outlined function.
- the stack store of LR.
- the bx lr from the outlined function.
- the stack restore of LR.
Am I missing some logic that calls SetCandidateCallInfo?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87136/new/
https://reviews.llvm.org/D87136
More information about the llvm-commits
mailing list