IR: Change inalloca's grammar a bit

The grammar for LLVM IR is not well specified in any document but seems
to obey the following rules:

 - Attributes which have parenthesized arguments are never preceded by
   commas.  This form of attribute is the only one which ever has
   optional arguments.  However, not all of these attributes support
   optional arguments: 'thread_local' supports an optional argument but
   'addrspace' does not.  Interestingly, 'addrspace' is documented as
   being a "qualifier".  What constitutes a qualifier?  I cannot find a
   definition.

 - Some attributes use a space between the keyword and the value.
   Examples of this form are 'align' and 'section'.  These are always
   preceded by a comma.

 - Otherwise, the attribute has no argument.  These attributes do not
   have a preceding comma.

Sometimes an attribute goes before the instruction, between the
instruction and it's type, or after it's type.  'atomicrmw' has
'volatile' between the instruction and the type while 'call' has 'tail'
preceding the instruction.

With all this in mind, it seems most consistent for 'inalloca' on an
'inalloca' instruction to occur before between the instruction and the
type.  Unlike the current formulation, there would be no preceding
comma.  The combination 'alloca inalloca' doesn't look particularly
appetizing, perhaps a better spelling of 'inalloca' is down the road.

llvm-svn: 203376
diff --git a/llvm/test/CodeGen/X86/dynamic-alloca-in-entry.ll b/llvm/test/CodeGen/X86/dynamic-alloca-in-entry.ll
index 2ac89ba..7ed471c 100644
--- a/llvm/test/CodeGen/X86/dynamic-alloca-in-entry.ll
+++ b/llvm/test/CodeGen/X86/dynamic-alloca-in-entry.ll
@@ -11,7 +11,7 @@
 
 ; Use of inalloca implies that that the alloca is not static.
 define void @bar() {
-  %m = alloca i32, inalloca
+  %m = alloca inalloca i32
   ret void
 }
 ; CHECK-LABEL: _bar:
diff --git a/llvm/test/CodeGen/X86/inalloca-ctor.ll b/llvm/test/CodeGen/X86/inalloca-ctor.ll
index f81e967..7cfa929 100644
--- a/llvm/test/CodeGen/X86/inalloca-ctor.ll
+++ b/llvm/test/CodeGen/X86/inalloca-ctor.ll
@@ -10,7 +10,7 @@
 
 define void @g() {
 entry:
-  %args = alloca %frame, inalloca
+  %args = alloca inalloca %frame
   %c = getelementptr %frame* %args, i32 0, i32 2
 ; CHECK: movl    $20, %eax
 ; CHECK: calll   __chkstk
diff --git a/llvm/test/CodeGen/X86/inalloca-invoke.ll b/llvm/test/CodeGen/X86/inalloca-invoke.ll
index ac530ca..6cff9ac 100644
--- a/llvm/test/CodeGen/X86/inalloca-invoke.ll
+++ b/llvm/test/CodeGen/X86/inalloca-invoke.ll
@@ -16,7 +16,7 @@
 
 blah:
   %inalloca.save = call i8* @llvm.stacksave()
-  %rev_args = alloca %frame.reverse, inalloca, align 4
+  %rev_args = alloca inalloca %frame.reverse, align 4
   %beg = getelementptr %frame.reverse* %rev_args, i32 0, i32 0
   %end = getelementptr %frame.reverse* %rev_args, i32 0, i32 1
 
diff --git a/llvm/test/CodeGen/X86/inalloca-stdcall.ll b/llvm/test/CodeGen/X86/inalloca-stdcall.ll
index 93ac451..54f97d9 100644
--- a/llvm/test/CodeGen/X86/inalloca-stdcall.ll
+++ b/llvm/test/CodeGen/X86/inalloca-stdcall.ll
@@ -6,7 +6,7 @@
 declare x86_stdcallcc void @i(i32 %a)
 
 define void @g() {
-  %b = alloca %Foo, inalloca
+  %b = alloca inalloca %Foo
 ; CHECK: movl    $8, %eax
 ; CHECK: calll   __chkstk
 ; CHECK: movl   %[[REG:[^,]*]], %esp
diff --git a/llvm/test/CodeGen/X86/inalloca.ll b/llvm/test/CodeGen/X86/inalloca.ll
index ac00286..12643f9 100644
--- a/llvm/test/CodeGen/X86/inalloca.ll
+++ b/llvm/test/CodeGen/X86/inalloca.ll
@@ -7,7 +7,7 @@
 define void @a() {
 ; CHECK-LABEL: _a:
 entry:
-  %b = alloca %Foo, inalloca
+  %b = alloca inalloca %Foo
 ; CHECK: movl    $8, %eax
 ; CHECK: calll   __chkstk
 ; CHECK: movl   %[[REG:[^,]*]], %esp
@@ -27,7 +27,7 @@
 define void @b() {
 ; CHECK-LABEL: _b:
 entry:
-  %b = alloca %Foo, inalloca
+  %b = alloca inalloca %Foo
 ; CHECK: movl    $8, %eax
 ; CHECK: calll   __chkstk
 ; CHECK: movl   %[[REG:[^,]*]], %esp
@@ -48,7 +48,7 @@
 define void @c() {
 ; CHECK-LABEL: _c:
 entry:
-  %b = alloca %Foo, inalloca
+  %b = alloca inalloca %Foo
 ; CHECK: movl    $8, %eax
 ; CHECK: calll   __chkstk
 ; CHECK: movl   %[[REG:[^,]*]], %esp