On Thu, Apr 16, 2020 at 10:33:45AM +0200, Richard Biener wrote: > On Wed, Apr 15, 2020 at 11:23 PM Segher Boessenkool > > On a general note, we shouldn't depend on some pass that may or may not > > clean up the mess we make, when we could just avoid making a mess in the > > first place. > > True - but the issue at hand is not trivial given you have to care for > partial defs, uses outside of the loop (or across the backedge), etc. > So there's plenty of things to go "wrong" here.
Certainly. But *all* RTL passes before RA should leave things in "web form" (compare to SSA form). The code in web.c is probably just fine; but we shouldn't have one web pass, *all* passes should leave things in a useful form! > > The web pass belongs immediately after expand; but ideally, even expand > > would not reuse pseudos anyway. > > But for example when lower-subreg decomposes things in a way turning > partial defs into full defs new opportunities to split the web arise. But that is only for the new registers it creates, or what am I missing? > > Maybe it would be better as some utility routines, not a pass? > > Sure, but then when do we apply it? All of the time! Ideally every pass would leave things in a good shape. Usually it is cheapest as well as easiest to do things manually, but for some harder cases, such helper routines can be used. > Ideally scheduling would to > register renaming itself and thus not rely on the used pseudos > (I'm not sure if it tracks false dependences - I guess it must if it > isn't able to rename regs). That would be a much better place > for improvements? sched2 runs after RA, so it has nothing to do with webs? And sched1 doesn't do much relevant here (it doesn't move insns much). I don't see how this is directly related to register renaming either? Segher