[LLVMdev] Target data question

Dan Gohman gohman at apple.com
Tue Oct 20 10:08:14 PDT 2009


On Oct 20, 2009, at 9:26 AM, Kenneth Uildriks wrote:

> According to the "LLVM Assembly Language Reference Manual":
>
> When constructing the data layout for a given target, LLVM starts with
> a default set of specifications which are then (possibly) overriden by
> the specifications in the datalayout keyword. The default
> specifications are given in this list:
>
>    * E - big endian
>    * p:32:64:64 - 32-bit pointers with 64-bit alignment
>
>
> Are these the specifications that are assumed by LLVM tools such as
> "opt" when a module doesn't have a target data specification?  And
> does that mean that "opt", when given a module without a target data
> specification, might assume that GEP pointer-to-pointer, 1 should
> increment that pointer by eight bytes?

Unfortunately, yes.  See PR4542.  Progress has been made recently
though -- the optimizers are now ready.  The main things left to do
is to update the documentation and update the testsuite to account
for the change in the meaning of a module without a targetdata string.

Dan




More information about the llvm-dev mailing list