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

Jim Grosbach grosbach at apple.com
Thu Jun 30 10:28:55 PDT 2011


On Jun 30, 2011, at 10:20 AM, 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.

Perhaps we could/should refactor the targetdata bits in the back end such that they're aways available for all targets, even if the target itself isn't enabled? Some of Evan's recent work might enable that.

-Jim



More information about the llvm-commits mailing list