[polly] [RemoveDI][Polly] Use iterators instead of instruction pointers to SetInsertPoint (PR #135336)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 15:10:20 PDT 2025


Meinersbur wrote:

Consider use the `SetInsertPoint(BasicBlock *, BasicBlock::iterator)` overload. It also works when there is no instruction in the BB.

Things like `->getTerminator()` and `->front()` also only work when there is a least one instruction in the block, but will also fail more obviously if that's not the case. 

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


More information about the llvm-commits mailing list