This attribute is used to ensure the guard page is triggered on stack
overflow. Stack frames larger than the guard page size will generate a
call to __probestack to touch each page so the guard page won't be skipped.
Details
Details
- Reviewers
majnemer
Diff Detail
Diff Detail
Event Timeline
lib/Transforms/IPO/Inliner.cpp | ||
---|---|---|
100 | Any reason why this can't just be Caller->addFnAttr("probe-stack"); ? |
Comment Actions
I'd be far more comfortable if probe-stack took an argument instead of hard coding the name a specific stack probing function.
Comment Actions
"probe-stack" is only intended to guarantee that a guard page can be triggered, not to dictate how. __probestack is intended to be added to compiler-rt as to aid implementation (and Windows toolchains have existing functions for this). Ideally LLVM would inline it (as GCC does), but that would require more invasive changes to X86FrameLowering (emitPrologue does not seem like the ideal place to emit a loop).
Any reason why this can't just be Caller->addFnAttr("probe-stack"); ?