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

Port Classic Flang to LLVM 18.1.1 #178

Merged
merged 60 commits into from
Apr 17, 2024

Commits on Mar 25, 2024

  1. Port Classic Flang to LLVM 15

    This commit cherry-picks 427c0e8 from the
    release_14x branch, which is a combination of the following legacy patches:
    
    Commit 82b38d2:
    
        [ClassicFlang] Port release_90 changes from flang-compiler/llvm
    
        Cherry-picked commit 2085211cfcca70411dc63f0d08763facc8a02090 by Eric Schweitz,
        resolved merge conflicts, fixed build failures (e.g. adapted CGDebugInfo.cpp to
        the new API), and fixed the DIGlobalVariable unit tests, which have been broken
        since commit edfad65eebdf045b050f37380b6b61d673513982.
    
    Commit 885dd87e5fdc:
    
        [DebugInfo] Removal of DIFortranArrayType and DIFortranSubrange
    
        These extensions are no more required after merge of below PR.
    
    Commit 5c9b2e0867d5:
    
        Modification to incorporate comments from @bryanpkc.
    
    Commit 822de2c:
    
        [AsmPrinter] Fix redundant names and types
    
        A bug was introduced in 82b38d2 while
        cherry-picking a DIGlobalVariable-related patch.
    
    Commit 45a70a8:
    
        Port driver changes from release/11x
    
        Cherry-picked c51f89679135f84675f492d560ec5535c2000cfe by Varun Jayathirtha
        from release_90, and resolved merge conflicts.
    
        To avoid conflicts with the new Flang, lib/Driver/ToolChains/Flang.{cpp,h}
        have been renamed to ClassicFlang.{cpp,h}, and the ENABLE_CLASSIC_FLANG macro
        is introduced to select which incarnation of Flang to build. The macro is set
        by running CMake with -DLLVM_ENABLE_CLASSIC_FLANG.
    
        After merge with LLVM 11: Move flang options to the end of the definitions list.
    
    Commit a9a8036:
    
        Port Classic Flang to LLVM 13
    
        File changes to TargetLibraryInfo and DebugLocEntry to adapt to the code from
        release/13.x and make it work. Comment out the changes due a segmentation
        fault, code need to be reviewed properly once all commits are in
    
    Commit fe989b7:
    
        Fix -fveclib=PGMATH
    
        The use of #ifdef in include/clang/Driver/Options.td was incorrect and
        unsupported. As a result -fveclib=PGMATH was silently ignored, and
        in LLVM 12, it causes the invocation to fail. This patch unguards the
        option so that it is parsed correctly, but lets the FLANG_LLVM_EXTENSIONS
        macro continue to toggle the feature.
    
    Commit 7c224ae:
    
        Fix use of classic Flang as preprocessor
    
    Commit 8403c83:
    
        Merge FLANG_LLVM_EXTENSIONS macro into ENABLE_CLASSIC_FLANG
    
    Commit 486741e:
    
        Fix test failures when in classic Flang mode
    
        Add a new lit feature tag "classic_flang" to select which tests can or cannot be
        run when the driver is built for classic Flang. Handle LLVM_ENABLE_CLASSIC_FLANG
        in llvm/cmake/modules/HandleLLVMOptions.cmake instead of clang/CMakeLists.txt so
        that macro works in both clang and llvm.
    
    Commit a10f592:
    
        Port Classic Flang to LLVM 13
    
        LLVM port from release_12x to release_13x, changes done in order to
        make project able to be build.
    
    Commit d385321 (partial):
    
        Change to Options.td in order to add the correct invocation for
        ffixed_line_length_VALUE.
    
    This commit also includes the following legacy patch:
    
    Commit 5da2c11:
    
        Add DebugInfo tests
    
    Commit c379c8d:
    
        [ClassicFlang][Driver] Correct the LLVM version passed by the Driver
    schweitzpgi authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    0f000ae View commit details
    Browse the repository at this point in the history
  2. [ClassicFlang][Driver] Coexist with LLVM Flang

    Make TableGen respect the ENABLE_CLASSIC_FLANG macro and better separate the
    driver options that are mutually exclusive. When the macro is defined, do not
    build LLVM Flang at all.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    aa74277 View commit details
    Browse the repository at this point in the history
  3. Support for DWARF 4/5 and fix of issues related to -gdwarf-X options (f…

    …lang-compiler#92)
    
    * Support for -gdwarf-5 option in Flang driver.
    
    Summary:
      FLANG driver doesnt pass -gdwarf-4/5 to flang1 in form of xbits,
    while it passes for -gdwarf-2/3
       -gdwarf-2 => -x 120 0x200
       -gdwarf-3 => -x 120 0x4000
    
    Due to this -gdwarf-5 is never honored and default option -gdwarf-4
    is taken.
        # flang -gdwarf-5 test.f90
        # llvm-dwarfdump a.out | grep version
        0x00000000: Compile Unit: length = 0x0000008e version = 0x0004
    
      Now 0x1000000/0x2000000 will be passed for -gdwarf-4/5
       -gdwarf-4 => -x 120 0x1000000
       -gdwarf-5 => -x 120 0x2000000
    
    Testing:
      - GNU gdb fortran testsuite
      - check-llvm
      - check-debuginfo
    
    * Flang doenst choose correct dwarf version when multiple -g/-gdwarfN mentioned
    
     Summary:
    When multiple -g/-gdwarfN options are passed together at compile time,
    flang chooses the least one. Clang/gfortran etc choose the last one.
    
    -gdwarf-5 -gdwarf-3 => flang chooses 5 while clang/gfortran choose 3
    -gdwarf-5 -g => flang choses the default while clang/gfortran choose 5
    
      Testing:
    - check-llvm
    - check-debuginfo
    
    * Default dwarf version should be 4 for -g with flang
    
    Currently flang dumps dwarf version 2 for -g and 4 for absence of -g
    
    -------------------------
    $ flang my.f90
    $ llvm-dwarfdump a.out | grep version
    0x00000000: Compile Unit: length = 0x0000003d version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000041)
    
    $ flang -g my.f90
    $ llvm-dwarfdump a.out | grep version
    0x00000000: Compile Unit: length = 0x00000047 version = 0x0002 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x0000004b)
    -------------------------
    
    It should be 4 for -g as it is the case with clang.
    alokkrsharma authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    55491bf View commit details
    Browse the repository at this point in the history
  4. Reduce downstream delta

    This commit is motivated by reducing the merge burden by shrinking the
    diff between llvm upstream and classic-flang-llvm-project.
    
    Outside of Flang, Fortran code is fed through the Compile phase, and
    the appropriate tooling is picked up through ToolChain::SelectTool.
    
    Classic Flang introduced a FortranFrontend, but these days this seems
    unnecessary. Fortran can go through the same machinery as everything else.
    
    * Use the Preprocess phase to preprocess Fortran code. This phase is
      always combined with the Compile phase.
    
    * Use the Compile phase to lower Fortran code to LLVM IR, and use the
      Backend phase to compile and optimize the IR. These phases are never
      combined.
    
    * Remove FortranFrontendJobClass.
    
    * Remove FortranFrontend tool (instead it's just the Flang tool, which
      in Classic Flang mode is Classic Flang).
    
    * Update tests which inspect the output of the Classic Flang tooling,
      and ensures that the driver does the right thing for various types of
      inputs.
    
    Based on a patch from Peter Waller <[email protected]>.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    2936377 View commit details
    Browse the repository at this point in the history
  5. [workflows] Set up GitHub actions for Classic Flang

    This commit squashes the following CI-related patches from the release_14x
    branch.
    
      commit 54a96d0
      Author: Kiran Chandramohan <[email protected]
      Date:   Wed Oct 28 17:08:22 2020 +0000
    
          [workflows] Removing a few CI pipelines
    
      commit 8bf9551
      Author: Bryan Chan <[email protected]>
      Date:   Mon May 2 21:16:56 2022 -0400
    
          [workflows] Stop using upstream actions and enable OpenMP build
    
      commit b921dd2
      Author: michalpasztamobica <[email protected]>
      Date:   Fri Jun 4 13:55:52 2021 +0200
    
          [workflows] Allow pre-compile jobs to be trigerred manually.
    
      commit 9f828fd
      Author: michalpasztamobica <[email protected]>
      Date:   Fri Jun 4 22:09:44 2021 +0200
    
          [workflows] Add build scripts and make CI use them.
    
      commit a976b96
      Author: Abraham Tovar <[email protected]>
      Date:   Wed Oct 13 11:40:30 2021 +0200
    
          [workflows] LLVM release_13x CI changes
    
      commit 7a5ee22
      Author: Abraham Tovar <[email protected]>
      Date:   Wed Nov 17 10:14:21 2021 +0000
    
          [workflows] Removing CI test-base for release_100
    
      commit a39a0c6
      Author: pwisniewskimobica <[email protected]>
      Date:   Thu Jan 27 15:06:19 2022 +0100
    
          [workflows] Use GCC 11 in CI builds
    
      commit 198a6b2
      Author: pwisniewskimobica <[email protected]>
      Date:   Thu Jan 13 10:11:43 2022 +0100
    
          [workflows] Modify CI scripts to add more test variants
    
      commit 84ed34d
      Author: Bryan Chan <[email protected]>
      Date:   Sun Apr 24 19:13:25 2022 -0400
    
          [workflows] support GitHub actions for release_14x branch
    
      commit dd852a6
      Author: Bryan Chan <[email protected]>
      Date:   Fri Jul 15 21:50:21 2022 -0400
    
          [workflows] Fix CI for release_14x
    
      commit b52bcc0
      Author: Bryan Chan <[email protected]>
      Date:   Wed Jul 27 22:28:43 2022 -0400
    
          [build] Stop caching AArch64 Docker image layers
    kiranchandramohan authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    5b5f66f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    da19b3c View commit details
    Browse the repository at this point in the history
  7. [Driver] Support macOS

    isuruf authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    6dd7623 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    19b11ac View commit details
    Browse the repository at this point in the history
  9. [ClassicFlang][Driver] Fix warnings

    * -Wsuggest-override for ClassicFlangMacroBuilder::defineMacro
    * -Wrange-loop-construct when iterating over llvm::opt::Arg::getValues
    
    Signed-off-by: Itay Bookstein <[email protected]>
    nextsilicon-itay-bookstein authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    48c8b94 View commit details
    Browse the repository at this point in the history
  10. [driver] Add -emit-flang-llvm option

    -emit-flang-llvm instructs flang to stop after flang2 and dump the LLVM IR.
    
    Can be useful for debugging and also would be a useful option for testing flang
    output more accurately.
    
    Signed-off-by: Richard Barton <[email protected]>
    RichBarton-Arm authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    2a7545e View commit details
    Browse the repository at this point in the history
  11. [driver] Add regression test

    RichBarton-Arm authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    c4cc8a3 View commit details
    Browse the repository at this point in the history
  12. [driver] Add infrastructure for testing the flang-driver in lit

    Add %flang as a tool substitution available in lit tests. This apes the way
    %clang is defined and adds a $FLANG override in a similar vein.
    
    To avoid this being dead code, add a single test to check the flang driver is
    reporting the correct phases when running under various phase control options.
    
    Signed-off-by: Richard Barton <[email protected]>
    RichBarton-Arm authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    3f814e8 View commit details
    Browse the repository at this point in the history
  13. [LoopVectorize] Revert Classic Flang patch causing AArch64 test failure

    This patch partially reverts the following commit from an early version of
    Classic Flang LLVM:
    
    flang-compiler/llvm@6866909
    
    When the LoopVectorize.cpp change in that commit is ported to LLVM 14, it causes
    a failure in the following test:
    
    llvm/test/Transforms/LoopVectorize/AArch64/smallest-and-widest-types.ll
    
    Reverting the change allows all tests to run cleanly.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    40d4dfa View commit details
    Browse the repository at this point in the history
  14. [driver] Pass LLVM target_features to flang

    Port commit 64bf2a6 to LLVM 16 and resolve merge conflicts. The original
    commit message follows:
    
    Pass LLVM target features (-mattr strings) to flang to embed in generated
    .ll files. For normal compilation this won't make much difference as the
    attributes are passed to clang after flang2 and can be applied there but this
    is crucial to enable LTO with flang as clang will not apply the attributes
    when building the flang2 output. libLTO will need to read these out of the
    object files to apply them.
    
    Signed-off-by: Richard Barton <[email protected]>
    RichBarton-Arm authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    1ff0fd9 View commit details
    Browse the repository at this point in the history
  15. [flang-driver] Uniquify the target_features string

    Use existing clang support for uniquifying target feature lists to pass
    a unique list through to flang.
    RichBarton-Arm authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    bd8a82c View commit details
    Browse the repository at this point in the history
  16. [driver] Pass msve-vector-bits to flang as vscale range

    Signed-off-by: Paul Osmialowski <[email protected]>
    pawosm-arm authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    b62f8fb View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    72e8923 View commit details
    Browse the repository at this point in the history
  18. Fix classic flang version screen

    Version screen has been erroneously reporting as flang-new since LLVM 12
    RichBarton-Arm authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    b05848b View commit details
    Browse the repository at this point in the history
  19. Canonicalize some ENABLE_CLASSIC_FLANG

    These CMake variables are used to set python variables in the lit
    config. As such, they need to bet set with a valid CMake boolean value
    that is also a valid python boolean value (1, True, etc.) and not one
    that is not (ON, NO, etc.) to work. This is fragile.
    
    Call the LLVM cmake helper function on these two downstream CMake
    RichBarton-Arm authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    917d7ee View commit details
    Browse the repository at this point in the history
  20. [NFC] Add missing ENABLE_CLASSIC_FLANG guard.

    Signed-off-by: Richard Barton <[email protected]>
    RichBarton-Arm authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    80cbce7 View commit details
    Browse the repository at this point in the history
  21. Fix flang driver preprocessor issue

    Fix a bug where flang -E -save-temps input.F90 would preprocess
    the input file twice. Add a new test for preprocessor behaviour that
    would expose the bug and updated fortran-phases test for new behaviour.
    
    Also added -emit-flang-llvm to that test for completeness.
    
    Signed-off-by: Richard Barton <[email protected]>
    RichBarton-Arm authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    5e6e1d7 View commit details
    Browse the repository at this point in the history
  22. classic flang: enable IEEE by default (and sort Lower/Common inconsis…

    …tency out)
    
    Signed-off-by: Paul Osmialowski <[email protected]>
    pawosm-arm authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    b57dfb9 View commit details
    Browse the repository at this point in the history
  23. Changes to flang's fp-contract behaviour

    1) All fma and contraction behvaviour follows from the -ffp-contract= flag
    setting.
    2) At optimization level 0, -ffp-contract=fast flag will not be honoured.
    3) At all other levels, -ffp-contract=fast will be the default behaviour and
    the flag is honoured.
    kiranchandramohan authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    2ce4452 View commit details
    Browse the repository at this point in the history
  24. [Driver] Remove the "-lompstub" in the driver

    In some workloads, users get "-lompstub" by running "flang -v" and link
    it explicitly, which may cause failure when compiling programs with
    OpenMP (flang -fopenmp test.f90 -lompstub).
    
    There is no runtime call in ompstub.c generated when "-fopenmp" is not
    added to compile the program. When "-fopenmp" is added to compile the
    program, the runtime in llvm/openmp(libomp.so) will be used. If users
    use some runtime library routines such as "omp_get_thread_num" and
    compiles it without the option "-fopenmp", both gfortran and ifort
    report errors of "undefined reference to ...". After remove "-lompstub"
    in the driver, classic-flang reports the error, too. So, it's safe to
    remove the "-lompstub" in the driver.
    PeixinQiao authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    1bd3dc5 View commit details
    Browse the repository at this point in the history
  25. [Driver] Pass Classic Flang libraries to the linker correctly

    In LLVM 15, the Fortran and OpenMP runtime libraries are added to the linker
    command line using common methods (addFortranRuntime* and addOpenMPRuntime*).
    This commit adds Classic Flang awareness to addFortranRuntime*, so that
    Classic Flang doesn't attempt to link with LLVM Flang libraries. Re-using
    the same methods as Clang and LLVM Flang also helps reduce downstream delta.
    A Classic Flang test is added to ensure that the linker command is constructed
    correctly.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    083cd69 View commit details
    Browse the repository at this point in the history
  26. [workflows] Update branch filter to allow actions on all 'release_*x'…

    … branches
    
    By changing the branch filter from an explicit list to a glob, this commit
    hopes to reduce future maintenance burden (as long as we continue to use
    the same branch naming convention).
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    614b3c1 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    ad867bf View commit details
    Browse the repository at this point in the history
  28. [workflows] Add AArch64 build job

    Unlike their flang counterparts, classic-flang-llvm-project PRs did not have
    any AArch64 workflows. So problems with a PR may remain hidden until another
    PR is submitted to the flang repo and fails the AArch64 workflow there.
    This patch adds the missing build job.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    cc50209 View commit details
    Browse the repository at this point in the history
  29. [AsmPrinter] Delete dead code; NFC

    Delete some snippets that had been commented out since commit a10f592
    in release_13x.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    3f3abbb View commit details
    Browse the repository at this point in the history
  30. [workflows] Update path to Flang build directory

    The following Flang commit has changed the default location of the Flang build
    directory, resulting in CI failures in the classic-flang-llvm-project:
    
    flang-compiler/flang@054bde3
    
    This patch updates the path name in the CI workflows.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    ccc1eba View commit details
    Browse the repository at this point in the history
  31. [workflows] Add build script option to allow customization

    This patch adds the -x option which lets the user specify additional CMake
    options when configuring classic-flang-llvm-project.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    60cc58a View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    ab1c0aa View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    4c39fd8 View commit details
    Browse the repository at this point in the history
  34. Changes for reassoc attributes

    This patch adds code to generate the driver flags so that llvm bridge in
    flang2 can generate the nsz, reassoc attributes to arithmetic instructions.
    Also included is a testcase.
    kiranchandramohan authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    4b6f2d2 View commit details
    Browse the repository at this point in the history
  35. [llvm] Provide separate veclib mapping of PGMATH functions for AArch64

    This patch fixes link-time issues experienced while compiling some
    more obscure Fortran workloads. For those programs, calls to the
    libpgmath functions not defined for AArch64 were generated, e.g.
    `__pg_log_4` or `__fd_log_4`. This patch eliminates such possibility.
    
    Signed-off-by: Paul Osmialowski <[email protected]>
    pawosm-arm authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    2dd3da7 View commit details
    Browse the repository at this point in the history
  36. Delete libpgmath veclib definitions for sincos

    As noted in flang-compiler#11, flang currently crashes when lowering
    a sincos reference into a libpgmath runtime function call. The issue is
    that `__fd_sincos_1` is defined as returning a `<{ double, double }>`
    struct and there is no LLVM support for automatically vectorizing target
    functions of this form. In particular, it is somewhat ambiguous how to
    vectorize such functions, i.e. how they pack their return values into the
    vector registers. libpgmath itself also has a somewhat questionable
    implementation of the vector forms of `sincos`, relying on this beauty:
    
    https://github.com/flang-compiler/flang/blob/master/runtime/libpgmath/lib/common/mth_vreturns.c#L8-L47
    
    This may sometimes work in practice, but it is not particularly
    robust. For example, this will definitely break in any sort of LTO or
    instrumentation setting.
    
    I think until libpgmath is updated and LLVM upstream has a consensus on
    how to vectorize these functions, we just need to stop trying to vectorize
    these functions. As noted, since LLVM was crashing anyway, no performance
    and functionality is lost here over current master.
    
    Fixes flang-compiler#11.
    
    Originally By: Keno Fischer <[email protected]>
    gbaraldi authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    3926ee0 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    4789744 View commit details
    Browse the repository at this point in the history
  38. win: Fix the build with verbose options

    The 'append' method should be used instead of extend,
    since the 'extend' method treats the arguments as an iterable object,
    so extends the current list with list of characters.
    kaadam authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    22d887b View commit details
    Browse the repository at this point in the history
  39. win: Don't install llvm by default

    The 'llvm_build_project' build script installs llvm after the build by default.
    It is not necessary, if the user doesn't want.
    kaadam authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    536db88 View commit details
    Browse the repository at this point in the history
  40. [Driver][ClassicFlang] Add options -fno-automatic and -f(no-)implicit…

    …-none
    
    These three options are added in release_12. When compiling programs
    with them using Classic Flang, there are only warnings generated. They
    are removed now so that the errors of "unknown argument" are reported.
    Add these options in Driver for compatibility reason. Please note that
    these options are not implemented yet in Classic Flang.
    PeixinQiao authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    bb84575 View commit details
    Browse the repository at this point in the history
  41. [Driver] Don't use Classic Flang tools for LLVM IR input

    LLVM IR input should not be acceptable for Classic Flang tools. This bug was
    caused by an incorrect merge conflict resolution when upgrading to LLVM 15.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    931c694 View commit details
    Browse the repository at this point in the history
  42. Setup Windows x64/arm64 GitHub action for Classic Flang LLVM

    * Extend pre-compile_llvm workflow with a Windows job which
    defines build strategy for X64 and ARM64 architectures
    to produce prebuilt LLVM binaries for both platform.
    Currently Windows on ARM job is disabled, until
    an official will be available.
    
    * Also enable Classic Flang LLVM testing on Windows x64 only.
    Some tests are failing on Windows on ARM, so we don't run
    tests on WoA until they are fixed.
    
    * Added Windows support to 'classic-flang.f95' driver test.
    Modified FileChecker regex pattern to match Windows path
    separator and binary suffix too.
    kaadam authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    e7a1318 View commit details
    Browse the repository at this point in the history
  43. script: update llvm build script

    * Native Ninja is already available for Windows on ARM,
    so we can use it on both Windows platform.
    
    * Introduced a new '-i' build option to trigger whether
    the user wants to install LLVM or not. Previously the script relies
    on install_prefix option which was wrong approach.
    In this case we still could not defer the install for a later time
    if install directory was set.
    With this change the python build script will be consistent
    with official bash script.
    kaadam authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    492fc0b View commit details
    Browse the repository at this point in the history
  44. [build] Specify LLVM_MAIN_SRC_DIR when running build-flang.sh

    Otherwise Classic Flang's CMakeLists.txt will be unable to find llvm-lit and
    cannot generate test-related goals, e.g. `check-all`.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    ca54ba0 View commit details
    Browse the repository at this point in the history
  45. Pass Flang libraries to MSVC linker correctly

    The orignal PR was created by Isuruf flang-compiler#65
    isuruf authored and bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    e9697a6 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    33fce81 View commit details
    Browse the repository at this point in the history
  47. [Driver] Fix flang driver preprocessor issue

    The -save-temps option has been causing the driver to run flang1/flang2
    on the input file twice, and the fortran-preprocessor.f90 test was unable
    to detect the error, because it had used -c instead of -x in a couple of
    RUN commands.  This patch fixes the test and the driver to make sure that
    the frontend is not invoked multiple times with -save-temps.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    52332f0 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    d93dbb6 View commit details
    Browse the repository at this point in the history
  49. [ClassicFlang] Adapt header include paths

    Some header files have been moved to new directories in LLVM 17.
    StringExtras.h is no longer included transitively since D155178,
    and now needs to be included explicitly by clang/Frontend/Utils.h.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    39f7ae8 View commit details
    Browse the repository at this point in the history
  50. [Driver] Update test to not expect -rpath for -lomp

    Upstream commit 555b572 had reverted D118493, which let Clang add a
    toolchain-specific -rpath option to the linker command for the OpenMP
    library. This patch fixes up a Classic Flang driver test which is impacted
    by the revert.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    4a5b0c7 View commit details
    Browse the repository at this point in the history
  51. [VecLib] Update test case to match new vectorizer behaviour

    The IR in clang/test/CodeGen/libpgmath-logfun-aarch64.ll can now be
    vectorized by a factor of two. The IR still does not call the unsupported
    libpgmath functions, as per the intention of the test.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    dfafea4 View commit details
    Browse the repository at this point in the history
  52. [Driver] Handle -Mnomain and -fno-fortran-main correctly

    -Mnomain and -fno-fortran-main were ineffective unless they were both used
    at the same time. This patch fixes the bug, formats needFortranMain and
    needFortranLibs, and adds some test cases for the logic.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    114c18e View commit details
    Browse the repository at this point in the history
  53. [workflows] Update GitHub actions to use modern tools

    Build classic-flang-llvm-project and flang with GCC 12 and Clang 14/15
    on Ubuntu 22.04.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    7416cd2 View commit details
    Browse the repository at this point in the history
  54. [workflows] Fix GitHub action bugs

    1. The Ubuntu version in pre-compile_llvm.yml should have been updated to 22.04.
    
    2. UbuntuDockerfile should install python3-openssl instead of python-openssl.
       The latter no longer exists in 22.04.
    bryanpkc committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    c0212e7 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    ec67937 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    a9bf84f View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2024

  1. [TLI] Adapt libpgmath function mappings for LLVM 18

    Upstream commit 01797da had added a new VABIPrefix field to the VecDesc
    structure; modify the downstream libpgmath mappings accordingly.
    bryanpkc committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    1d2c8d3 View commit details
    Browse the repository at this point in the history
  2. [libomptarget] Exclude omp3d_x tests that fail on GitHub runners

    ...because the runners do not have enough threads.
    bryanpkc committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    1452f34 View commit details
    Browse the repository at this point in the history
  3. [Driver] Make supported Clang options visible to Classic Flang

    Classic Flang accepts some Clang options that LLVM Flang (F18) does not.
    The Visibility of such options are modified to include "FlangOption".
    bryanpkc committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    96a9ea5 View commit details
    Browse the repository at this point in the history
  4. [Driver] Update FileCheck patterns for AArch64 target features

    ...after upstream commit 13e977d changed
    how target feature dependencies are handled.
    bryanpkc committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    aede9da View commit details
    Browse the repository at this point in the history