Open
Conversation
… for debugging graph edges
… not inserted into cg
… instead of node ids
…s collection of derived type info. And add tests
…tly. so mostly findTypeWithDerivedTypes method. and add test.
pearzt
requested changes
Feb 6, 2026
Member
pearzt
left a comment
There was a problem hiding this comment.
Thanks a lot for all the work, the structure looks really good. I have some initial comments, but I will try to do a more in-depth review soon.
| NO_DEFAULT_PATH | ||
| ) | ||
|
|
||
| # target_link_libraries(${target} PUBLIC flangFrontendTool) |
| The plugin is compiled into a dynamic library and can be run with the | ||
| Flang compiler like so: | ||
|
|
||
| `flang -fc1 -load "build/cgfcollector/libfcollector.so" -plugin "genCG"` |
Member
There was a problem hiding this comment.
The collector should be installed (add install rules, if necessary), so that users don't need to use the library from the build directory/
| add_flang(${PROJECT_NAME}) | ||
| add_metacg(${PROJECT_NAME}) | ||
| add_spdlog_libraries(${PROJECT_NAME}) | ||
| # add_json(${PROJECT_NAME}) |
| return equal; | ||
| } | ||
|
|
||
| int main(int argc, char* argv[]) { |
Member
There was a problem hiding this comment.
Please have a look at CGDiff and see you can use it instead of this tool or what would be necessary to merge the tools. I would like to avoid having both tools in MetaCG.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a call graph collector for Fortran. The collector is implemented as a flang plugin and generates a call graph from source-level. See the tests for a list of language features this plugin covers.
This pull request is quite large, but it is not really possible splitting it in multiply requests without pushing broken code. The tests could be separate into a different pull request, but they are tightly coupled with the collector and would fail without it, so I think keeping it in one pull request makes sense.
What this adds:
cgfcollectorthat includes flang plugin, tests, tools, etc.cgfcollector_wrapper.shandcgfcollector_comp_wrapper.shthat simplify running the plugin.How to run: see
cgfcollector/README.mdThe commit history is a mess, and I don't know how strongly you value a clean git history and if I should clean this up.