Hello Everyone,
I’m trying to add a new instruction to the LLVM build, for simplicity testing I’m just modifying the add instruction; creating a new one called modAdd which adds 1 to it’s LHS value. Basically it’s an integer increment instruction.
Now i followed this : http://llvm.org/docs/ExtendingLLVM.html for adding a new instruction but i can see that i’ll need to change Execution.cpp and add some lines such as http://llvm.org/docs/doxygen/html/Execution_8cpp_source.html#l02026 for doing a +1.
How can i do this, how to modify the interpreter/execution.cpp for LLVM to understand my IR instruction?
Thanks,
Best Regards,
Ammar