This module converts symbols from the front-end into unique names used in by the optimizer.
This diff is the latest in a series of diffs to upstream the middle part of flang to llvm-project.
Paths
| Differential D81764
[flang] Add the Mangler module to flang lowering ClosedPublic Authored by schweitz on Jun 12 2020, 1:59 PM.
Details Summary This module converts symbols from the front-end into unique names used in by the optimizer. This diff is the latest in a series of diffs to upstream the middle part of flang to llvm-project.
Diff Detail
Event TimelineComment Actions Will it make sense to add LIT tests(program-units-fir-mangling.f90 in fir-dev) for InternalNames.h with this patch also if any for Mangler.h? Comment Actions Agree with @sameeranjoshi. But it would probably require some Bridge code. If @sameeranjoshi can land the unit test patch, maybe we can have some unit tests. Comment Actions >> But it would probably require some Bridge code. If @sameeranjoshi can land the unit test patch, maybe we can have some unit tests. @isuruf had a comment[1], if he's ok with it I am ready to merge it. Comment Actions Right, it will take a functional bridge and test driver to run end-to-end tests. Neither has been upstreamed at this point, so it is a bit premature to start adding end-to-end tests. Unit tests on internal naming don't have that dependency. But they do have a dependency on the fixes included in this patch. Comment Actions If @sameeranjoshi can land the unit test patch, maybe we can have some unit tests. It's merged now. Comment Actions
I don't think they have dependency, the tests are updated. IIRC, first the bugs were found using tests and later changes were made to code in fir-dev. Comment Actions
If the unit test does NOT depend on the correct behavior of the code it is testing, then the unit test needs more work by definition. The point of this diff is to upstream code from fir-dev. This revision is now accepted and ready to land.Jun 16 2020, 7:45 AM Comment Actions
LGTM.
schweitz added inline comments. Closed by commit rG30db1776935e: [flang] Upstream the Mangler module from lowering. (authored by schweitz). · Explain WhyJun 16 2020, 3:24 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 271230 flang/include/flang/Lower/Mangler.h
flang/include/flang/Optimizer/Support/InternalNames.h
flang/lib/Lower/CMakeLists.txt
flang/lib/Lower/Mangler.cpp
flang/lib/Optimizer/Support/InternalNames.cpp
flang/unittests/Optimizer/InternalNamesTest.cpp
|
Nit: generally is like include/flang/Lower/Manger.h