[Diffusion] rL237954: Resubmit r237708 (MIR Serialization: print and parse LLVM IR using MIR format).

Alex L arphaman at gmail.com
Fri May 22 10:56:46 PDT 2015


The only good way that I can think of to break up this dependency would be
to make the printing of MIR
be part of CodeGen, and have the parsing as a separate MIRParser library
under CodeGen. This way
MIRParser will depend on CodeGen but CodeGen won't depend on MIRParser.

I've attached a patch that updates the reverted commit with this
reorganization.

Cheers,
Alex

2015-05-22 9:38 GMT-07:00 Alex L <arphaman at gmail.com>:

> Hi,
>
> I'm not sure if it would possible to break this circular dependency.
>
> LLVMMIR has to depend on LLVMCodeGen as it needs to access all the machine
> IR state.
> But at the same time LLVMCodeGen has to connect to LLVMMIR to create a
> printing pass and
> then later to parse the machine functions, as llc does all the pass setup
> with LLVMCodeGen.
>
> If this dependency is a problem maybe LLVMMIR should be a part of
> LLVMCodeGen?
>
> Alex.
>
> 2015-05-22 7:48 GMT-07:00 NAKAMURA Takumi <geek4civic at gmail.com>:
>
> Reverted in r238007. Could you reorganize MIR to dissolve dependencies
>> between LLVMCodeGen and LLVMMIR?
>>
>>
>> /llvm/trunk/lib/CodeGen/MIR/MIRPrintingPass.cpp:18 This depends on
>> LLVMCodeGen.
>> /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp:153 This depends on LLVMMIR.
>> /llvm/trunk/include/llvm/CodeGen/Passes.h:379 I suggest it might be
>> logically in include/llvm/CodeGen/MIR.
>>
>> USERS
>>   arphaman (Author)
>>
>> http://reviews.llvm.org/rL237954
>>
>> EMAIL PREFERENCES
>>   http://reviews.llvm.org/settings/panel/emailpreferences/
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150522/75d99994/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mir1_2
Type: application/octet-stream
Size: 50786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150522/75d99994/attachment.obj>


More information about the llvm-commits mailing list