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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -