Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flang] Add debug information for module variables. #91582

Merged
merged 9 commits into from
May 22, 2024
Merged

Commits on May 20, 2024

  1. [flang] Add initial implementation of module variables.

    This PR add supports for module variables and function. The module
    variables are added as global variables but their scope is set to
    module instead of compile unit. The scope of function declared inside
    a module is also set accordingly.
    
    After this patch, a module variable could be evaluated in the GDB as
    `p helper::gli` where helper is name of the module and gli is the name
    of the variable. A future patch will add the import module functionality
    which will remove the need to prefix the name with helper::.
    
    The line number where is module is declared is a best guess at the
    moment as this information is not part of the GlobalOp.
    abidh committed May 20, 2024
    Configuration menu
    Copy the full SHA
    eecff7b View commit details
    Browse the repository at this point in the history
  2. Handled review comments.

    Following changes were done.
    
    1. Remove MLIR changes as they have been moved to separate PR.
    
    2. Replace std::map with llvm::StringMap
    
    3. Use a direct for loop instead of module.walk.
    abidh committed May 20, 2024
    Configuration menu
    Copy the full SHA
    e87df98 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    be8a2ba View commit details
    Browse the repository at this point in the history
  4. Addressed review comments.

    1. Skip variables if module list is empty.
    
    2. Add a missing line at the end of a file.
    abidh committed May 20, 2024
    Configuration menu
    Copy the full SHA
    e90d49a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e837cab View commit details
    Browse the repository at this point in the history
  6. Replace 'hasInitializationBody' with 'isInitialized'.

    This address one of the review comments.
    abidh committed May 20, 2024
    Configuration menu
    Copy the full SHA
    94aecb0 View commit details
    Browse the repository at this point in the history
  7. Handle review comments.

    Fixed nits and move IR tests to Integration folder.
    abidh committed May 20, 2024
    Configuration menu
    Copy the full SHA
    3487f18 View commit details
    Browse the repository at this point in the history
  8. Fix clang-format issues.

    abidh committed May 20, 2024
    Configuration menu
    Copy the full SHA
    5d5c73c View commit details
    Browse the repository at this point in the history

Commits on May 21, 2024

  1. Handle review comments.

    Add test files that work on fir and test individual passes. Remove the
    fortran testcase.
    abidh committed May 21, 2024
    Configuration menu
    Copy the full SHA
    c509126 View commit details
    Browse the repository at this point in the history