Jeff Law <jeffreya...@gmail.com> writes: > On 11/5/23 11:49, Richard Sandiford wrote: >> The pass used the edge aux field to record which mode change >> should happen on the edge, with -1 meaning "none". It's more >> convenient for later patches to leave aux zero for "none", >> and use numbers based at 1 to record a change. >> >> gcc/ >> * mode-switching.cc (commit_mode_sets): Use 1-based edge aux values. > So my only worry here is the state of the aux field as we enter mode > switching. ISTM the old code would never depend on that previous state > since it always initialized eg->aux to -1, then conditionally overwrote > that value if there was an insertion. Then it could clear all the aux > fields once a particular entity was resolved. > > It appears now that for the first entity we depend on the aux field > being clear as we enter mode switching. Or am I missing something?
Yeah, we'd rely on that. 12/12 would too for all edges. I could have sworn that there was something that checked that passes left edge aux fields clear, but it looks like I misremembered. So I probably need to stick a clear_aux_for_edges () call above the first main loop (for 12/12) and keep the initialisation here as well. That kind-of takes away the point of shifting to 1-based values in the first place. Ah well... Thanks, Richard