[llvm-dev] How to know what global and static variables are accessed in a function? (C)

Peng Yu via llvm-dev llvm-dev at lists.llvm.org
Sat Jan 12 21:51:39 PST 2019


Hi,

I'd like know what global and static variables are accessed in a
function (C code only for simplicity). It seems that LLVM IR might be
a useful format to maintain all such information. Is there a way to
analyze IR to figure what global and static variables are accessed
(read/write) in a function? Thanks.

-- 
Regards,
Peng


More information about the llvm-dev mailing list