[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator moveBefore at many call-sites (PR #123583)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 03:39:58 PST 2025


================
@@ -448,7 +448,7 @@ void IRPromoter::ExtendSources() {
       if (isa<Argument>(V))
         I->moveBefore(InsertPt);
       else
-        I->moveAfter(InsertPt);
+        I->moveAfter(&*InsertPt);
----------------
jmorse wrote:

Good question on this and the other item; I think the most important fact is that inserting _after_ an instruction never introduces a problem with head-bits and debug records, because it's always "in front" of any debug records. As a result, it's not necessary to update moveAfter before stripping out intrinsic-support from LLVM (if we get there) so I haven't focused on this.

We could technically update moveAfter to use iterators (which has the benefit of uniformity); I suppose it's a transition matter because I'm not planning on doing it immediately.

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


More information about the llvm-commits mailing list