Closed adriaanjacobs closed 5 days ago
I see that you're still making changes. Should I wait to merge or do it?
Maybe a draft PR next time so that I'll know when it's complete.
And again, thank you for the contributions 🙂
My changes are final now; sorry for the confusion. This PR is ready to merge on my end
DebugIR is already very useful to debug transformations/inserted instrumentation code. However, using it as part of an automated toolchain/in a modified LLVM compiler is currently quite tedious: dump the modified bitcode to disk, invoke the debugir executable on it, read the bitcode back from this, continue compiling.
In these cases, it is very useful to run debugir as a transformation after our own instrumentation without dumping the module to disk first & reading back the modified module. This PR sets up the necessary preliminary changes to enable this. Mostly, it involves splitting off a separate cmake target ("dbgir") that builds libdbgir.so, which can be linked to by other code. We've also included some extra features like user-controllable LLVM versions.