This patch reflects the work that can be upstreamed from PR(merged)
PR: https://github.com/flang-compiler/f18-llvm-project/pull/411
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
flang/unittests/Lower/OpenMPLoweringTest.cpp | ||
---|---|---|
86 ↗ | (On Diff #292566) | What is the plan with those unit tests once the bridge and lit test will be upstream. As I said previously, I don't think those test are testing the actual lowering and the API they use is probably tested in the respective MLIR tests. Are we going to delete them once we have the lit one or do we have to maintain both? |
flang/unittests/Lower/OpenMPLoweringTest.cpp | ||
---|---|---|
86 ↗ | (On Diff #292566) |
The plan is to continue this way(if people have nothing against this (including you)). Later at some point when we have the bridge, all we have to do is switch the builder and integrate the API.
These are just unit-tests, can/should be extended when a new Op is introduced or lowered. There won't be much of a maintenance issue that I can think of. |
flang/unittests/Lower/OpenMPLoweringTest.cpp | ||
---|---|---|
86 ↗ | (On Diff #292566) | My biggest concern is that these tests are disconnected from the actual code in flang/lib/Lower/OpenMP.cpp. I think @jeanPerier raised some concern in the past about those tests as well. If others are happy with them I'll follow the crowd but I have a hard time understanding what those tests are bringing in. |
flang/unittests/Lower/OpenMPLoweringTest.cpp | ||
---|---|---|
86 ↗ | (On Diff #292566) | Thanks for bringing more audience. Let's make a decision here as to whether we want this or not. |
flang/unittests/Lower/OpenMPLoweringTest.cpp | ||
---|---|---|
86 ↗ | (On Diff #292566) | I share @clementval opinion here. These tests do not verify lowering, they verify properties of the parse-tree and mlir and belong better there. Here, they may give fake confidence to someone modifying genOMP that he did not break it. The best would be to test genOMP here, though I agree it is easier said than done since that would require a lot of boilerplate and be harder to maintain than lit tests while not necessarily bringing much more confidence. IMHO, if you want to keep these tests, they should be moved under an "OpenMP" directory under https://github.com/llvm/llvm-project/tree/master/mlir/unittests/Dialect (but for the tests like EXPECT_EQ(barrierDirective.v, llvm::omp::Directive::OMPD_barrier); that are parse-tree unit tests and would not fit under mlir unit tests. But I feel you can just skip that part that the lit tests will better cover instead). |
Thanks @jeanPerier for reviewing this!
Here's the things on my TODO list:
- I'll revise this revision removing this test.
- Then after the patch lands, I'll do a patch for removal of the unit-test(Would it be necessary to file a separate review ?, IMHO this can be without bothering anyone.)
Please, let me know if you guys have any suggestion or anything.
flang/unittests/Lower/OpenMPLoweringTest.cpp | ||
---|---|---|
86 ↗ | (On Diff #292566) |
Okay, Thanks for letting us know.
Agreed!
We investigated this before putting these tests, cannot happen till the some missing pieces of Bridge are in place.
Sounds good! but at-least out of the purview of this patch. |