[LLVMdev] Proposal for new Legalization framework
Reed Kotler
rkotler at mips.com
Thu Apr 25 15:46:13 PDT 2013
On 04/24/2013 07:39 PM, Chris Lattner wrote:
> On Apr 24, 2013, at 6:27 PM, Reed Kotler <rkotler at mips.com> wrote:
>> I would really push towards doing this in LLVM IR as the next step.
>
> What makes you say that?
>
>> It's possible that what you are proposing is the right "long term" solution but I think it's not a good evolutionary approach; it's more revolutionary.
>
> Doing this in LLVM IR seems like a major step backwards. It gets us no closer to the ultimate goal, would add a ton of code, and would make the compiler more complex.
>
> -Chris
>
I did not really answer you question very succinctly because I ranted
about selection DAG and that's not the issue here.
So you want to have a machine ir and Dan was proposing to do it regular IR.
My main reason for using regular IR is that I think it's more likely to
be doable in an incremental way and I don't see how creating another IR
will help things.
You can add to the existing IR things that are needed to make it
powerful enough to do what machine IR would do.
In the end, machine IR will look just like a subset of the current IR
plus some additional things so I don't see how it helps make a new one
and now there will be many things that are similar to IR but with
slightly different rules, a different C++ class definition, etc.
I think that path to a machine IR will be very lengthy unless Apple and
Google are willing to throw a lot of high quality resources that way.
Reed
More information about the llvm-dev
mailing list