llvm-ir

    5热度

    1回答

    我考虑看看LLVM库,我想通了,铛发出LLVM IR模块添加元数据: !llvm.module.flags = !{!0} !llvm.ident = !{!1} !0 = !{i32 1, !"PIC Level", i32 2} !1 = !{!"Apple LLVM version 7.3.0 (clang-703.0.31)"} 后来我发现,调用该方法setPICLevel()

    1热度

    1回答

    我有以下LLVM IR方案: @test1 = global i32 3, align 4 @test2 = common global i32 0, align 4 ; Function Attrs: nounwind uwtable define i32 @main() #0 { store i32 4, i32* @test2, align 4 %1 = load

    8热度

    1回答

    虽然与LLVM编译的代码: struct bar { int int1; int int2; char char1; char char2; char char3; }; struct foo { struct bar array[16]; }; int func(struct foo *f, int num) {

    0热度

    1回答

    我想调试一个jit函数。就像下面的源代码一样,我想调试FibF函数,但是当我通过gdb调试它时,似乎无法运行到函数范围。如何调试它?先谢谢你。 // We are about to create the "fib" function: Function *FibF = CreateFibFunction(M.get(), Context); // Now we going t

    4热度

    1回答

    我想创建一个使用LLVM来存储字符串的本地变量,但是我的代码当前正在抛出一个语法错误。 @.string = private constant [4 x i8] c"%s\0A\00" define void @main() { entry: %a = alloca [255 x i8] %0 = bitcast [255 x i8]* %a to i8* %1

    0热度

    1回答

    我正在写一些llvm(3.7)pass,我需要一些关于Constant类的信息。 在我解析的llvm-IR中,存在用作全局变量初始值的“ConstantStruct”或“ConstantArray”实例。例如: %struct.S = type { i32, i32, i32, i32 } @s = global [2 x %struct.S] [%struct.S { i32 6, i32

    1热度

    1回答

    如何从OpenCL内核文件中使用clang获取LLVM-IR文件(.ll)? this链接中的解决方案似乎与某些文件一起工作,但对于包含OpenCL矢量类型(如uchar4)的代码似乎不起作用(发射类型错误)。 有没有一种简单的方法来做到这一点,或者是否不可能通过clang获得LLVM-IR表单?

    3热度

    1回答

    我有以下IR: ; ModuleID = 'vec.ir' target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin15.3.0" define void @patch(i64) { entry: %1 = load float, float*

    2热度

    2回答

    我有以下的C程序: #include <sys/stat.h> int main(int argc, char **argv) { struct stat fileStat; if(stat(argv[1],&fileStat) < 0) return 1; } 当我它编译使用锵LLVM IR到,我可以看到stat被声明为以下: declare i32

    0热度

    1回答

    我正在编写LLVM IR代码,我可以在另一个.ll文件中调用函数吗? 例如: 在a.ll文件中,有一个函数foo(); 我可以在b.ll中使用这个函数,就像调用foo一样吗?如果是这样,我怎么能包括a.ll 感谢