[PATCH] D39982: [IRBuilder] Set the insert point and debug location together
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 16 14:35:00 PST 2018
vsk added a comment.
Ping, I'd love to find a path forward on this since it's a prerequisite for fixing bugs in LSR and SCEVExpander.
The main remaining issue is what to do with the old IRBuilder APIs for setting the insertion point. We discussed a couple options:
- I looked at converting all in-tree users to the new API in one shot. We have ~580 users, so this doesn't seem feasible to me without a deprecation period for the old APIs.
- I started working on an automatic update tool, but found that it's necessarily fragile (e.g when handling side-effecting arguments to API calls). In addition, it would require adding a confusing API to IRBuilder so that clients can mimic the 'sticky' behavior of one of SetInsertPoint's overloads.
Here are some ways I think we can move forward:
- Rename the new APIs to 'setInsertPointAndLoc' and keep the old APIs in perpetuity.
- Deprecate the old APIs for 1-2 releases and use the time to migrate in-tree users.
@echristo, @dblaikie, @aprantl and others: I'd like to hear your thoughts on this (especially if you have alternatives not listed here). Thanks!
https://reviews.llvm.org/D39982
More information about the llvm-commits
mailing list