Hayden Livingston via llvm-dev
2015-Aug-25 15:48 UTC
[llvm-dev] struct within a struct vs struct with its fields copied
I'm not familiar with how LLVM will optimize or behave given: struct F { int } Struct G { int, int } Struct H { F, int } Is there a difference between G & H w.r.t to optimizations?
Jake VanAdrighem via llvm-dev
2015-Aug-25 16:43 UTC
[llvm-dev] struct within a struct vs struct with its fields copied
I'm no expert but AFAIK optimizations would depend on how you use G & H. Jake On Tue, Aug 25, 2015 at 8:48 AM, Hayden Livingston via llvm-dev < llvm-dev at lists.llvm.org> wrote:> I'm not familiar with how LLVM will optimize or behave given: > > struct F { int } > > Struct G { int, int } > > Struct H { F, int } > > Is there a difference between G & H w.r.t to optimizations? > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150825/e79d9f52/attachment.html>
Joerg Sonnenberger via llvm-dev
2015-Aug-25 19:51 UTC
[llvm-dev] struct within a struct vs struct with its fields copied
On Tue, Aug 25, 2015 at 08:48:15AM -0700, Hayden Livingston via llvm-dev wrote:> I'm not familiar with how LLVM will optimize or behave given: > > struct F { int } > > Struct G { int, int } > > Struct H { F, int } > > Is there a difference between G & H w.r.t to optimizations?Are you starting from C? If yes, TBAA can make a difference. Joerg