[Mlir-commits] [mlir] [MLIR] Add 'const' qualifier to some functions (PR #72430)

Akash Banerjee llvmlistbot at llvm.org
Wed Nov 15 12:34:38 PST 2023


TIFitis wrote:


> Marking these `const` somewhat goes against the "usage of const" rationale: https://mlir.llvm.org/docs/Rationale/UsageOfConst/ IR constructs, which `mlir::Value` definitely is, simply should never appear as `const` and therefore marking the methods `const` would set the wrong precedence I fear.

It seems inconsistent to me to have it for some functions and not for others. Following functions already have the const qualifier:
- `mlir::Value::dropAllUses`
- `mlir::Value::replaceAllUsesWith`
- `mlir::Value::replaceAllUsesExcept`




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


More information about the Mlir-commits mailing list