[llvm-commits] Struct-handling patches

Duncan Sands baldrick at free.fr
Mon Sep 29 00:55:36 PDT 2008


Hi,

> The last patch, firstclass.diff, concerns instcombine. Instcombine can replace
> memcpy calls for small values with a load and a store. This defaults to using
> an integer type of appropriate size to load and store, unless a single value
> type is copied (ie, a double, or a struct containing just a double, etc.). The
> patch changes this to any first class type, since all first class types can be
> loaded and stored directly. In particular, a memcpy of a small struct is now
> replaced by a load and a store of the right struct type, instead of casting it
> to integer first (confusing scalarrepl more).

I didn't look at the patch, but this is only correct if the struct has no
holes in it.

Ciao,

Duncan.



More information about the llvm-commits mailing list