[cfe-dev] Passing StructType arguments directly

Devang Patel dpatel at apple.com
Mon Sep 19 17:54:02 PDT 2011


On Sep 19, 2011, at 5:45 PM, David Meyer wrote:

>> 
>> With this approach, you'd still be exposing all of the new type
>> diversity to all LLVM IR consumers.
> 
> Not necessarily. Imagine having two flavors of IR: high-level (with
> extended types), and low-level (without extended types, identical to
> bitcode today).
> 
> Any IR consumer can choose which form it wants to handle. Given a
> high-level module, you can apply the ABI lowering transformation to
> get rid of the extended types, and get the low-level representation
> instead.
> 
> Frontends would only need to generate high-level bitcode, freeing them
> of target-specific considerations.
> 
> And the backends would only need to worry about processing low-level
> bitcode. In particular, CodeGen/Analysis/Transforms wouldn't need to
> know anything about the new type system, since the new types would be
> eliminated before the bitcode reached them.

Then, who is the intended consumer of this higher-level bitcode ? In my view, CodeGen/Analysis/Transforms pretty much sums up all LLVM IR consumers as Dan mentioned earlier.

-
Devang



More information about the cfe-dev mailing list