Displaying 2 results from an estimated 2 matches for "nontxnal".
Did you mean:
nontonal
2010 Jul 13
2
[LLVMdev] different layout of structs for llc vs. llvm-gcc
...attached is small program in which padding inside a struct is lost when using
llc, but is not lost when using llvm-gcc or gcc. In particular, padding is
missing after codegen with llc (see (1) below, LLVM 2.7, Linux x86_64):
typedef struct {
unsigned txnal;
char padding[64];
unsigned nontxnal;
} Data;
Data data;
I thought that the layout of structs was supposed to be preserved (wrong
assumption?). Otherwise, any ideas why this happens?
Thanks,
Torvald
(1)
llvm-gcc -emit-llvm -c -o padtest.bc padtest.c; llvm-ld -link-as-library
padtest.bc -o padtest2.bc; llc padtest2.bc -o padtest.s...
2010 Jul 13
0
[LLVMdev] different layout of structs for llc vs. llvm-gcc
...m in which padding inside a struct is lost when using
> llc, but is not lost when using llvm-gcc or gcc. In particular, padding is
> missing after codegen with llc (see (1) below, LLVM 2.7, Linux x86_64):
> typedef struct {
> unsigned txnal;
> char padding[64];
> unsigned nontxnal;
> } Data;
> Data data;
>
> I thought that the layout of structs was supposed to be preserved (wrong
> assumption?). Otherwise, any ideas why this happens?
It should be preserved in general; probably what's happening here is
that when you use llvm-ld, it assumes the variable dat...