[PATCH] D40864: [Darwin] Add a new -mstack-probe option and enable by default
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 5 22:14:42 PST 2017
ahatanak added inline comments.
================
Comment at: lib/CodeGen/BackendUtil.cpp:442
Options.DebuggerTuning = CodeGenOpts.getDebuggerTuning();
+ Options.EnableStackProbe = CodeGenOpts.StackProbe;
----------------
Is there a reason you can't use function attributes "probe-stack"="___chkstk_darwin" and "stack-probe-size"=4096 instead of setting a TargetOptions flag here? If you intend to use stack probing with LTO, I think you need function attributes. Also, it looks like that would simplify the changes made to X86 backend.
================
Comment at: lib/Driver/ToolChains/Clang.cpp:3955
+ CmdArgs.push_back("-mstack-probe");
+
if (Args.hasArg(options::OPT_mstack_probe_size)) {
----------------
Just to confirm, is stack probing going to be enabled unconditionally on Darwin unless the user disables it with mno-stack-probe?
Repository:
rC Clang
https://reviews.llvm.org/D40864
More information about the cfe-commits
mailing list