On Sun, Jul 28, 2019 at 4:57 PM Martin Liška <mli...@suse.cz> wrote: > > Hi. > > And there's one more patch that deals with delete operator > which has a second argument (size). That definition GIMPLE > statement of the size must be also properly marked. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed?
This isn't a proper fix. You can't mark a random operand as necessary during elimination - this only works in very constraint cases. Here it will break down if the stmt you just marked depends on another stmt only used by the stmt you just marked (and thus also not necessary). The fix is to propagate_necessity where you either have to excempt the two-operator delete from handling or to mark its second operand as necessary despite eventually deleting the call. You can avoid this in case the allocation function used the exact same size argument. Richard. > Thanks, > Martin