[llvm-commits] [llvm] r97888 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td

Anton Korobeynikov asl at math.spbu.ru
Sat Mar 6 12:07:32 PST 2010


Author: asl
Date: Sat Mar  6 14:07:32 2010
New Revision: 97888

URL: http://llvm.org/viewvc/llvm-project?rev=97888&view=rev
Log:
Describe what's going on with mingw alloca and why do we need separate instruction.

Modified:
    llvm/trunk/lib/Target/X86/X86InstrInfo.td

Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=97888&r1=97887&r2=97888&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Sat Mar  6 14:07:32 2010
@@ -533,8 +533,16 @@
                                                          imm:$regsavefi,
                                                          imm:$offset)]>;
 
+// Dynamic stack allocation yields _alloca call for Cygwin/Mingw targets.  Calls
+// to _alloca is needed to probe the stack when allocating more than 4k bytes in
+// one go. Touching the stack at 4K increments is necessary to ensure that the
+// guard pages used by the OS virtual memory manager are allocated in correct
+// sequence.
+// The main point of having separate instruction are extra unmodelled effects
+// (compared to ordinary calls) like stack pointer change.
+
 def MINGW_ALLOCA : I<0, Pseudo, (outs), (ins),
-                     "call __alloca",
+                     "# dynamic stack allocation",
                      [(X86MingwAlloca)]>;
 }
 





More information about the llvm-commits mailing list