[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:27:18 PDT 2017


pcwalton added inline comments.


================
Comment at: lib/Target/X86/X86FrameLowering.cpp:1271
+      BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32ri), X86::EDX)
+           .addImm(0x1000)
+           .setMIFlag(MachineInstr::FrameSetup);
----------------
pcwalton wrote:
> 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.
Oh, I guess this is the page size. I don't see why user-requested stack probes should need this to be supplied explicitly; it just bloats the size of every function prolog for something that is going to be constant on the architecture. Will remove.


https://reviews.llvm.org/D34387





More information about the llvm-commits mailing list