On Wed, Mar 22, 2017 at 06:55:37PM +0000, Dibyendu Majumdar wrote: > Hi Luc, > > On 22 March 2017 at 18:17, Dibyendu Majumdar <mobile@xxxxxxxxxxxxxxx> wrote: > >>>>> I am trying to see if sparse-llvm can handle unsimplified IR output > >>>>> from linearizer. I think there is a problem in how it handles phisrc. > >>>> > >>>> Does your non-simplified sparse IR contain the liveness information? > >>>> I think those are needed for the handling of OP_PHI & OP_PHISOURCE > >>>> in sparse-llvm. > >>>> > >>> > >>> Probably not - I commented out everything in linearize_fn() from > >>> simplify_symbol_usage() and downwards. Please tell me if this is > >>> incorrect. > >> > >> As far as I understand, sparse-llvm needs track_pseudo_liveness(). > >> > > > > Tried that - it made no difference. > > > > If there is a single phisrc and phi instruction then is phisrc meant > to have the phi in its user list? Yes but again this may depends on the simplification for its correctness. Also, for phi-nodes liveness is a bit different, unintuitive at first, the PSEUDO_PHI play no role in liveness. So, in IR code like: .L0 phisrc %phi1 <- ... ... .L1 phi %r2 <- %phi1, %phi2 the "liveness between .L0 & .L1" is not made via %phi1 but with the "real" pseudo: %r2 (.L0 defines %r2, .L1 needs %r2). -- 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