[llvm-dev] struct within a struct vs struct with its fields copied

Joerg Sonnenberger via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 25 12:51:46 PDT 2015


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


More information about the llvm-dev mailing list