Drop AffineMap::Null and IntegerSet::Null
authorNicolas Vasilache <ntv@google.com>
Sat, 26 Jan 2019 18:41:17 +0000 (10:41 -0800)
committerjpienaar <jpienaar@google.com>
Fri, 29 Mar 2019 22:40:08 +0000 (15:40 -0700)
commit0e7a8a9027c5f5862c3c78f41c777ba2930f9b23
tree943c4fbf692361d86ff3a7dd1d91962a30f92d9f
parent81c7f2e2f3bf34bc45915bbb3eb44f37331aff91
Drop AffineMap::Null and IntegerSet::Null

Addresses b/122486036

This CL addresses some leftover crumbs in AffineMap and IntegerSet by removing
the Null method and cleaning up the constructors.

As the ::Null uses were tracked down, opportunities appeared to untangle some
of the Parsing logic and make it explicit where AffineMap/IntegerSet have
ambiguous syntax. Previously, ambiguous cases were hidden behind the implicit
pointer values of AffineMap* and IntegerSet* that were passed as function
parameters. Depending the values of those pointers one of 3 behaviors could
occur.

This parsing logic convolution is one of the rare cases where I would advocate
for code duplication. The more proper fix would be to make the syntax
unambiguous or to allow some lookahead.

PiperOrigin-RevId: 231058512
12 files changed:
mlir/include/mlir/Analysis/AffineStructures.h
mlir/include/mlir/IR/AffineMap.h
mlir/include/mlir/IR/IntegerSet.h
mlir/include/mlir/Transforms/Utils.h
mlir/lib/Analysis/AffineStructures.cpp
mlir/lib/Analysis/Utils.cpp
mlir/lib/IR/Instruction.cpp
mlir/lib/IR/MLIRContext.cpp
mlir/lib/Parser/Parser.cpp
mlir/lib/Transforms/LoopFusion.cpp
mlir/lib/Transforms/PipelineDataTransfer.cpp
mlir/lib/Transforms/Utils/LoopUtils.cpp