[PATCH] D34387: [PATCH 2/2] Implement "probe-stack" on x86

Patrick Walton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 12:24:31 PDT 2017


pcwalton added inline comments.


================
Comment at: lib/Target/X86/X86FrameLowering.cpp:1263-1264
+
+    pushRegForStackProbeCall(MF, MBB, MBBI, DL, RAXAlive, X86::RAX, NumBytes);
+    pushRegForStackProbeCall(MF, MBB, MBBI, DL, RBXAlive, X86::RBX, NumBytes);
+    if (SpillR11) {
----------------
majnemer wrote:
> Saving RBX seems new. I'd have a comment describing both of these saves.
I don't know why the original patch author chose to spill RBX. Seems not needed. I'll remove it.


================
Comment at: lib/Target/X86/X86FrameLowering.cpp:1271
+      BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32ri), X86::EDX)
+           .addImm(0x1000)
+           .setMIFlag(MachineInstr::FrameSetup);
----------------
majnemer wrote:
> Magic number should have a comment or stuck in a const variable with a nice name. Even better would be both.
As before, I don't know what this magic number is for. Seems unneeded. I'll remove it.


https://reviews.llvm.org/D34387





More information about the llvm-commits mailing list