[LLVMdev] RFC: Separate machine IR from lib/CodeGen into lib/MIR

Owen Anderson resistor at mac.com
Tue May 26 13:46:42 PDT 2015


> On May 26, 2015, at 1:37 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> 
>> 
>> On 2015-May-26, at 09:46, Alex L <arphaman at gmail.com> wrote:
>> 
>> Hi all,
>> 
>> The CodeGen library is a big bag of interdependent bits. This caused
>> a circular dependency in the MIR serialization commit (r237954), which got
>> reverted in r238007.
>> 
>> I propose separating the machine IR out of CodeGen and into its own
>> MIR library, living at lib/MIR. This touches every target but it's mostly a
>> mechanical change that renames the header files, although a couple of pre-rename
>> commits are needed to decouple several things in CodeGen. I've attached a proof
>> of concept patch that renames the files and applies cleanly to r238038.
>> 
>> The MIR serialization code will go under the new MIR library and not under
>> CodeGen which will break the dependency. The CodeGen library will link MIR
>> automatically so the build files for tools that link with CodeGen won't have to
>> be changed.
>> 
>> Thanks for reading,
>> Alex
>> 
> 
> FWIW, I'm in favour of this.  I'd be interested to hear if there's
> a reason *not* to do this.
> 
> Here's some more context:
> 
>  http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150518/278031.html <http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150518/278031.html>
I have no objections, though I think lib/MachineIR would make a prettier bikeshed ;-)

—Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150526/fd523047/attachment.html>


More information about the llvm-dev mailing list