[PATCH] D40778: [DebugIR] Revive the Debug IR pass. [Added llvm-commits]

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 13:25:09 PST 2017


vsk added a comment.

In https://reviews.llvm.org/D40778#944139, @Ralith wrote:

> In https://reviews.llvm.org/D40778#944100, @vsk wrote:
>
> > - Should debugIR be a pass? The main use seems to be: there is an existing *.ll file on disk, and it needs to be debugged. Doesn't it make more sense to add a cl::opt to the LL reader to enable debugIR, so that the existing file can be debugged in-place?
>
>
> Personally, I'm usually debugging JITd code, so there is no natural *.ll file on disk, and at no point is IR parsed from text. It's my understanding that debuggers do generally expect a source file to exist, but it would still be more natural for me to generate the source file on the side, rather than writing it out and then immediately using it to reconstruct the module.


I don't think this use case would be supported unless -debugir would always be a part of the JIT pipeline. If debugging needs to be enabled by a special flag, it would be simple enough to implement it by invoking llvm-as on M.dump(). Implementing -debugir in the LL reader has other advantages, e.g it allows you to mark up the LL file with comments or edit it, then re-compile & debug again.


https://reviews.llvm.org/D40778





More information about the llvm-commits mailing list