[PATCH] D55418: [GlobalISel] Set stack protector index when translating Intrinsic::stackprotector
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 10 07:18:13 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL348761: [GlobalISel] Set stack protector index when translating Intrinsic… (authored by petr.pavlu, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D55418?vs=177148&id=177505#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55418/new/
https://reviews.llvm.org/D55418
Files:
llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator-stackprotect.ll
Index: llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -973,13 +973,15 @@
getStackGuard(GuardVal, MIRBuilder);
AllocaInst *Slot = cast<AllocaInst>(CI.getArgOperand(1));
+ int FI = getOrCreateFrameIndex(*Slot);
+ MF->getFrameInfo().setStackProtectorIndex(FI);
+
MIRBuilder.buildStore(
GuardVal, getOrCreateVReg(*Slot),
- *MF->getMachineMemOperand(
- MachinePointerInfo::getFixedStack(*MF,
- getOrCreateFrameIndex(*Slot)),
- MachineMemOperand::MOStore | MachineMemOperand::MOVolatile,
- PtrTy.getSizeInBits() / 8, 8));
+ *MF->getMachineMemOperand(MachinePointerInfo::getFixedStack(*MF, FI),
+ MachineMemOperand::MOStore |
+ MachineMemOperand::MOVolatile,
+ PtrTy.getSizeInBits() / 8, 8));
return true;
}
case Intrinsic::cttz:
Index: llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator-stackprotect.ll
===================================================================
--- llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator-stackprotect.ll
+++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator-stackprotect.ll
@@ -3,6 +3,9 @@
; CHECK: name: test_stack_guard
+; CHECK: frameInfo:
+; CHECK: stackProtector: '%stack.0.StackGuardSlot'
+
; CHECK: stack:
; CHECK: - { id: 0, name: StackGuardSlot, type: default, offset: 0, size: 8, alignment: 8,
; CHECK-NOT: id: 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55418.177505.patch
Type: text/x-patch
Size: 1723 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181210/afb95f28/attachment.bin>
More information about the llvm-commits
mailing list