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

Reid Kleckner reid.kleckner at gmail.com
Tue Jul 20 21:50:20 PDT 2010


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.

Reid



More information about the llvm-dev mailing list