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

Karthika Devi C via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 24 04:31:31 PDT 2025


kartcq 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.

I have made modifications to use this variant, especially while using `getTerminator()`, `front()` and `getFirstInsertionPt()` functions.

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


More information about the llvm-commits mailing list