In LLVM IR, how to get the pointee Value of a pointer type? -


i writing pass constant folding. c code:

int = 4; int b = + 5; 

i want transform to:

int b = 4 + 5; 

but first segment of code generate instruction int a:

store i32 4, i32* %a, align 4 

how can value "%a" pointer "i32* %a" in pass? can replace use of value %a constantint ?

use load instruction:

%1 = load i32* %a, align 4 

Comments

Popular posts from this blog

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -