0

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?

Min Gao
  • 383
  • 4
  • 16

1 Answers1

0

No particular order. Also, different variables may use the same stack slot.

Anton Korobeynikov
  • 9,074
  • 25
  • 28