[PATCH] D98200: [GlobalISel] Port over the SelectionDAG stack protector codegen feature.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 8 10:49:48 PST 2021
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/CodeGenCommonISel.cpp:65
+ case TargetOpcode::G_SEXT:
+ return true;
+ default:
----------------
Could also have merge/unmerge and the rest of the artifacts
================
Comment at: llvm/lib/CodeGen/CodeGenCommonISel.cpp:95
+ // physical register.
+ if (!OPI2->isReg() || (!Register::isPhysicalRegister(OPI->getReg()) &&
+ Register::isPhysicalRegister(OPI2->getReg())))
----------------
.isPhysical()
================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:3060-3066
+ MIRBuilder
+ .buildLoad(
+ PtrMemTy, StackSlotPtr,
+ *MF->getMachineMemOperand(
+ MachinePointerInfo::getFixedStack(*MF, FI),
+ MachineMemOperand::MOLoad | MachineMemOperand::MOVolatile,
+ PtrTy.getSizeInBytes(), Align))
----------------
There's a simpler version of buildLoad that handles the MMO construction
================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:3117
+ Guard = MIRBuilder
+ .buildLoad(PtrMemTy, GuardPtr,
+ *MF->getMachineMemOperand(
----------------
Ditto
================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:3138
+ MachineBasicBlock *FailureBB) {
+ MachineIRBuilder MIRBuilder(*FailureBB, FailureBB->end());
+ MIRBuilder.setDebugLoc(CurBuilder->getDebugLoc());
----------------
Shouldn't construct local MIRBuilders
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98200/new/
https://reviews.llvm.org/D98200
More information about the llvm-commits
mailing list