[MLIR][Presburger] unittests: use an MLIRContext declared in parsePoly
authorArjun P <arjunpitchanathan@gmail.com>
Wed, 23 Feb 2022 15:00:17 +0000 (15:00 +0000)
committerArjun P <arjunpitchanathan@gmail.com>
Wed, 23 Feb 2022 15:07:00 +0000 (15:07 +0000)
commit4b86d55997cfac5b7a6fb0d31f4bad1b8bdf5ca5
tree444c16ae7a9a41d5ae017c540b1de096cbac4403
parente66b1b73854e43f7e822fbb3be9e9875e6780761
[MLIR][Presburger] unittests: use an MLIRContext declared in parsePoly

Use an `MLIRContext` declared in a single place in the `parsePoly` function that almost all Presburger unit tests use for parsing sets. This function is only used in tests.

This saves us from having to declare and pass a new `MLIRContext` in every test.

Reviewed By: bondhugula, mehdi_amini

Differential Revision: https://reviews.llvm.org/D119251
mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp
mlir/unittests/Analysis/Presburger/PWMAFunctionTest.cpp
mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp
mlir/unittests/Analysis/Presburger/SimplexTest.cpp
mlir/unittests/Analysis/Presburger/Utils.h