[cfe-users] Help needed in analyzing liveness of variables with LLVM IR

2017-04-10 Thread Shail Dave via cfe-users
Hi, Thank you for your time in reading this. I need help in analyzing the live-in and live-out variables for few loops in the llvm IR. I want to figure out which is a live-variable at the end of the loop and what is live-in variable for the loop. I found that such provisions are available for mach

[cfe-users] Help needed to define and handle custom pragma #mypragma

2017-02-16 Thread Shail Dave via cfe-users
Hi, I want to allow compilation of my own pragma in C/Cpp files such as #pragma mypragma and I want to handle it in this way -- upon identification of this pragma, I want to insert a function call and delete some code in the original source file. My problem is defining pragma and to handle it for

[cfe-users] Help Needed: How to get source line number from .ll file LLVM

2016-07-12 Thread Shail Dave via cfe-users
Hi, I am working with LLVM 3.4 and want to obtain the line number information of source file from IR. The IR is generated from simple c code with Clang. *I want to obtain the line number in source c file from the line in IR body.* I tried this - 1. For Instruction BI, unsigned Line = Line =