[LLVMdev] PROPOSAL: IR representation of detailed struct assignment information (new version)
kparzysz at codeaurora.org
Mon Sep 10 11:54:36 PDT 2012
On 9/10/2012 1:29 PM, Chandler Carruth wrote:
> The idea would be to make all struct types be packed, and to
> represent padding as explicit members of the struct.
Frankly, I like this idea a lot. I have one comment though: the data
type used for the padding fields would need to always be the same, or
else we run into the issue of having two types that are equal with
respect to the non-padded data, but differ in the types (but not
lengths) of the padding. Those should be considered identical.
It brings my attention back to this:
On 8/31/2012 3:15 AM, Renato Golin wrote:> On 30 August 2012 21:30,
Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote:
>> I guess I'm late to the party, but another possibility would be to model
>> structure types as lists of members with their offsets from the
>> the parent aggregate. This would require extensive changes to LLVM,
>> not sure if it's an option.
> This has been proposed already, and could also be used by bitfields,
> but the changes were too many and was not accepted.
> I think the biggest reason against was that it was strongly based on
> C++ semantics and not generic enough to be considered IR material.
This would simply omit any non-member information from a type, and
provide explicit placement (offset) of the members. What were the
specific concerns regarding this idea in the past?
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the llvm-dev