[flang-commits] [flang] [Flang][OpenMP] Add --cg-rewrite pass to convert-to-llvm-openmp-and-fir.fir test (PR #96530)
Abid Qadeer via flang-commits
flang-commits at lists.llvm.org
Mon Jun 24 14:49:13 PDT 2024
abidh wrote:
> > The fir::cg::XDeclareOp is quite a recent addition so it was not there when the test was originally written.
>
> Thank you very much @abidh ! Would adding the cg-rewrite pass to the fir-opt argument list be the correct fix in this case then?
>
> The verification issue was there prior to the addition of fir::cg::XDeclareOp, however, It seems from looking at the previous code (and quickly testing it via regressing that section of code) for the DeclareOp rewrite inside of PreCGRewrtie.cpp it would be correct still, as it seems to replace all DeclareOp's with the corresponding memory reference (if I am understanding the prior rewrite code correctly at least) which allows the FIR -> LLVM dialect conversion to pass without verification issues.
I don't think it will be problem adding `--cg-rewrite` here as it is already running `--cfg-conversion`. Although I wonder if we are testing the conversion to llvm-ir, why not take the IR right before that pass and check that specific conversion. But I don't have the full context so feel free to ignore my comments.
https://github.com/llvm/llvm-project/pull/96530
More information about the flang-commits
mailing list