[PATCH] Fix hardcoded stack probe space

Andrew H clangbugs.10.mdwxzxkl at spamgourmet.com
Sat Jan 3 17:04:47 PST 2015


> Why not use: Fn->hasFnAttribute and Fn->getFnAttribute


Done.

> Your comment here is unclear. Specifically, many x86 targets support variable page sizes. I think what you want here is document the fact that we're *assuming* the page size for a page of stack space is *at least* 4k.


I read a little bit up on this topic and you are correct. Updated comment.

> I'm not sure having this extracted as a named constant adds anything here.


Before this commit ##X86FrameLowering::emitPrologue## had a similarly named constant. So I thought it would be good style in LLVM and adapted it in my last revisions. Removed named constant.

> I might name this getDefaultStackProbeSize just to make it clear it's overridable.


Done.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D6684

Files:
  include/llvm-c/Core.h
  include/llvm/Bitcode/LLVMBitCodes.h
  include/llvm/IR/Attributes.h
  include/llvm/Target/TargetFrameLowering.h
  lib/AsmParser/LLLexer.cpp
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLParser.h
  lib/AsmParser/LLToken.h
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/IR/AttributeImpl.h
  lib/IR/Attributes.cpp
  lib/IR/Verifier.cpp
  lib/Target/CppBackend/CPPBackend.cpp
  lib/Target/Hexagon/HexagonFrameLowering.h
  lib/Target/NVPTX/NVPTXFrameLowering.cpp
  lib/Target/PowerPC/PPCFrameLowering.cpp
  lib/Target/X86/X86FrameLowering.cpp
  lib/Target/X86/X86FrameLowering.h
  lib/Target/X86/X86Subtarget.cpp
  lib/Target/X86/X86Subtarget.h
  lib/Target/XCore/XCoreFrameLowering.cpp
  test/CodeGen/X86/stack-probe-size.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6684.17772.patch
Type: text/x-patch
Size: 29411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150104/e60769b2/attachment.bin>


More information about the llvm-commits mailing list