The patch is posted to agree on API.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/CodeGen/TargetInstrInfo.h | ||
---|---|---|
1073 | to be honest, not happy with the name. |
Naming suggestions, but likely to converge to LGTM on next iteration.
llvm/lib/CodeGen/TargetInstrInfo.cpp | ||
---|---|---|
501 | Minor, move the assert above the variable declarations. |
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.
to be honest, not happy with the name.
Actually I also want to use this function to determine what operands are ok to use both stack and register...
Any suggestions for the name?