The patch is posted to agree on API.
to be honest, not happy with the name.
For unclear reasons, phab dropped a long inline comment from my previous review. Rewritten here.
The comment and naming was confusing to me. I'd suggest the following changes.
- Restrict the API and naming to patchpoint, stackmap, and statepoint explicitly.
- Be clear about the fact that operands are "potentially foldable", not "guaranteed foldable".
A suggested name and comment: getPatchpointUnfoldableRange.
For a patchpoint, stackmap, or statepoint intrinsic, return the range of operands which can't be folded into stack references. These instructions are unique in that stack references for some operands have the same execution cost (e.g. none) as the unfolded register forms. The ranged return is guaranteed to include all operands which can't be folded at zero cost.