This is an archive of the discontinued LLVM Phabricator instance.

[flang] Use the ShapedType::kDynamicSize constant instead of hardcoding it.
ClosedPublic

Authored by pifon2a on Oct 11 2022, 7:28 AM.

Diff Detail

Event Timeline

pifon2a created this revision.Oct 11 2022, 7:28 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 11 2022, 7:28 AM
pifon2a requested review of this revision.Oct 11 2022, 7:28 AM

Thanks for preparing this patch. I think adding the mlir:: namespace fixes the compilation issue.

flang/include/flang/Optimizer/Dialect/FIRTypes.td
494–497
pifon2a updated this revision to Diff 466890.Oct 11 2022, 12:32 PM

add mlir::

pifon2a marked an inline comment as done.Oct 11 2022, 12:33 PM

Thank you, @kiranchandramohan . Please, take another look.

Thanks once again.

As @clementval mentioned, this could have been part of the original patch as well. I think patches to MLIR also go through a precommit CI (triggered by phabricator) so you get to know whether the patch works as expected for Flang. You can also check flang by using the following commands after cloning llvm-project and creating and switching to a build directory.

cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS="mlir;flang;clang" -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON
ninja check-flang
This revision is now accepted and ready to land.Oct 11 2022, 2:02 PM