我一直在探索对alloca值的def-use。
我有以下IR代码 -
continuation: ; No predecessors!
%iftmp = phi i32 [ 8, %then ], [ 20, %else ]
store i32 %iftmp, i32* %datasize
%res = alloca i8
store i8 -113, i8* %res
store i8 -127, i8* %res
%res3 = load i8, i8* %res
ret i8 %res3
运行“%res”的def-use链,并打印使用“%res”的指令。以下是输出 -
for val=
%res = alloca i8
instruction with usage=
%res3 = load i8, i8* %res
instruction with usage=
store i8 -127, i8* %res
instruction with usage=
store i8 -113, i8* %res
我发现在商店之前看到货物。是否有任何方法可以在与IR中出现的指令完全相同的相同顺序中获得alloca值的“使用”?