[LLVMdev] Target Data
Chris Lattner
clattner at apple.com
Thu Mar 22 14:46:24 PDT 2012
On Mar 22, 2012, at 2:28 PM, Ryan Taylor wrote:
> I see, thanks.
>
> However, if I -emit-llvm and then append the "target datalayout" string (then operate on that emitted llvm), I can then change the data type sizes and alignments, correct?
If the frontend is making different assumptions than the target data string, then you'll get broken code in a variety of situations. A trivial example is that sizeof() folds to an integer constant in the frontend.
-Chris
>
> Thanks.
>
> On Thu, Mar 22, 2012 at 2:25 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Mar 21, 2012, at 5:57 PM, Ryan Taylor wrote:
>
> > Is it possible to change the widths of types independent of the architecture? Or to reset the widths of types?
> >
> > I haven't seen anything like this. Thanks.
>
> The datalayout string is required to match the target, if it exists:
> http://llvm.org/docs/LangRef.html#datalayout
>
> You can't control it to change how things are laid out.
>
> -Chris
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120322/3aa9149d/attachment.html>
More information about the llvm-dev
mailing list