search for: mypragma

Displaying 1 result from an estimated 1 matches for "mypragma".

Did you mean: my_pragma
2013 Apr 20
1
[LLVMdev] Adding custom pragma's for generating particular LLVM IR
Hi ML readers, I would first apology if this was already addressed on this ML, but I didn't find information on this topic. I would like to add custom pragma's that generate particular LLVM IR. Here is an example: int a, b; /* ... */ #pragma mypragma shared(a, b) { a = b; b++; } would result in this (pseudo) LLVM IR: %1 alloca i32 %2 alloca i32 ... call void @start_callback () %3 call i32 @check_callback ( i32 %1 ) %4 call i32 @check_callback ( i32 %2 ) ... call void @end_callback () ... Note: All *_callback functions are imple...