[all-commits] [llvm/llvm-project] 31c8ab: [AsmParser/Printer] Rework sourceloc support for f...
Chris Lattner via All-commits
all-commits at lists.llvm.org
Thu Apr 21 12:43:51 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 31c8abc3f1cd9aa7787b2bce82abeb744a594f5e
https://github.com/llvm/llvm-project/commit/31c8abc3f1cd9aa7787b2bce82abeb744a594f5e
Author: Chris Lattner <clattner at nondot.org>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M mlir/include/mlir/IR/FunctionImplementation.h
M mlir/include/mlir/IR/OpImplementation.h
M mlir/lib/Dialect/Async/IR/Async.cpp
M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
M mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
M mlir/lib/IR/FunctionImplementation.cpp
M mlir/lib/Parser/Parser.cpp
M mlir/test/Dialect/LLVMIR/func.mlir
M mlir/test/lib/Dialect/Test/TestDialect.cpp
Log Message:
-----------
[AsmParser/Printer] Rework sourceloc support for function arguments.
When Location tracking support for block arguments was added, we
discussed various approaches to threading support for this through
function-like argument parsing. At the time, we added a parallel array
of locations that could hold this. It turns out that that approach was
verbose and error prone, roughly no one adopted it.
This patch takes a different approach, adding an optional source
locator to the UnresolvedOperand class. This fits much more naturally
into the standard structure we use for representing locators, and gives
all the function like dialects locator support for free (e.g. see the
test adding an example for the LLVM dialect).
Differential Revision: https://reviews.llvm.org/D124188
More information about the All-commits
mailing list