On Mon, Aug 7, 2017 at 3:11 PM, Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote: > Current sparse code doesn't handle very gracefully > code with undefined pseudos. These can occurs, > of course because the dev has forgot (or choose) to > initialize them but they can also occurs when they > are only set (and used) in a single path and not others > or even worse when initilaizing a bitfield. > > The origin of the problme is the single store shortcut > in simplify_one_symbol() which doesn't take in account > the (absence of) dominance when loads exist without > stores. I have give it a bit more thinking. The right metal model is actually consider the every uninitialized variable has an implicit define at the entry block. The reason this short cut is wrong is that, it is not about how many store we have (single vs multiple). It is about weather all the usage(load) has one single store immediate dominates it. If it does, even exist of other stores, this optimization can still be done. The question would be if we have easy and quick way to detect that all the load are immediate dominated by the one single store. If that condition holds, we can still do the "short-cut". BTW, I consider this patch can separate out from the other patch in this series meaning wise. The other patches are about constant related transformations. This one is about proper SSA. It can still be merge as one series. That part is fine. Please let me know if you want to include this in the RC5. Give me a proper git pull address. Topic branch is fine. Thanks Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html