Hi all, I'm working on a tree-ssa pass to implement PR 22141, a pass that merges adjacent stores. I've gotten to the point where I can identify the adjacent accesses, merge them into a single value and am now working on emitting the new statements but, as I don't have a lot of experience with the gimple machinery, am not sure what to do about alias sets and other bookkeeping.
At the point where I'm emitting the single wide store to replace a number of narrow consecutive stores I construct a MEM_REF that I assign the wide merged value to. I think I need to also set its alias info but am not sure how to construct it. Conceptually I need the disjunction of all the alias sets of the stores that the new store replaces but I'm not sure how to get that. I can get the alias set of a single gimple statement through get_alias_set of the LHS of each gimple assignment but how do I merge them? I don't see a helper function for that that springs to mind... Also, from what I understand gimple statements that write to memory have these vdef operands but I'm not sure what the vdef operand for the new store that replaces the series of adjacent stores should be set to (or how to construct it). Any guidance on this would be very appreciated. Thanks, Kyrill