On Tue, Nov 21, 2023 at 9:56 AM Alexander Monakov <amona...@ispras.ru> wrote: > > > On Tue, 21 Nov 2023, Richard Biener wrote: > > > and this, too, btw. - the DSE actually happens, the latter transform not. > > We specifically "opt out" of doing that for QOI to not make undefined > > behavior worse. The more correct transform would be to replace the > > load with a __builtin_trap () during path isolation (or wire in path > > isolation > > to value-numbering where we actually figure out there's no valid definition > > to reach for the load). > > > > So yes, if you want to avoid these kind of transforms earlier > > instrumentation > > is better. > > And then attempting to schedule it immediately after pass_ccp in the > early-opts > pipeline is already too late, right?
Well, yes. CCP won't do many things but it might for example rewrite a stack variable to a register. > Thanks! > Alexander