I am writing a pass to do constant folding. Like this C code:
int a = 4; int b = a + 5; I want to transform it to:
int b = 4 + 5; But the first segment of code will generate an instruction for int a:
store i32 4, i32* %a, align 4 How can I get the Value "%a" from this pointer "i32* %a" in my Pass? So that I can replace all use of the Value %a to the ConstantInt ?
alloca.