<div dir="ltr">
<div>Hi Paul,</div><div>There are a bunch of LLVM_DEBUG messages in CodeGenDAGPatterns.cpp. There are many in Tablegen backends too. In other places you may have to include headers to use LLVM_DEBUG. <br></div><div><br></div><div>Note, I am talking about Tablegen core which generates .inc files in some backends (like DAGISel, GlobalISel etc.) which gets included by the compiler. Hence, these messages will be dumped during .inc generation. As far as I can imagine, such messages during .inc generation should be able to unleash the flow. BTW, if you do this exercise, please commit! There are a very few debug messages Tablegen dumps as of now. Hence, any enhancement on this line would be a useful addition.<br></div><div><br></div><div>I hope that helps.</div>

</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 5, 2020 at 9:07 PM Nicolai Hähnle <<a href="mailto:nhaehnle@gmail.com">nhaehnle@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Paul,<br>
<br>
On Wed, Aug 5, 2020 at 4:04 PM Paul C. Anagnostopoulos<br>
<<a href="mailto:paul@windfall.com" target="_blank">paul@windfall.com</a>> wrote:<br>
> I'm sorry, I still don't understand. I presume you are talking about the LLVM_DEBUG() macro that is enabled with the -debug option. But there are no uses of LLVM_DEBUG() in the TableGen base files. Wouldn't the base "compiler" have to display the information we're talking about? Or is it sufficient to use LLVM_DEBUG() in the target-specific files?<br>
<br>
Trying to interpret what Madhur is saying, maybe adding some uses of<br>
LLVM_DEBUG() to TableGen would be a good idea.<br>
<br>
Cheers,<br>
Nicolai<br>
<br>
<br>
><br>
> At 8/5/2020 08:40 AM, Madhur Amilkanthwar wrote:<br>
> >Well, I was hinting at LLVM_DEBUG messages. You can pretty much dump all "actions" Tablegen would take to process a .td file, which should suffice, IMO.<br>
> ><br>
> ><br>
> >On Wed, Aug 5, 2020 at 5:59 PM Paul C. Anagnostopoulos <<mailto:<a href="mailto:paul@windfall.com" target="_blank">paul@windfall.com</a>><a href="mailto:paul@windfall.com" target="_blank">paul@windfall.com</a>> wrote:<br>
> >Your reply suggests that there is a way to see debug messages from TableGen. Is that what you meant? If so, can you explain how that works? (Sorry, I should know the answer to this question, but I'm quite the newbie.)<br>
> ><br>
> >At 8/5/2020 04:15 AM, Madhur Amilkanthwar wrote:<br>
> >>Hi Paul,<br>
> >>If all you care about is debugging then for now we can just emit a few more debug messages which would help to "trace" the flow. To distinguish traces you can prefix it with some known string. I don't think you really need a 'trace' tag in the language spec for this.<br>
> >><br>
> >>Debugging Tablegen has always been a nightmare and I don't think we can ever reach a stage where we can start a debugger and debug statements in .td files step-by-step. This is far from reality unless we fundamentally change the language.<br>
><br>
<br>
<br>
-- <br>
Lerne, wie die Welt wirklich ist,<br>
aber vergiss niemals, wie sie sein sollte.<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><i style="font-size:12.8px">Disclaimer: Views, concerns, thoughts, questions, ideas expressed in this mail are of my own and my employer has no take in it. </i><br></div><div>Thank You.<br>Madhur D. Amilkanthwar<br><br></div></div></div>