(original) (raw)
\[resending with a bugfix s/x/y/ in my example\]
For example, we can still have code like this:
int x = foo();
int y = 42;
bar();
y = x;
baz();
that might lower into IR like
%x = call i32 @foo()
call void @llvm.dbg.value(i32 %x, DIVariable("x"), ...)
call void @llvm.dbg.value(i32 42, DIVariable("y"), ...)
call void @bar()
call void @llvm.dbg.value(i32 %x, DIVariable("y"), ...) ; %x is not materialized here, and we also can't hoist this.
call void @foo()
-- adrian