[Mlir-commits] [mlir] [MLIR] Erase location of folded constants (PR #75415)
Mehdi Amini
llvmlistbot at llvm.org
Tue Dec 19 03:07:23 PST 2023
================
@@ -290,15 +296,18 @@ OperationFolder::processFoldResults(Operation *op,
Operation *
OperationFolder::tryGetOrCreateConstant(ConstantMap &uniquedConstants,
Dialect *dialect, Attribute value,
- Type type, Location loc) {
+ Type type) {
// Check if an existing mapping already exists.
auto constKey = std::make_tuple(dialect, value, type);
Operation *&constOp = uniquedConstants[constKey];
- if (constOp)
+ if (constOp) {
+ constOp->setLoc(erasedFoldedLocation);
----------------
joker-eph wrote:
This one isn't clear to me: why do we need to erase here?
https://github.com/llvm/llvm-project/pull/75415
More information about the Mlir-commits
mailing list