[Mlir-commits] [mlir] [MLIR] Erase location of folded constants (PR #75415)

Mehdi Amini llvmlistbot at llvm.org
Wed Dec 13 23:21:58 PST 2023


================
@@ -154,6 +154,7 @@ bool OperationFolder::insertKnownConstant(Operation *op, Attribute constValue) {
                                  !isFolderOwnedConstant(op->getPrevNode())))
     op->moveBefore(&insertBlock->front());
 
+  op->setLoc(erasedFoldedLocation);
----------------
joker-eph wrote:

I would think we'd only need to erase the location if we actually move the operation? (that is: the check 3 lines above)

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


More information about the Mlir-commits mailing list