[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator-flavour getFirstNonPHI at many call-sites (PR #123737)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 07:25:58 PST 2025


https://github.com/SLTozer approved this pull request.

Code changes LGTM. Regarding the direction of the patch, it seems a little unfortunate to completely remove `getFirstNonPHI()` - sometimes we want the instruction and sometimes we want the iterator, and forcing all of them to go through `getFirstNonPHIIt()` _may_ increase the chances that the iterator and instruction are viewed as interchangeable and lead to people using `&*BB->getFirstNonPHIIt()` as an insertion point. I think the chance of this is substantially less likely than using the wrong iterator the current state of affairs, however!

https://github.com/llvm/llvm-project/pull/123737


More information about the llvm-commits mailing list