I was reading: https://llvm.org/docs/LangRef.html#getelementptr-instruction
From what I can understand LLVM has infinite registers which raises the question, why we need store
and load
commands at all and when should we use them.
Why can't we keep everything in registers?
To make things clear, can you kindly refer to which commands are used in every line:
void example_func(int x) {
int y;
int z = 3;
int a = x;
a = 3;
x = 2;
}