Hi folk,<br><br>I'm a newbie to llvm, please first forgive my naive questions. I want to instrument llvm code to do some run-time monitoring work. After reading some of the llvm documentation, it begins clear to me that I can do the instrumentation in a transformation pass. There are several things I want to do in the transformation pass, but I'm not sure whether they are doable and how to do them even after I read the documentation. I would be very appreciate if anyone can answer my questions or give me hints of how to do them. <br>
<br>1. can I add more global memory objects to a module? any hint how to do it? do I need to derive a pass from ModulePass? <br>2. can I add more stack allocated memory objects to a function? the answer seems yes, any hint how to do it?<br>
3. can I modify a function to take extra formal parameters? can I update all calls of the original function to take extra actual paramters? The function might be called across multiple modules. It seems this has to be done at both ModulePass and FunctionPass levels. <br>
<br>Thanks,<br>Neal<br>