<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Min-Yih Hsu <<a href="mailto:minyihh@uci.edu">minyihh@uci.edu</a>> 於 2021年1月4日 週一 下午3:03寫道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">It seems that you can write a custom TableGen backend (<a href="https://llvm.org/docs/TableGen/BackGuide.html" target="_blank">https://llvm.org/docs/TableGen/BackGuide.html</a> ) to achieve your task. I don’t think LLVM/Clang accepts or has any plan using python script to generate header files from TG files.<div><br></div></div></blockquote><div> </div><div>

Yes, I think my work can be handled in custom TableGen backend.

 </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div></div><div>Also, can you elaborate why existing TG backends, especially those used for generating builtins, can’t solve your problems? Is it possible to adapt your .td files to leverage existing TG backends?<br><div><br></div></div></div></blockquote><div> </div><div></div><div>I agree with your opinion. It makes sense to me.</div><div>I'm asking that just because we only have python solution now.</div><div><br></div><div>Thanks for your 

opinion.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div><div></div><div>-Min<br><blockquote type="cite"><div>On Jan 3, 2021, at 10:47 PM, Zakk via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br><div><div dir="ltr">Hi all,<div><br><div>In our downstream clang build process, we use python script to generate Builtins*.td, *.BuiltinCodegen.inc and C header. (it's similar to <a href="https://repo.hca.bsc.es/gitlab/rferrer/llvm-epi/-/blob/EPI/clang/include/clang/Basic/CMakeLists.txt#L97-110" target="_blank">https://repo.hca.bsc.es/gitlab/rferrer/llvm-epi/-/blob/EPI/clang/include/clang/Basic/CMakeLists.txt#L97-110</a>)</div><div><br></div><div>It's a different way like ARM did (create a new option in clang-tblgen (C++ code) and generate corresponding files.)</div><div><br></div><div>We are planning to upstream this part and wondering if it's necessary to rewrite generator with C++ code.<br></div><div><br></div><div><div>-- <br><div dir="ltr">Best regards,<br>Kuan-Hsu<br><br><br></div></div></div></div></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br></div></blockquote></div><br></div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Best regards,<br>Kuan-Hsu<br><br><br></div></div>