Insertion point versus location? (original) (raw)

November 7, 2025, 9:27am 1

When creating operations with mlir::OpBuilder what is the difference between insertion point and “location” used as an argument to the mlir::OpBuilder::create function?
(By insertion point I mean whatever is specified in mlir::OpBuilder::setInsertionPoint* family of functions)

MacDue November 7, 2025, 11:41am 2

Location is a debug location (i.e., which part of the source resulted in the IR being generated, e.g., which line of a C code). The insertion point is the position within the MLIR function where you want to place your new operation.