<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-05-22 11:00 GMT-07:00 Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Why not move the machine IR state into lib/CodeGen/MIR?  Then it<br>
won't depend on lib/CodeGen.<br></blockquote><div><br></div><div>While moving the cpp files for MachineFunction, MachineBasicBlock, etc. to MIR</div><div>would be easy, moving the headers will require changes to all the targets. At the same time the headers</div><div>can stay under CodeGen just like the header file for AsmPrinter, but I would prefer either to move</div><div>everything or move nothing at all. I attached a patch below that moves the necessary files from CodeGen</div><div>to a new library called MIR, but I don't think this kind of change will be accepted.</div><div><br></div><div>I think the best approach here would be to move everything from CodeGen/MIR to CodeGen so that</div><div>the serialization will be inside of a CodeGen library. The approach that I outlined in my previous email where </div><div>only the MIRParser is a separate library should also work.</div><div><br></div><div>Cheers,</div><div>Alex.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><br>
> On 2015 May 22, at 09:38, Alex L <<a href="mailto:arphaman@gmail.com" target="_blank">arphaman@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> I'm not sure if it would possible to break this circular dependency.<br>
><br>
> LLVMMIR has to depend on LLVMCodeGen as it needs to access all the machine IR state.<br>
> But at the same time LLVMCodeGen has to connect to LLVMMIR to create a printing pass and<br>
> then later to parse the machine functions, as llc does all the pass setup with LLVMCodeGen.<br>
><br>
> If this dependency is a problem maybe LLVMMIR should be a part of LLVMCodeGen?<br>
><br>
> Alex.<br>
><br>
> 2015-05-22 7:48 GMT-07:00 NAKAMURA Takumi <<a href="mailto:geek4civic@gmail.com" target="_blank">geek4civic@gmail.com</a>>:<br>
> Reverted in r238007. Could you reorganize MIR to dissolve dependencies between LLVMCodeGen and LLVMMIR?<br>
><br>
><br>
> /llvm/trunk/lib/CodeGen/MIR/MIRPrintingPass.cpp:18 This depends on LLVMCodeGen.<br>
> /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp:153 This depends on LLVMMIR.<br>
> /llvm/trunk/include/llvm/CodeGen/Passes.h:379 I suggest it might be logically in include/llvm/CodeGen/MIR.<br>
><br>
> USERS<br>
>   arphaman (Author)<br>
><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_rL237954&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=u0wPwAWTUlH-2_tcUkNgSIc_bipNbC4KsuonyInJYtw&s=AtakfFDdBCkx_PgpcVc0OjGbsoMBRUNtpsi4bYIUmPY&e=" target="_blank">http://reviews.llvm.org/rL237954</a><br>
><br>
> EMAIL PREFERENCES<br>
>   <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=u0wPwAWTUlH-2_tcUkNgSIc_bipNbC4KsuonyInJYtw&s=sLm1P7-l2aV1J9L718pRVPZALTkpjkYdddwFSPaTbvA&e=" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
</blockquote></div><br></div></div>