<div class="gmail_quote">Hi There ,<br><div class="gmail_quote"><div><br></div><div>I'm new  to Clang   and please pardon me ..if you guys  feel that ,the below question is very basic :) </div><div><br></div><div>Here i go ,compiled the below sample with clang i.e <b>clang enum.c -S -emit-llvm</b> and  respective files are </div>



<div><br></div><div><div>$ cat enum.c</div><div>int main()</div><div>{</div><div> enum type{one=1,two,three} s;</div><div> s = one;</div><div> return s;</div><div>}</div></div><div><br></div><div><div>$ cat enum.s</div><div>



; ModuleID = 'enum.c'</div><div>target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32"</div><div>target triple = "i386-pc-cygwin"</div>



<div><br></div><div>define i32 @main() nounwind {</div><div>  %1 = alloca i32, align 4</div><div>  %s = alloca i32, align 4</div><div>  store i32 0, i32* %1</div><div>  store i32 1, i32* %s, align 4</div><div>  %2 = load i32* %s, align 4</div>



<div>  ret i32 %2</div><div>}</div></div><div><br></div><div><b>Question :</b> Why there is  extra 4 bytes on stack i.e  <b>"%1 = alloca i32, align 4"</b>  ???</div><div><br></div><div>Note : Please note that the  LLVM transformation will free away those extra space ,But still like to know why Clang at first shot introduces those extra spaces ?? </div>
<div><br></div><div>Thanks </div><div>~Umesh </div><div><br></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888">
</font></span></font></span></div><br>
</div><br>