I noticed that llvm IR tries to allocate spaces in the very beginning of a function regardless of the location of declaring variables inside of the function in the C source code. I want to know how these alloca instructions are ordered. My guess is first function argument and then local variables. Is there any specific rules I can refer to?
Asked
Active
Viewed 450 times
1 Answers
0
No particular order. Also, different variables may use the same stack slot.

Anton Korobeynikov
- 9,074
- 25
- 28