https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117091
--- Comment #9 from Andi Kleen <andi-gcc at firstfloor dot org> --- Yes I guess we should keep better switches at -O1 because machine generated code may have lot of switches. I don't think we need perfect clustering? Perhaps there is some heuristic that is good enough. Maybe just kmeans or something like that. The deep recursion I saw was for balance_case_nodes