Tracking global definitions in LLVM -
i trying manually build list of instructions particular variable getting assigned value in llvm ir.
for local variables in function, can right set of instructions using instruction iterator , checking operands of particular instruction. approach doesn't seem work global variables since there's no store instruction associated them.
is there way keep track of global variable being defined without looking @ metadata field? if not, there way create dummy instruction can treated special marker initial definition of global variables?
for local variables in function, can right set of instructions using instruction iterator , checking operands of particular instruction.
that's not entirely accurate. it's true long variable in memory (and assignment done via store
), if promoted registers you'll need rely on llvm.dbg.value
calls track assignments it.
this approach doesn't seem work global variables since there's no store instruction associated them.
assignments globals appear store
s - except initial assignment.
is there way keep track of global variable being defined without looking @ metadata field?
if "where" mean in source line, you'll have rely on debug-info metadata.
Comments
Post a Comment