Depends on D152081.
Supporting the SkipNonRecursive flag should improve compile-time a good bit. We only need to infer attributes at this pipeline position for non-trivial SCCs.
Will do I was hoping for more promising compile-time data to have clear path towards enabling it for attribute inference, but at the moment the data doesn't look very promising unfortunately
When we use PostOrderFunctionAttrsPass(/*SkipNonRecursive*/ true) and LightweightAttributorCGSCCPass only at the other position, there's unfortunately still a ~2% regression: https://llvm-compile-time-tracker.com/compare.php?from=3a458256ee22a0e7c31529de42fa6caa263d88fe&to=3e8ea897fa2533f52488b7ceab27f6b0d91599dc&stat=instructions%3Au