Hi Richard, Thanks, that makes sense. I'll continue looking into the cgraph/IPA body handling and the separate-body direction while working out the scope.
Also, while doing my homework on this area, I came across another IPA issue, PR127509. A call through a plain alias of a noipa function can currently be optimized using properties discovered from the aliased body, even though a direct call is not. I traced this to cgraph_node::get_availability only looking at the alias decl, and opened PR127509 to document the issue. The PR has one reduced testcase, and I also posted a patch to gcc-patches with three regression tests covering the alias case, ICF merging through aliases, and an additonal caller level. Thanks, Rohith
