On Mon, Sep 04, 2017 at 09:37:17PM +0100, Dibyendu Majumdar wrote: > Hi Luc, > > On 4 September 2017 at 21:07, Luc Van Oostenryck > <luc.vanoostenryck@xxxxxxxxx> wrote: > > > About the phi-sources, I agree strongly with this. To me these > > phi-sources are just a nuisance. Once things will be in better > > shape, I'll see what can be done to get rid of them (quite a bit > > of the logic depends on them for the moment, though). > > > > As you know the backend relies upon the phisrc instruction and treats > it like a 'store' while treating the phi instructions as 'loads'. > Selfishly I would like this to remain as it seems changing it is not > necessary, but nice to have? Well, I'm not very sure about how you use these phisrc but from what I've understood, in sparse-llvm it's done like this because LLVM's phi can't be used *because* of the problems described here above. If I remove these phisources, I would of course adapt sparse-llvm to do the right thing. And no, removing these phisources is not a nice to have. Like I said, they're a real nuisance and make a lots of things much more complicated than needed. Once the phi-nodes are correct, you can trivially recreate these phisources if needed. But the simple fact that you can do this trivially is a clear sign that you really don't *need* them. Among other things you can do the alloca/store/load as easily without them (instead of putting the store at the place of the phisrc was, you put the store at the end of each predecessor, which is where these phisrc should have been and where they are now in my code). Anyway, we're not yet at the point where it would be possible to remove them. We're even still far from it. -- Luc -- 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