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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -