[llvm-commits] [PATCH]: wrong PPC32 targetdata in llvm

Duncan Sands baldrick at free.fr
Thu Jun 30 11:30:28 PDT 2011


On 30/06/11 19:20, John McCall wrote:
>
> On Jun 30, 2011, at 8:47 AM, Roman Divacky wrote:
>
>> On Thu, Jun 30, 2011 at 05:38:42PM +0200, Duncan Sands wrote:
>>> Hi Roman,
>>>
>>>> The definition of targetdata in llvm differs to the one in clang.
>>>> Specifically the ABI alignment of 64bit types on PPC32 is 32 in
>>>> llvm and 64 in llvm. The clang one seems to be the correct one.
>>>
>>> why isn't clang querying llvm to get the target data?
>>
>> I don't know. Clang has target data definition for every arch. It
>> seems wrong to me as well.
>
> There was a decision to try to make Clang independent of the linked-in
> target machines;  the virtue is that Clang can generate IR for an arbitrary
> target without needing an actual backend, which (among other things)
> simplifies cross-platform testing.  The disadvantage, of course, is
> code / information duplication.

As a sanity check, if the given target is linked into LLVM, maybe clang can
detect that and assert that the datalayouts (and other duplicated info) is
the same.

Ciao, Duncan.



More information about the llvm-commits mailing list