[LLVMdev] Union type, is it really used or necessary?

David A. Greene greened at obbligato.org
Wed Jul 28 14:41:21 PDT 2010


Reid Kleckner <reid.kleckner at gmail.com> writes:

> On Tue, Jul 20, 2010 at 2:46 PM, Talin <viridia at gmail.com> wrote:
>> 1) For frontends that generate target-agnostic code, it is difficult to
>> calculate how large this struct should be. (Which is larger, 3 int32s or two
>> pointers? You don't know unless your frontend knows the size of a pointer.)
>> In my case, I finally decided to abandon my goal of making my frontend
>> completely target-neutral. While it's relatively easy to write a frontend
>> that is 99% target-neutral with LLVM, that last 1% cannot be eliminated.
>
> +1 for more features that make it easier to generate target-agnostic
> IR, despite its difficulty.
>
> Speaking of incomplete features, most LLVM frontends do not use the
> va_arg intrinsics, but they have not been cut.  Presumably they are
> useful for the same reason.

Our frontend uses va_arg.  I have an implementation for x86_64 that I've
been meaning to send up (along with a bazillion other patches...).

                            -Dave



More information about the llvm-dev mailing list