[PATCH] D129660: [IR] Add Instruction::getAfterDefInsertionPoint()

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 05:42:37 PDT 2022


nikic added a comment.

This would have prevented D132105 <https://reviews.llvm.org/D132105>...



================
Comment at: llvm/lib/IR/Instruction.cpp:131
+    InsertBB = CB->getDefaultDest();
+    InsertPt = InsertBB->getFirstInsertionPt();
+  } else {
----------------
nickdesaulniers wrote:
> nickdesaulniers wrote:
> > efriedma wrote:
> > > I think for CallBrInst, we're considering modifying the dominance rules to allow the produced value to be used in all destinations?  In which case there wouldn't be one unique location after the definition.
> > > I think for CallBrInst, we're considering modifying the dominance rules to allow the produced value to be used in all destinations?
> > 
> > Yes; GCC implemented asm goto w/ outputs this way; we should update our implementation, too. @morbo and I were just discussing this on Tuesday.
> > 
> > https://github.com/llvm/llvm-project/issues/53562
> @void I meant.
But shouldn't we still implement the current semantics for now? Allowing callbr result to be used on all successors will need more changes, in particular to dominance.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129660/new/

https://reviews.llvm.org/D129660



More information about the llvm-commits mailing list