1. Feb 05, 2020
    • Jean Perier's avatar
      [flang] Fix template step limit issue with clang · a8ef13ea
      Jean Perier authored
      While working on PR 959, I instanciated a `common::TupleToVariant`
      with ~50+ types inside the tuple. Clang would then crash after
      1hr compilation with message:
      "constexpr evaluation hit maximum step limit; possible infinite loop"
      After investigating, it turned out clang handles very badly the way
      `common::AreTypesDistinctHelper` was implemented.
      Its "number of steps" was exponential with the number of types.
      This fix makes this number quadratic which solves the issue.
      
      Original-commit: flang-compiler/f18@4542cb57082eaf578799c76482d4b706ae5da077
      Reviewed-on: https://github.com/flang-compiler/f18/pull/968
      a8ef13ea
    • Peter Klausler's avatar
      [flang] Merge pull request flang-compiler/f18#950 from flang-compiler/pmk-frame · b6363fac
      Peter Klausler authored
      Formatted output editing & initial buffer framing code
      
      Original-commit: flang-compiler/f18@003b664229a91b1692b52014ef6f9c9b65119b0d
      Reviewed-on: https://github.com/flang-compiler/f18/pull/950
      b6363fac
    • peter klausler's avatar
      [flang] Initial buffer framing code · f7be2518
      peter klausler authored
      Address review comments
      
      Integer output data editing (I,B,O,Z)
      
      Full integer output formatting
      
      Stub out some work in progress
      
      Progress on E output data editing
      
      E, D, EN, and ES output editing done
      
      Fw.d output editing
      
      Real G output editing
      
      G output editing for reals
      
      Make environment a distinct module
      
      CHARACTER and LOGICAL output editing
      
      Minimal decimal representations for E0, F0, G0 editing
      
      Move real output editing code into its own file
      
      Fix/dodge some GCC build problems
      
      Prep work for external I/O statement state
      
      External HELLO, WORLD
      
      Fix build problem with GCC
      
      Add virtual destructors where needed
      
      Add new test
      
      Original-commit: flang-compiler/f18@c3f1774f8eee903928b7e46636edfb03425eabc0
      Reviewed-on: https://github.com/flang-compiler/f18/pull/950
      f7be2518
  2. Feb 04, 2020
  3. Jan 30, 2020
  4. Jan 29, 2020
    • Jinxin (Brian) Yang's avatar
      [flang] Merge pull request flang-compiler/f18#960 from flang-compiler/by-remove-default · 431b0aef
      Jinxin (Brian) Yang authored
      Remove `default` case for OmpSectionsDirective (only two enum values)
      
      Original-commit: flang-compiler/f18@d98bf8494e2e017ed9a7e1d3c93688c379c01bf3
      Reviewed-on: https://github.com/flang-compiler/f18/pull/960
      431b0aef
    • Jinxin Yang's avatar
      [flang] Remove `default` case for OmpSectionsDirective (only two enum values) · d8f4d7fc
      Jinxin Yang authored
      Original-commit: flang-compiler/f18@3f37e0dbaf32f1127553be2149915cab1b93cdcf
      Reviewed-on: https://github.com/flang-compiler/f18/pull/960
      d8f4d7fc
    • Jinxin (Brian) Yang's avatar
      [flang] [OpenMP] Name Resolution for OpenMP constructs (flang-compiler/f18#940) · 64b7325a
      Jinxin (Brian) Yang authored
      This is an extended framework based on the previous work that addresses
      the NR on OpenMP directives/clauses (b2ea520). In this change:
        * New `OmpVisitor` is created (ResolveNamesVisitor derives from it) to
          create necessary scopes for certain OpenMP constructs. This is along
          with the regular Fortran NR process.
        * Old `OmpVisitor` is adjusted and converted to a standalone visitor--
          `OmpAttributeVisitor`. This is used to walk through the OpenMP constructs
          and do the NR for variables on the OpenMP directives or data references
          within the OpenMP constructs. "Do the NR" here means that based on the NR
          results of the regular Fortran NR, fix the symbols of `Names` related
          to the OpenMP constructs. Note that there is an `OmpContext` in this
          visitor (similar to the one in `OmpStructureChecker`), this is necessary
          when dealing with the nested OpenMP constructs in the future.
      
      Given an OpenMP code:
      ```
      real*8 a, b
        a = 1.
        b = 2.
        !$omp parallel private(a)
        a = 3.
        b = 4.
        !$omp end parallel
        print *, a, b
      end
      ```
      
      w/o -fopenmp:
      ```
      real*8 a, b
       !REF: /MainProgram1/a
       a = 1.
       !REF: /MainProgram1/b
       b = 2.
       !!!! OMP parallel
       !REF: /MainProgram1/a
       a = 3.
       !REF: /MainProgram1/b
       b = 4.
       !!!! OMP end parallel
       !REF: /MainProgram1/a
       !REF: /MainProgram1/b
       print *, a, b
      end
      ```
      
      w/ -fopenmp:
      ```
      real*8 a, b
       !REF: /MainProgram1/a
       a = 1.
       !REF: /MainProgram1/b
       b = 2.
      !$omp parallel  private(a)   <-- new Symbol for 'a' created
       !DEF: /MainProgram1/Block1/a (OmpPrivate) HostAssoc REAL(8)
       a = 3.   <-- fix the old symbol with new Symbol in parallel scope
       !REF: /MainProgram1/b
       b = 4.   <-- do nothing because by default it is shared in this scope
      !$omp end parallel
       !REF: /MainProgram1/a
       !REF: /MainProgram1/b
       print *, a, b
      end
      ```
      
      Please note that this is a framework update, there are still many
      things on the TODO list for finishing the NR for OpenMP (based on
      the `OpenMP-semantics.md` design doc), which will be on top of this
      framework.
      
      Some TODO items:
      - Create a generic function to go through all the rules for deciding
        `predetermined`, `explicitly determined`, and `implicitly determined`
        data-sharing attributes. (This is the next biggest part)
      - Handle `Array Sections` and `Array or Structure Element`.
      - Take association into consideration for example Pointer association,
        `ASSOCIATE` construct, and etc.
      - Handle all the name resolution for directives/clauses that have
        `parser::Name`.
      
      * N.B. Extend `AddSourceRange` to apply to current and parent scopes
        - motivated by a few cases that need to call `AddSourceRange`
          for current & parent scopes; the extension should be safe
        - global scope is not included
      
      Original-commit: flang-compiler/f18@0c3c39d30e3f166a6a1303337c5fd7eead720fd0
      Reviewed-on: https://github.com/flang-compiler/f18/pull/940
      64b7325a
  5. Jan 28, 2020
  6. Jan 25, 2020
  7. Jan 28, 2020
  8. Jan 26, 2020
  9. Jan 28, 2020
  10. Jan 25, 2020
  11. Jan 23, 2020
  12. Jan 16, 2020
  13. Jan 15, 2020