[Mlir-commits] [mlir] mlir/Presburger: contribute a free-standing parser (PR #94916)
Ramkumar Ramachandra
llvmlistbot at llvm.org
Mon Jul 8 01:15:30 PDT 2024
================
@@ -182,18 +183,43 @@ class PresburgerSpace {
/// Get the space without local variables.
PresburgerSpace getSpaceWithoutLocals() const;
- unsigned getNumDomainVars() const { return numDomain; }
- unsigned getNumRangeVars() const { return numRange; }
- unsigned getNumSetDimVars() const { return numRange; }
- unsigned getNumSymbolVars() const { return numSymbols; }
- unsigned getNumLocalVars() const { return numLocals; }
+ constexpr unsigned getNumDomainVars() const { return numDomain; }
+ constexpr unsigned &numDomainVars() { return numDomain; }
+ constexpr unsigned getNumRangeVars() const { return numRange; }
+ constexpr unsigned &numRangeVars() { return numRange; }
+ constexpr unsigned getNumSetDimVars() const { return numRange; }
+ constexpr unsigned &numSetDimVars() { return numRange; }
+ constexpr unsigned getNumSymbolVars() const { return numSymbols; }
+ constexpr unsigned &numSymbolVars() { return numSymbols; }
+ constexpr unsigned getNumLocalVars() const { return numLocals; }
+ constexpr unsigned &numLocalVars() { return numLocals; }
+ constexpr unsigned getNumDimVars() const { return numDomain + numRange; }
+ constexpr unsigned getNumDimAndSymbolVars() const {
+ return getNumDimVars() + getNumSymbolVars();
----------------
artagnon wrote:
Those methods are insufficient, as I directly set the variable to the value in some places.
https://github.com/llvm/llvm-project/pull/94916
More information about the Mlir-commits
mailing list