https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87902
--- Comment #6 from Segher Boessenkool <segher at gcc dot gnu.org> --- Oh sure, if all you want to do is extend the prepare_shrinkwrap function, that just works there and it doesn't need to do a lot of profitability trade-offs. However it isn't very effective there. It's better to do it just before register allocation. IRA tries to do a little, too, also not very effective :-( If you want to just extend prepare_shrinkwrap, so that it handles more than just the first BB, what order should it try? Should it be just greedy, or should it look how it can get best gain? Shrink-wrapping could wrap about 3x as many BBs as it does currently, but just extending prepare_shrinkwrap doesn't get very far. Which is not an argument to not do a better job there, of course ;-)