[LLVMdev] RFC: Separate machine IR from lib/CodeGen into lib/MIR
Duncan P. N. Exon Smith
dexonsmith at apple.com
Wed May 27 10:41:50 PDT 2015
> On 2015 May 27, at 08:08, Chris Lattner <clattner at apple.com> wrote:
>
>
>> On May 26, 2015, at 11:20 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>>
>> +1.
>>
>> Could those two be subdirectories of one “Machine-Related-Stuff” directory?
>> E.g.,
>> MachineStuff/IR
>> MachineStuff/CodeGen
>>
>> Where MachineStuff is something meaningful :).
>>
>> That way, they keep a logic bound, more formal than the naming convention.
>
> Something like?
>
> lib/Machine/IR
> lib/Machine/Passes
>
> Unless there will be many subdirectories, it seems slightly better to flatten out the layer.
There are two different layers we can flatten. We already have two
layers in lib/CodeGen. If we flatten the second layer and go with
Quentin's idea, we get something like this:
lib/Machine/MIR
lib/Machine/Passes
lib/Machine/AsmPrinter (or MCGen)
lib/Machine/SelectionDAG (or MIRGen?)
(IMO, lib/Machine/IR is too close to lib/IR.)
If we flatten the first, we get this:
lib/MachineIR
lib/CodeGen (or MachineIRGen)
lib/CodeGen/AsmPrinter (or MCGen)
lib/CodeGen/SelectionDAG (or ...)
Both seem pretty reasonable to me, but the first one seems a little
cleaner.
>
> Also, if we’re getting crazy here, CodeGen in clang should be renamed to IRGen, AsmPrinter should be renamed to MCGen, and SelectionDAG should be replaced ;-)
+1
>
> -Chris
>
>>
>> My 2c.
>>
>> Q.
>>> On May 26, 2015, at 9:28 PM, Chris Lattner <clattner at apple.com> wrote:
>>>
>>> On May 26, 2015, at 1:46 PM, Owen Anderson <resistor at mac.com> wrote:
>>>>>> 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
>>>>
>>>> I have no objections, though I think lib/MachineIR would make a prettier bikeshed ;-)
>>>
>>> +1. Codegen should also be renamed to something else that starts with “Machine” as well.
>>>
>>> -Chris
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list