在llvm IR

时间:2019-07-29 11:18:03

标签: c++ llvm llvm-ir

我想读取功能IR LLVM的参数名称,我具有以下函数定义:

define void @vecadd(i32, float* nocapture readonly, float* nocapture readonly, float* nocapture) local_unnamed_addr #0 {

我们看到,参数没有名称,如果在主函数中查看调用函数,则会看到参数名称(a,b和c):

call void @vecadd(i32 10, float* getelementptr inbounds ([10 x float], [10 x float]* @a, i64 0, i64 0), float* getelementptr inbounds ([10 x float], [10 x float]* @b, i64 0, i64 0), float* nonnull %3)

问题是,因为我只是在define函数中有指令,所以如何从define函数中的指令中获取参数名称。

有什么想法吗?

0 个答案:

没有答案