[PATCH] D112811: [ARM] implement LOAD_STACK_GUARD for remaining targets
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 29 14:31:49 PDT 2021
nickdesaulniers accepted this revision.
nickdesaulniers added a comment.
This revision is now accepted and ready to land.
Changes LGTM; let's wait for @mstorsjo to triple check the COFF related changes, since I'm almost completely unaware of the details of that object file format. Thanks for the patch (and splitting it up, making it easier to review)!
================
Comment at: llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp:4905-4906
+ TargetFlags |= ARMII::MO_DLLIMPORT;
+ else if (IsIndirect)
+ TargetFlags |= ARMII::MO_COFFSTUB;
+ } else if (Subtarget.isGVInGOT(GV)) {
----------------
Other uses of `ARMII::MO_COFFSTUB` in llvm/lib/Target/ARM/ARMISelLowering.cpp seem to check `TargetMachine::shouldAssumeDSOLocal` returns `false` (and `GlobalValue::hasDLLImportStorageClass()` returns `false`, too) before setting this flag. Should we be doing so here as well?
To get a reference to the `TargetMachine` instance, I think we can do:
```
MachineFunction *MF = MBB.getParent();
ARMSubtarget &Subtarget = MF->getSubtarget<ARMSubtarget>();
TargetMachine *TM = SubTarget.getTargetLowering()->getTargetMachine();
```
@peter.smith anyone with more windows on ARM experience that might be able to help triple check this? Probably @mstorsjo ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112811/new/
https://reviews.llvm.org/D112811
More information about the llvm-commits
mailing list